- 博客(9)
- 收藏
- 关注
原创 NSDictionary简便方法
@implementation NSDictionary (Helper)- (id)keyForIndex:(NSUInteger)index{ NSArray* keys = [selfsortedKeyArr]; NSString* key = keys[index]; return key;}- (id)objectForK
2016-08-04 10:10:21
182
原创 获取根视图控制器
- (UIViewController*)rootViewController{ if (self.parentViewController) { return [self.parentViewControllerrootViewController]; } else{ returnself; }}
2016-08-04 10:08:59
386
原创 文件操作简便宏定义
//应用配置文件存储路径#define FilePathInSandBox(fileName) [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES) objectAtIndex:0] stringByAppendingPathComponent:fileName]#define App
2016-08-04 09:57:20
207
原创 设置url缓存大小
NSURLCache *URLCache = [[NSURLCachealloc] initWithMemoryCapacity:4 *1024 * 1024 diskCapacity:20 *1024 * 1024
2016-08-04 09:12:57
258
原创 全局设置网页代理
//设置所有内嵌webView统一的User-Agent NSMutableDictionary *dictionary = [NSMutableDictionarydictionaryWithObjectsAndKeys:[MTDCommonUtlgetDeviceInfoParam], @"UserAgent",nil]; [dictionary setValu
2016-08-04 09:08:31
387
原创 应用屏蔽静音键
[[AVAudioSessionsharedInstance] setCategory:AVAudioSessionCategoryPlaybackerror:nil];
2016-08-04 09:05:56
229
原创 获取应用代理实例
/** * 单例 * * @return */+ (MTDAppDelegate*)sharedInstance{ return (MTDAppDelegate*)[[UIApplicationsharedApplication] delegate];}
2016-08-04 09:03:15
115
原创 ios 7隐藏导航栏页面滑动返回提前出现导航栏问题解决办法
不可直接使用self.navigationController.navigationBarHidden = NO,而应该使用 [self.navigationController setNavigationBarHidden:_exitButHideNavigationBar animated:YES];
2016-08-04 08:57:08
308
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人