摘要: 1,Swift继续使用Object-C原有的一套线程,包括三种多线程编程技术:(1)Thread(2)Cocoa Operation(Operation和OperationQueue)(3)Grand Central Dispath(GCD)2,本文着重介绍Grand Central Dispath 阅读全文
posted @ 2017-05-18 18:11 漫步彩云间 阅读(5733) 评论(0) 推荐(0) 编辑
摘要: // MARK: - Action // MARK: compose mail 发送邮件 @IBAction func composeMail(sender: AnyObject) { // 判断能否发送邮件 guard MFMailComposeViewController.canSendMail() else { ... 阅读全文
posted @ 2017-05-18 18:01 漫步彩云间 阅读(776) 评论(0) 推荐(0) 编辑
摘要: var phone="10086"; UIApplication.sharedApplication().openURL(NSURL(string :"tel://"+"\(phone)")!) 或者 UIApplication.sharedApplication().openURL(NSURL(s 阅读全文
posted @ 2017-05-18 17:58 漫步彩云间 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 需要闭包的类 在另一个类里调用闭包 阅读全文
posted @ 2017-05-18 17:56 漫步彩云间 阅读(750) 评论(0) 推荐(0) 编辑
摘要: 关于更新到Xcode8后答应了很多网络日志的,会影响到我们需要的日志的混淆,下面是解决办法 product —> scheme —> Edit Scheme —> Run —> Argument —> Environment Variable 添加 key:OS_ACTIVITY_MODE valu 阅读全文
posted @ 2016-10-08 11:13 漫步彩云间 阅读(4090) 评论(0) 推荐(0) 编辑
摘要: 调用系统相册、相机发现是英文的系统相簿界面后标题显示“photos”,但是手机语言已经设置显示中文,发现在项目的info.plist里面添加Localized resources can be mixed YES(表示是否允许应用程序获取框架库内语言)即可解决这个问题。 阅读全文
posted @ 2016-04-05 17:07 漫步彩云间 阅读(214) 评论(0) 推荐(0) 编辑
摘要: NSMutableAttributedString常见的属性: NSFontAttributeName 字体 NSForegroundColorAttributeName 文字颜色 NSBackgroundColorAttributeName 背景颜色 NSStrikethroughStyleAtt 阅读全文
posted @ 2016-02-17 18:17 漫步彩云间 阅读(4263) 评论(0) 推荐(0) 编辑
摘要: 在 IOS 开发当中经常碰到 whose view is not in the window hierarchy 的错误,该错误简单的说,是由于 "ViewController" 还没有被加载,就调用该 ViewController 或者 ViewController 内的方法时,就会报这个错误。在... 阅读全文
posted @ 2015-12-03 17:48 漫步彩云间 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 1、去除UITableView空白的多余的分割线self.myTableview.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero]; 2、设置分割线的位置方法一:在willDisplayCell上增加如下代码- (void)ta... 阅读全文
posted @ 2015-12-03 17:43 漫步彩云间 阅读(5120) 评论(0) 推荐(0) 编辑
摘要: iOS中ASCII字符串转UTF8格式,可调用下面这个方法:-(NSString *)gb2312toutf8:(NSData *) data{NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEnco... 阅读全文
posted @ 2015-11-11 10:08 漫步彩云间 阅读(903) 评论(0) 推荐(0) 编辑