摘要:- (NSString *)encodeToPercentEscapeString: (NSString *) input{ // Encode all the reserved characters, per RFC 3986 // () NSString *outputStr = (NSString *) CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)input, ...
阅读全文
摘要:开发几个常用的开源类库及下载地址: 引用 1.json json编码解码 2.GTMBase64 base64编码解码 3.TouchXML xml解析 4.SFHFKeychainUtils 安全保存用户密码到keychain中 5.MBProgressHUD 很棒的一个加载等待特效框架 6.ASIHTTPRequest http等相关协议封装 7.EGORefreshTableHeaderView 下拉刷新代码 8.AsyncImageView 异步加载图片并缓存代码 9.类似setting的竖立也分栏程序扫描wifi信息:http://code.google.com/p/uwecaugm
阅读全文
摘要://参数1名字=参数1数据&参数2名字=参数2数据&参数3名字=参数3数据&... // NSString *post = [NSString stringWithFormat:@"active=login&u_name=a&u_pwd=000618"]; //将NSSrring格式的参数转换格式为NSData,POST提交必须用NSData数据。 NSData *postData = [postString dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES
阅读全文
摘要:self.navigationController.view.transform = CGAffineTransformMakeRotation(M_PI/2); self.navigationController.view.frame = CGRectMake(0, 0, 320, 480); //设置应用程序的状态栏到指定的方向 [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];self.navigationController....
阅读全文
摘要:1. Terms and conditions(法律与条款)1.1As a developer of applications for the App Store you are bound by the terms of theProgram License Agreement(PLA), Human Interface Guidelines (HIG), and any other licenses or contracts between you and Apple. The following rules and examples are intended to assist you
阅读全文
摘要:For Push:MainView *nextView=[[MainView alloc] init];[UIView beginAnimations:nil context:NULL];[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];[UIView setAnimationDuration:0.75];[self.navigationController pushViewController:nextView animated:NO];[UIView setAnimationTransition:UIViewAnimatio.
阅读全文
摘要:NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; initData(); __block int sum = 0; // Create a semaphore with 0 resource __block dispatch_semaphore_t sem = dispatch_semaphore_create(0); __blockdispatch_semaphore_t taskSem =dispatch_semaphore_create(0); // create dispatch semaphore d...
阅读全文