按钮被卡在同一位置-快速

问题描述 投票:0回答:1

我想将按钮向左移动。每次我尝试将其向左拖动时,似乎都会将其移动,因为它刚刚重置。这在导航控制器中。预先谢谢你

swift xcode storyboard
1个回答
0
投票

[如果您尝试将新按钮拖动到导航控制器的左侧,请考虑使用Bar Button Item。如果要以编程方式执行此操作:navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(yourCustomMethod))

© www.soinside.com 2019 - 2024. All rights reserved.