随笔分类 - swift
摘要:UIScrollView 手势冲突
阅读全文
摘要://返回一个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.
阅读全文
摘要://设置textfile的Placeholder的颜色和字体大小 nameText.attributedPlaceholder = NSAttributedString.init(string: "用户名", attributes: [NSForegroundColorAttributeName:
阅读全文
摘要:table?.separatorInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) //设置cell 下边线 位置 table?.separatorStyle = .none //设置cell 下边线类型 cell.selection
阅读全文
摘要:一句话创建banner图,可时时刷新 用到了 SnapKit、SDWebImage两个第三方库 实现步骤 import UIKit typealias BtnBlock = (Int) -> Void //ImagesBlock typealias ImagesBlock = () -> [Stri
阅读全文
摘要://MARK:系统跳到应用设置页面 func systemMySet(){ let url = NSURL(string: UIApplicationOpenSettingsURLString) if let url = url where UIApplication.sharedApplicati
阅读全文
摘要:let string = "点击注册按钮,即表示您已同意隐私条款和服务协议" let ranStr = "同意" let attrstring:NSMutableAttributedString = NSMutableAttributedString(string:string) let str =
阅读全文
摘要:一句话选择单个头像图片 新建ImagePickerViewController类: /* let imagePicker = ImagePickerViewController() imagePicker.delegate = self self.presentViewController(imag
阅读全文