Ans*_*bal 5 icons svg glyphicons swift
我使用此代码,但没有显示图标,它显示我是这样的

medicalpacakgesbutton.setTitle("\u{f0c3}", for: .normal)
Run Code Online (Sandbox Code Playgroud)
在您的应用程序中使用 Font Awesome 的最佳方法是FontAwesome.Swift
按钮图标示例:
button.titleLabel?.font = UIFont.fontAwesome(ofSize: 30)
button.setTitle(String.fontAwesomeIcon(name: .coffee), for: .normal)
Run Code Online (Sandbox Code Playgroud)
或者对于标签栏图标:
let image = UIImage.fontAwesomeIcon(name: .coffee, textColor: UIColor.black, size: CGSize(width: 40, height: 40))
viewController.tabBarItem = UITabBarItem(title: "Coffee", image: image, tag: 1)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10506 次 |
| 最近记录: |