我不想使用自定义图像,因为结果不是很好.我想使用Apple“信息”按钮.
我正在使用Swift.
谢谢.
UIBarButtonItem
APIs创建这样的条形按钮.
您可以使用配置了.InfoLight UIButton的自定义视图,如建议的here:
// Create the info button let infoButton = UIButton(type: .infoLight) // You will need to configure the target action for the button itself,not the bar button itemr infoButton.addTarget(self,action: #selector(getInfoAction),for: .touchUpInside) // Create a bar button item using the info button as its custom view let infoBarButtonItem = UIBarButtonItem(customView: infoButton) // Use it as required navigationItem.rightBarButtonItem = infoBarButtonItem
如果您需要更多帮助,请随时发表评论.