[转]iOS开发的一些奇巧淫技1.2.3
1&2.http://www.cocoachina.com/ios/20141231/10783.html
3.http://www.cocoachina.com/ios/20150210/11130.html
tableViewCell的黑色分隔线左对齐
self.tabView.separatorInset = UIEdgeInsetsMake(1, 0, 1, 0);
xcode快捷键
command+alt+shift + 左/右 收起所有方法/展开所有方法
导航栏设置leftBarButtonItem之后,左滑返回手势失效 这时需要设置UIGestureRecognizerDelegate
self.navigationController.interactivePopGestureRecognizer.delegate = self;
获取字符串中的数字
NSCharacterSet *nonDigits =[[NSCharacterSet decimalDigitCharacterSet] invertedSet]; NSString *remainSecond =[@"0.0分钟" stringByTrimmingCharactersInSet:nonDigits]; NSLog(@" num %@ ",remainSecond);