[英]How to disable/enable a UIPanGestureRecognizer with two separate UIBarButtonItems?
[英]How to format two UIBarButtonItems next to each other on the right?
我正在尝试格式化两个 UIBarButtonItem,使它们在右上角彼此相邻。 我已经尝试过更改 UI 边缘插图,但它并没有真正移动图标。 当前 UI 栏的屏幕截图
lazy var profileButton = UIBarButtonItem(
image: UIImage(named: "account"),
style: .plain,
target: self,
action: #selector(displayAccountViewController(sender:))
)
lazy var followFriendsButton = UIBarButtonItem(
image: UIImage(named: "follow"),
style: .plain,
target: self,
action: #selector(displayFollowFriendsViewController(sender:))
)
override func viewDidLoad() {
super.viewDidLoad()
navigationItem.title = "Review Feed"
tableView.register(ReviewFeedCell.self, forCellReuseIdentifier: cellReuseIdentifier)
tableView.separatorStyle = .none
navigationItem.rightBarButtonItems = [profileButton, followFriendsButton]
NotificationCenter.default.addObserver(self, selector: #selector(loadData), name: ShowCollector.updateNotification, object: nil)
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.