10 2013 档案

base64编码问题 需要对每个参数URL编码
摘要:- (NSString *)encodeToPercentEscapeString: (NSString *) input{ // Encode all the reserved characters, per RFC 3986 // () NSString *outputStr = (NSString *) CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)input, ... 阅读全文

posted @ 2013-10-30 16:06 jack_yan 阅读(716) 评论(0) 推荐(0)

iOS常用的开源类库
摘要:开发几个常用的开源类库及下载地址: 引用 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 阅读全文

posted @ 2013-10-30 14:50 jack_yan 阅读(193) 评论(0) 推荐(0)

传送表单
摘要://参数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 阅读全文

posted @ 2013-10-25 16:08 jack_yan 阅读(223) 评论(0) 推荐(0)

改变和恢复view的方向
摘要:self.navigationController.view.transform = CGAffineTransformMakeRotation(M_PI/2); self.navigationController.view.frame = CGRectMake(0, 0, 320, 480); //设置应用程序的状态栏到指定的方向 [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];self.navigationController.... 阅读全文

posted @ 2013-10-22 16:44 jack_yan 阅读(372) 评论(0) 推荐(0)

app被Rejected 的各种原因翻译。这个绝对有用。
摘要: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 阅读全文

posted @ 2013-10-21 13:59 jack_yan 阅读(725) 评论(0) 推荐(0)

更改navigationController push和pop界面切换动画
摘要: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. 阅读全文

posted @ 2013-10-21 13:56 jack_yan 阅读(377) 评论(0) 推荐(0)

线程访问外部数据
摘要: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... 阅读全文

posted @ 2013-10-10 15:06 jack_yan 阅读(272) 评论(0) 推荐(0)