gpt4 book ai didi

ios - 快速将图像添加到工具栏?

转载 作者:行者123 更新时间:2023-11-28 13:39:49 24 4
gpt4 key购买 nike

我的问题类似于this但我只是想知道如何 swift 做到这一点。我想将 UIImageView 添加到工具栏。

最佳答案

let toolBar = UIToolbar()
let button = UIBarButtonItem(image: UIImage(named: "imageName"), style: .plain, target: self, action: #selector(buttonAction(_:)))
toolBar.items = [button]

关于ios - 快速将图像添加到工具栏?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56195287/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com