Xcode9.0beta 亲测可以
@IBAction func close(segue: UIStoryboardSegue) {
print("closed")
}
@IBAction func close(segue: UIStoryboardSegue) {
print("closed")
}
2017-12-16
let cell = self.tableView.dequeueReusableCell(withIdentifier:"Cell",for: indexPath)
2017-11-28
我刚才说的不对,应该是任意名称的函数均可,具体函数名可自定义(已测试)
@IBAction func XXXXXXXXX(segue: UIStoryboardSegue) {
}
@IBAction func XXXXXXXXX(segue: UIStoryboardSegue) {
}
2017-11-24
Xcode 9 需要这样写
@IBAction override func unwind(for unwindSegue: UIStoryboardSegue, towardsViewController subsequentVC: UIViewController) {
print("返回")
}
@IBAction override func unwind(for unwindSegue: UIStoryboardSegue, towardsViewController subsequentVC: UIViewController) {
print("返回")
}
2017-11-24
@IBOutlet weak var image: UIImageView!
var imageName:String?
override func viewDidLoad() {
super.viewDidLoad()
if imageName != nil{
image.image = UIImage(named:imageName!)
}
}
var imageName:String?
override func viewDidLoad() {
super.viewDidLoad()
if imageName != nil{
image.image = UIImage(named:imageName!)
}
}
2017-11-20
"\(name.text!), \(genderText),\(age!)岁,身高\(height.text!), \(hasRoomText)";要这样写,需加!获取text文本信息。
2017-10-24
let cell = tableView.dequeueReusableCellWithIdentifier("todoCell")!
2017-08-28
let cell = tableView.dequeueReusableCellWithIdentifier("todoCell") as!
2017-08-28