摘要:if ([firstDetailSelect compare:secondDetailSelect] == NSOrderedDescending) { [MBProgressHUD showError:@"开始时间不能大于结束时间" toView:self]; return; }} 阅读全文
iOS 判断字符串中含有某个字符串 rangeOfString
2015-10-26 19:04 by Y了个J, 152 阅读, 0 推荐, 收藏, 编辑
摘要://判断roadTitleLab.text 是否含有qingjoin if([roadTitleLab.text rangeOfString:@"qingjoin"].location !=NSNotFound)//_roaldSearchText { ... 阅读全文
遇到could not find developer disk image 问题怎么解决
2015-10-23 14:46 by Y了个J, 409 阅读, 0 推荐, 收藏, 编辑
摘要:一般是设备的版本低于或者高于当前的xcode 阅读全文
ViewController添加子控制器 并且弹出
2015-10-10 09:17 by Y了个J, 265 阅读, 0 推荐, 收藏, 编辑
摘要:/*** 初始化子控制器*/- (void)setupChildVcs{ for (int i = 0; i<6; i++) { UIViewController *vc = [[UIViewController alloc] init]; vc.view.backgroundColo... 阅读全文
通知中心
2015-10-09 15:13 by Y了个J, 206 阅读, 0 推荐, 收藏, 编辑
摘要:// 发出通知 [[NSNotificationCenter defaultCenter] postNotificationName:HMTabBarDidSelectNotification object:nil userInfo:@{HMTabBarSelectIndex : @(button... 阅读全文
NSDateFormatter
2015-10-07 17:55 by Y了个J, 165 阅读, 0 推荐, 收藏, 编辑
摘要:NSDate *now = [NSDate date]; NSDateFormatter *fmt = [[NSDateFormatter alloc] init]; fmt.dateFormat = @"HH:mm"; // NSDate ---> NSString // NSString... 阅读全文
The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. 怎么解决
2015-10-06 16:08 by Y了个J, 619 阅读, 0 推荐, 收藏, 编辑
摘要:cd 文件pod install --no-repo-update 就可以了 阅读全文
MAX(A,B)
2015-10-06 13:45 by Y了个J, 250 阅读, 0 推荐, 收藏, 编辑
摘要:MAX(A,B) 可以把x,或者y的变量扔进去比较,会自动放出比较结果,这样就避免的三目运算。 阅读全文
MAXFLOAT
2015-10-06 13:29 by Y了个J, 393 阅读, 0 推荐, 收藏, 编辑
摘要:CGSizeMake(300, MAXFLOAT),是计算宽和高的,里面的MAXFLOAT通俗点说就是最大的数值,代表你的label的宽和高是随着你label内容而变化,不用担心因为label内容过长而显示不全 阅读全文