1、UIButton的使用:
//创建
var push: UIButton!
2、添加点击事件:
//为按钮添加点击事件:
push.addTarget(self, action:#selector(pushNextController), for:.touchUpInside);
3、方法的实现:
@objc func pushNextController() -> Void {
let tmpSecondVC:SecondViewController = SecondViewController();
tmpSecondVC.delegate = self;
self.navigationController?.pushViewController(tmpSecondVC, animated: true)
}