ЮП
Size: a a a
ЮП
AC
ВР
YB
YB
YB
t
func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .systemIndigo
let button = UIButton()
button.frame = CGRect(x:
self.view.frame.size.width - 230, y: 400, width: 50, height: 50)
button.backgroundColor = UIColor.brown
button.setTitle("Пост", for: .normal)
button.addTarget(
self, action:
#selector#selector(buttonAction), for: .touchUpInside)
self.view.addSubview(button)
}
@objc
func buttonAction(sender: UIButton!) {
let postviewcontroller = PostViewController()
let post: Post = Post(title: "Post")
postviewcontroller.title = post.title
self.navigationController?.pushViewController(postviewcontroller, animated:
true)
}
}
'''AB