摘要:
http://www.cocoachina.com/bbs/read.php?tid=86050 阅读全文
摘要:
objective-c 遍历文件夹及判断文件类型//// main.m// FileSearchTest//// Created by Zhang Leonardo on 11-10-31.// Copyright (c) 2011年 __MyCompanyName__. All rights reserved.// To discuss via :www.renren.com/leonardozhang //#import <Foundation/Foundation.h>int main (int argc, const char * argv[]){ @autorelease 阅读全文
摘要:
http://www.cocoachina.com/bbs/read.php?tid=20423&fpage=2 阅读全文
摘要:
http://www.cocoachina.com/bbs/read.php?tid=69165&fpage=In-App Purchase例子http://code4app.com/ios/In-App-Purchase/4fc85be56803fa4a49000000 阅读全文
摘要:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { ... 阅读全文
摘要:
iPhone上实现Default.png动画iPhone上实现Default.png动画 原理: 添加一张和Default.png一样的图片,对这个图片进行动画,从而实现Default动画的渐变消失的效果。 操作: 在- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOpti*****:(NSDictionary *)launchOpti*****中添加如下代码: // Make this interesting. UIImageView *s... 阅读全文
摘要:
在程序中如何把两张图片合成为一张图片- (UIImage *)addImage:(UIImage *)image1 toImage:(UIImage *)image2 {UIGraphicsBeginImageContext(image1.size);// Draw image1[image1 drawInRect:CGRectMake(0, 0, image1.size.width, image1.size.height)];// Draw image2[image2 drawInRect:CGRectMake(0, 0, image2.size.width, image2.size.hei 阅读全文
摘要:
iphone网络post连接的两种处理方式(同步和异步) 第一种: 直接返回方式。-(void)UpadaPost:(NSString *)strcontext URL:(NSString *)urlstr{NSLog(urlstr);NSLog(strcontext);assert(strcontext != NULL);assert(urlstr != NULL);NSData *postData = [strcontext dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES]; NSString *post.. 阅读全文
摘要:
-(BOOL) isEmailAddress:(NSString*)email { NSString *emailRegex = @"^\\w+((\\-\\w+)|(\\.\\w+))*@[A-Za-z0-9]+((\\.|\\-)[A-Za-z0-9]+)*.[A-Za-z0-9]+$"; NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", emailRegex]; return [emailTest evaluateWithObject:emai 阅读全文
摘要:
// AppDelegate *AppD = (AppDelegate*)[[UIApplication sharedApplication]delegate] ;// AppD.tabBarController.selectedViewController = [AppD.tabBarController.viewControllers objectAtIndex:2]; 阅读全文