摘要:设置 delegate 1. 输入长度限制: 2. 限制输入空格:
阅读全文
摘要:首先声明一下,我是一个菜鸟,只是在工作中需要给别的公司提供SDK所以学习了如何去打包生成属于自己的SDK,有什么不足的地方,还希望大家能够指正. 好了,废话不多说,首先,我使用的Xcode版本是7.2,新建一个工程,在进入页面之后,选择Framework & Libray 选项中的 Cocoa To
阅读全文
摘要:使用cocopods管理第三方时,有时删除了某个第三方,重新 pod install 后报错,ld: library not found for -lxx , 选中项目名,TARGETS > OtherLinkerFlags > 删除报错的库名。
阅读全文
摘要:-(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; //开启侧滑返回 self.navigationController.interactivePopGestureRecognizer.delegate = (id)self; //对于导航栏的是否显示使用此方法设置 [self.nav...
阅读全文
摘要:因为 BLE 缓存区最多一次接收20字节的数据,发送数据时需对数据做分包处理。 转载自:http://www.jianshu.com/p/29bd630077b4
阅读全文
摘要://UTF8转GBKNSString *roadName = @“你好”; NSStringEncoding gbkEncoding=CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000); NSData*data = [roadName dataUsingEncoding: gbkEnc...
阅读全文
摘要://年龄小于30 //定义谓词对象,谓词对象中包含了过滤条件 NSPredicate *predicate = [NSPredicate predicateWithFormat:@"age40"]; array = [persons filteredArrayUsingPredicate:predicate]; N...
阅读全文
摘要:// ①导入头文件 #import #import 服从代理 CNContactPickerDelegate, //联系人界面 // 1.创建选择联系人的控制器 CNContactPickerViewController *contactVc = [[CNContactPickerViewController alloc] init]; ...
阅读全文
摘要:解决思路引用博客:http://blog.csdn.net/ralbatr/article/details/38388801 类下载地址,按钮直接集成该类 https://github.com/Sunmair/ios/tree/master/%E5%B8%B8%E7%94%A8%E7%B1%BB%E
阅读全文
摘要:AVSpeechUttrance 代表你想说什么 AVSpeechSynthesizer 用来发出声音 NSArray *ary = [AVSpeechSynthesisVoice speechVoices]; //获取系统提供的语言种类 AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer allo...
阅读全文
摘要:前言 在iOS中开放中,我们可能会遇到需要通过代码获取当前显示在屏幕最顶层的ViewController,比如我们需要在最顶层的ViewController上展示一个UIAlertController的时候。本文将介绍如何获取最顶层的ViewController 实现思路 通 过最底层的ViewCo
阅读全文
摘要:导入即可,使用简单,类文件下载地址 使用如图:
阅读全文
摘要:在配置好百度导航相关配置后直接调用。下载类文件
阅读全文
摘要:集成百度地图报错41个解决方法 集成百度地图碰到了这种报错 Undefined symbols for architecture x86_64: "_NSBackgroundColorAttributeName", referenced from: _baidu_vi::vi_map::GenTex
阅读全文
摘要:func drawLineInImageWithImage(imageView:UIImageView,points:[CGPoint]){ UIGraphicsBeginImageContext(imageView.frame.size); imageView.image?.drawInRect(
阅读全文
摘要:前提:CoreGraphics.framework
阅读全文