随笔分类 -  swift

摘要:deviceToken 阅读全文
posted @ 2018-05-04 11:23 zuidap 阅读(734) 评论(0) 推荐(0)
摘要:swift 获取iphone设备型号 阅读全文
posted @ 2017-11-02 09:47 zuidap 阅读(1597) 评论(0) 推荐(0)
摘要:UIScrollView 手势冲突 阅读全文
posted @ 2017-08-09 17:34 zuidap 阅读(2612) 评论(0) 推荐(0)
摘要:swift3 本地通知 阅读全文
posted @ 2017-01-11 17:32 zuidap 阅读(227) 评论(0) 推荐(0)
摘要://返回一个RGB颜色 class func getColor(r:CGFloat,g:CGFloat,b:CGFloat,l:CGFloat = 1) ->UIColor{ let color = UIColor(red: r/255.0, green: g/255.0, blue: b/255. 阅读全文
posted @ 2016-11-02 13:52 zuidap 阅读(828) 评论(0) 推荐(0)
摘要://设置textfile的Placeholder的颜色和字体大小 nameText.attributedPlaceholder = NSAttributedString.init(string: "用户名", attributes: [NSForegroundColorAttributeName: 阅读全文
posted @ 2016-11-02 12:07 zuidap 阅读(318) 评论(0) 推荐(0)
摘要:table?.separatorInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) //设置cell 下边线 位置 table?.separatorStyle = .none //设置cell 下边线类型 cell.selection 阅读全文
posted @ 2016-10-12 15:54 zuidap 阅读(239) 评论(0) 推荐(0)
摘要:一句话创建banner图,可时时刷新 用到了 SnapKit、SDWebImage两个第三方库 实现步骤 import UIKit typealias BtnBlock = (Int) -> Void //ImagesBlock typealias ImagesBlock = () -> [Stri 阅读全文
posted @ 2016-09-30 15:25 zuidap 阅读(427) 评论(0) 推荐(0)
摘要:swift 原声请求 阅读全文
posted @ 2016-09-12 15:39 zuidap 阅读(3773) 评论(0) 推荐(0)
摘要://MARK:系统跳到应用设置页面 func systemMySet(){ let url = NSURL(string: UIApplicationOpenSettingsURLString) if let url = url where UIApplication.sharedApplicati 阅读全文
posted @ 2016-08-16 16:40 zuidap 阅读(289) 评论(0) 推荐(0)
摘要:let string = "点击注册按钮,即表示您已同意隐私条款和服务协议" let ranStr = "同意" let attrstring:NSMutableAttributedString = NSMutableAttributedString(string:string) let str = 阅读全文
posted @ 2016-08-12 17:11 zuidap 阅读(5897) 评论(0) 推荐(0)
摘要:一句话选择单个头像图片 新建ImagePickerViewController类: /* let imagePicker = ImagePickerViewController() imagePicker.delegate = self self.presentViewController(imag 阅读全文
posted @ 2016-08-11 16:45 zuidap 阅读(893) 评论(0) 推荐(0)