摘要: [self.rightTF addTarget:self action:@selector(rightTFValueChange:) forControlEvents:UIControlEventEditingChanged]; -(void)rightTFValueChange:(UITextField *)textField{ UITextRange *selectedRange... 阅读全文
posted @ 2017-01-19 11:29 新年新气象 阅读(379) 评论(0) 推荐(0)
摘要: self.textView.inputAccessoryView = [self addToolbar]; - (UIToolbar *)addToolbar { UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.frame), 35)]; ... 阅读全文
posted @ 2017-01-16 16:23 新年新气象 阅读(310) 评论(0) 推荐(0)
摘要: #import <SystemConfiguration/SystemConfiguration.h> #pragma mark - 检测是否有网络 yes有网 +(BOOL)checkNetStatus { struct sockaddr_in zeroAddress; bzero(&zeroAd 阅读全文
posted @ 2016-12-23 14:04 新年新气象 阅读(173) 评论(0) 推荐(0)
摘要: - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{ BOOL returnValue = YES; 阅读全文
posted @ 2016-11-28 13:17 新年新气象 阅读(253) 评论(1) 推荐(1)
摘要: 原出处:http://blog.sina.com.cn/s/blog_890a737301014fim.html 阅读全文
posted @ 2016-11-02 14:06 新年新气象 阅读(911) 评论(0) 推荐(0)
摘要: 方法一: [self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2] animated:YES];或方法二: for (UIViewControl 阅读全文
posted @ 2016-10-27 16:41 新年新气象 阅读(1092) 评论(0) 推荐(0)
摘要: #define SHOWALERT(MESSAGE) \ UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:MESSAGE preferredStyle:UIAlertControllerStyleAlert]; \ UIAlertAction *okAct... 阅读全文
posted @ 2016-10-27 09:15 新年新气象 阅读(346) 评论(0) 推荐(0)
摘要: 解决方法 在终端里面输入sudo sysctl -w kern.timer.coalescing_enabled=0 阅读全文
posted @ 2016-09-30 09:00 新年新气象 阅读(173) 评论(0) 推荐(0)
摘要: self.scrollView.panGestureRecognizer.delaysTouchesBegan = YES;设置scrollView的延迟接收点击触摸事件,关闭触摸事件 self.scrollView.delaysContentTouches = YES; button无法识别点击事 阅读全文
posted @ 2016-09-22 09:21 新年新气象 阅读(632) 评论(0) 推荐(0)
摘要: 如果有补充的地方,欢迎指出 使用sdwebimage第三方库加载本地的gif 使用sdwebimage第三方库加载网络的gif 使用UIWebView加载本地的gif或者网络的gif 补充: imageNamed图片是在内存里,建议用以下写法 阅读全文
posted @ 2016-09-14 14:47 新年新气象 阅读(533) 评论(0) 推荐(0)