摘要:
// 寻找地址 NSString* path = [NSHomeDirectory()stringByAppendingString:@"/Library/Caches"]; // 文件管理者 NSFileManager*fileManager = [NSFileManagerdefaultMana... 阅读全文
摘要:
1.首先导入头文件:#import 2.在该文件下存在监听事件名称,我们可以对该事件进行监听:NSString *const AVAudioSessionRouteChangeNotification 3.使用通知中心设置监听:[[NSNotificationCenter defaultCenter... 阅读全文
摘要:
#define strUrl(a, b) [NSString stringWithFormat:@"xxxxx%ldxxxx%@", a, b]NSLog(@"%@",strUrl(5,@"3")) 阅读全文
摘要:
if(YES== [[NSUserDefaultsstandardUserDefaults]boolForKey:@"isNight"]) { [self.webstringByEvaluatingJavaScriptFromString:@"document.getElementsByTagNam... 阅读全文
摘要:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{ return (toInterfaceOrientation == UIInterfaceOrienta... 阅读全文
摘要:
如果有NAVC可能会不好用你可以复写viewcontroller的下面几个模板函数,试试。- (BOOL)shouldAutorotateNS_AVAILABLE_IOS(6_0);当前viewcontroller是否支持转屏- (NSUInteger)supportedInterfaceOrien... 阅读全文
摘要:
// 获取沙盒Document的文件目录+ (NSString *)getDocumentDirectory;// 获取沙盒Library的文件目录+ (NSString *)getLibraryDirectory;// 获取沙盒Library/Caches的文件目录+ (NSString *)ge... 阅读全文
摘要:
self.textV.inputAccessoryView= view; 阅读全文
摘要:
在iOS7中,新增加了一个小小的功能,也就是这个api:self.navigationController.interactivePopGestureRecognizer.enabled = YES;这个api功能就是在NavigationController堆栈内的UIViewController... 阅读全文
摘要:
1. 首先查看 Xcode 的 UUID,在终端执行defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID2. 添加Alcatraz-masterfind ~/Library/Application... 阅读全文