摘要:
info.plist 中添加NSAppTransportSecurity Dic NSAllowsArbitraryLoads Yes 阅读全文
摘要:
[tvDynamicsetContentOffset:CGPointMake(0, 0) animated:NO]; 阅读全文
摘要:
- (void)viewWillDisappear:(BOOL)animated{[[NSNotificationCenterdefaultCenter] removeObserver:selfname:UIKeyboardWillShowNotificationobject:nil];[[NSNotificationCenterdefaultCenter] removeObserver:selfname:UIKeyboardWillHideNotificationobject:nil];}- (void)viewDidLoad{ [superviewDidLoad]; [[NSNoti... 阅读全文
摘要:
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard)]; [self.view addGestureRecognizer:tap];}-(void)dismissKeyboard { [Global cancelKeyBoard:self.view];} 阅读全文
摘要:
NSArray *paths=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES); NSString *path=[paths objectAtIndex:0]; NSString *filename=[path stringByAppendingPathComponent:[path stringByAppendingString:@"faceMap_ch.plist"]]; //NSFileManager *fM=[NSFileManager defaultManag 阅读全文
摘要:
ASIHTTPRequest 是一款极其强劲的 HTTP 访问开源项目。让简单的 API 完成复杂的功能,如:异步请求,队列请求,GZIP 压缩,缓存,断点续传,进度跟踪,上传文件,HTTP 认证。在新的版本中,还加入了 Objective-C 闭包 Block 的支持,让我们的代码加轻简灵活。 下面就举例说明它的 API 用法。发起一个同步请求 同步意为着线程阻塞,在主线程中使用此方法会使应用Hang住而不响应任何用户事件。所以,在应用程序设计时,大多被用在专门的子线程增加用户体验,或用异步请求代替(下面会讲到)。 - (IBAction)grabURL:(id)sender { NSURL 阅读全文
摘要:
error: PCH file built from a different branch ((clang-425.0.27)) than the compiler ((clang-425.0.28))1 error generated.shift+com+kClearn下就OK了 阅读全文
摘要:
IndexOf(obj) 如果返回-1 则obj不在集合中 阅读全文
摘要:
A项目中的info.plist中添加 B调用A[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:@"myapp://"]];关于传参B程序中 [[UIApplicationsharedApplication] openURL:[NSURLURLWithString:@"myapp://username=ios001;pwd=123123"]];A程序AppController中处理- (BOOL)application:(UIApplication *)application han 阅读全文
摘要:
#import <UIKit/UIKit.h>@interface ViewController : UIViewController{ UIButton *doneInKeyboardButton;}- (IBAction)NOBut:(id)sender;- (IBAction)But:(id)sender;@end#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad{ //注册通知 [[NSNot 阅读全文