2017年11月14日

swift 拖动view, 自动停靠屏幕边缘

摘要: // 创建view 添加pan 手势 点手势 let drapBtn = UIView(frame:CGRect(x: 100, y: 100, width: 100, height: 100)) drapBtn.backgroundColor = UIColor.orange self.view. 阅读全文

posted @ 2017-11-14 15:57 顾玉玺 阅读(1471) 评论(0) 推荐(0)

swift 字符串插入空格

摘要: // 扩展String // 字符串插入空格 exp:4444 5555 6666 7777 // per 每隔几个字母添加一个空格 mutating func addBlank(per: Int = 4) -> String { let spaceCount = Int(count/per) fo 阅读全文

posted @ 2017-11-14 15:11 顾玉玺 阅读(2152) 评论(0) 推荐(0)

导航