Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
UIButton:buttonWithType:我知道如何使用和UIBarButtonItem:initWithCustomView:提供UIButton:buttonWithType参数以编程方式创建工具栏按钮UIButtonTypeInfoLight。
UIButton:buttonWithType:
UIBarButtonItem:initWithCustomView:
UIButton:buttonWithType
UIButtonTypeInfoLight
我真正想做的是将系统按钮拖到通用 barbuttonitem 上以获取信息按钮。在界面生成器中。这是一个人可以做的事情,还是我应该站起来编写代码?
尝试这个...
let infoButton = UIButton.init( type: .infoLight ) let infoBarButtonItem = UIBarButtonItem.init( image: infoButton.image( for: .normal ), style: .plain, target: self, action: #selector( infoBarButtonItemTouched ) )