-
按住command拖拽storyboard中的元素到ViewController.swift 鼠标移到ViewController.swift中左侧的小点上,可以看到连接的对象查看全部
-
cmd+b 编译<br> cmd+0 导航栏切换 option+点击(函数名) 查看对应的函数信息查看全部
-
var uuid = NSUUID().UUIDString查看全部
-
重写继承了一些方法,UIViewcontroner查看全部
-
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell let cell = self.tableView.dequeueReusableCellWithIdentifier("todoCell")! as UITableViewCell //坑: 注意这里的tableView要用自己绑定outlet的,而不能用参数里的tableView,否则在搜索的时候会crash掉!!!所以要用self.tableView查看全部
-
optional public func tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -> Bool 这个方法现在不在UITableViewDelegate中,而是在UITableViewDataSource中查看全部
-
应该这样设置标题 navigationItem.title = "新增Todo" // navigationController?.title = "新增Todo"查看全部
-
navigationController 连线到 下一个ViewController的 segue 模式是 rootViewContainer 不是modal,也不是push,custom哦!查看全部
-
override func touchesEnded(touches: NSSet, withEvent event: UIEvent) { yearofbirth.resignFirstResponder() if let year = yearofbirth.text.toInt() { var imageNumber = (year - offset ) % 12 Image.image = UIImage (named: String(imageNumber)) }查看全部
-
导出图片比例设置 0.5x @1x 1x @2x 1.5x @3x查看全部
-
// 注册全局点击结束事件 override func touchesEnded(touches: Set<NSObject>, withEvent event: UIEvent) { // 输入框失去焦点,收起键盘 yearOfBirth.resignFirstResponder() }查看全部
-
为什么键盘弹不出来了……查看全部
-
let components = gregorian?.components(NSCalendarUnit.NSYearCalendarUnit, fromDate: birthday.date, toDate: now, options: NSCalendarOptions(rawValue: 0)) 或者 let components = gregorian?.components(NSCalendarUnit.Year, fromDate: birthday.date, toDate: now, options: NSCalendarOptions(rawValue: 0))查看全部
-
期待老师的Sketch 教程视频查看全部
-
赋值给GalleryViewController中的imageName查看全部
举报
0/150
提交
取消