05 2017 档案
39、字符串去除空格
摘要:【问题分析】1、使用NSString中的stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]方法只是去掉左右两边的空格;2、使用NSString *strUrl = [urlString stringByRe 阅读全文
posted @ 2017-05-23 15:52 强者VS弱者 阅读(238) 评论(0) 推荐(0) 编辑
38、当前时间是否在开放时间内(也就是时间对比)
摘要:NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; // 设置你想要的格式,hh与HH的区别:分别表示12小时制,24小时制 // [formatter setDateFormat:@"YYYY-MM-dd HH:mm:ss"]; 阅读全文
posted @ 2017-05-23 13:55 强者VS弱者 阅读(222) 评论(0) 推荐(0) 编辑
37、自定义气泡
摘要:// 根据anntation生成对应的View - (BMKAnnotationView *)mapView:(BMKMapView *)mapView viewForAnnotation:(id <BMKAnnotation>)annotation { 阅读全文
posted @ 2017-05-11 16:47 强者VS弱者 阅读(164) 评论(0) 推荐(0) 编辑
36、NSTimer使用详解-开启、关闭、移除
摘要:1、要是用一个定时器,首先要定义一个定时器: @property(strong,nonatomic)NSTimer *myTimer;//定时器 2、初始化,初始化有两种方式: 第一种: + (NSTimer *)timerWithTimeInterval:(NSTimeInterval)ti ta 阅读全文
posted @ 2017-05-11 10:46 强者VS弱者 阅读(877) 评论(0) 推荐(0) 编辑
35、输入框(UITextField)密码明暗文切换
摘要:- (IBAction)pwdTextSwitch:(UIButton *)sender { // 前提:在xib中设置按钮的默认与选中状态的背景图 // 切换按钮的状态 sender.selected = !sender.selected; if (sender.selected) { // 按下 阅读全文
posted @ 2017-05-11 09:19 强者VS弱者 阅读(970) 评论(0) 推荐(0) 编辑
34、iOS App图标和启动画面尺寸
摘要:注意:iOS所有图标的圆角效果由系统生成,给到的图标本身不能是圆角的。 1. 桌面图标 (app icon) for iPhone6 plus(@3x) : 180 x 180 for iPhone 6/5s/5/4s/4(@2x) : 120 x 120 2. 系统搜索框图标 (Spotlight 阅读全文
posted @ 2017-05-09 11:24 强者VS弱者 阅读(725) 评论(0) 推荐(0) 编辑
33、iOS10 由于权限问题导致崩溃的大坑
摘要:控制台报忠告: This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an N 阅读全文
posted @ 2017-05-09 11:20 强者VS弱者 阅读(434) 评论(0) 推荐(0) 编辑
32、获取状态栏和导航栏高度、宽度信息
摘要:// 状态栏(statusbar) CGRect rectStatus = [[UIApplication sharedApplication] statusBarFrame]; NSLog(@"status width - %f", rectStatus.size.width); // 宽度 NS 阅读全文
posted @ 2017-05-09 11:13 强者VS弱者 阅读(331) 评论(0) 推荐(0) 编辑
31、iOS 正则表达式判断UITextField是否为全汉字,全字母,全数字,数字和字母
摘要:判断全汉字 if ([self deptNameInputShouldChinese]) { [DemonAlertHelper showToastWithMessage:@"只能是中文"]; return; } 调用这个方法就可 #pragma mark-- #pragma mark 输入中文 - 阅读全文
posted @ 2017-05-08 18:06 强者VS弱者 阅读(2280) 评论(0) 推荐(0) 编辑
30、拨打电话方法
摘要:1.[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:186xxxx123"]]; 测试结果:不弹出提示框,直接跳转到通讯录拨打电话,通话结束返回到app。 2.UIWebView * callWebview 阅读全文
posted @ 2017-05-08 17:59 强者VS弱者 阅读(233) 评论(0) 推荐(0) 编辑
29、键盘消失的4种方法
摘要:处理UITextField,键盘消失问题 1. 通过UITextFiledDelegate,来释放第一响应者(resignFirstResponder);通过delegate释放键盘 -(BOOL)textFieldShouldReturn:(UITextFiled*)textField{ [tex 阅读全文
posted @ 2017-05-08 15:32 强者VS弱者 阅读(420) 评论(0) 推荐(0) 编辑


点击右上角即可分享
微信分享提示