{"id":2078,"url":"https://github.com/Vaberer/Font-Awesome-Swift","last_synced_at":"2025-08-02T23:31:29.145Z","repository":{"id":34987967,"uuid":"39073782","full_name":"Vaberer/Font-Awesome-Swift","owner":"Vaberer","description":"Font Awesome swift library for iOS. ","archived":false,"fork":false,"pushed_at":"2020-07-20T22:30:08.000Z","size":839,"stargazers_count":743,"open_issues_count":18,"forks_count":125,"subscribers_count":28,"default_branch":"master","last_synced_at":"2024-10-29T21:04:35.844Z","etag":null,"topics":["cocoapods","font","font-awesome","font-icons","icons","ios","swift","swift-3","swift-library","xcode"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vaberer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-14T12:34:20.000Z","updated_at":"2024-09-18T13:12:03.000Z","dependencies_parsed_at":"2022-08-21T03:20:16.965Z","dependency_job_id":null,"html_url":"https://github.com/Vaberer/Font-Awesome-Swift","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vaberer%2FFont-Awesome-Swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vaberer%2FFont-Awesome-Swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vaberer%2FFont-Awesome-Swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vaberer%2FFont-Awesome-Swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vaberer","download_url":"https://codeload.github.com/Vaberer/Font-Awesome-Swift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503092,"owners_count":17930509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cocoapods","font","font-awesome","font-icons","icons","ios","swift","swift-3","swift-library","xcode"],"created_at":"2024-01-05T20:16:02.945Z","updated_at":"2024-12-06T17:30:34.096Z","avatar_url":"https://github.com/Vaberer.png","language":"Swift","funding_links":[],"categories":["Text","Swift"],"sub_categories":["Font","Other free courses"],"readme":"# Font Awesome Swift\n![Font Awesome Swift](https://github.com/Vaberer/Font-Awesome-Swift/blob/master/resources/opensource_matters.png)\n\nFollow me: [@vaberer](https://twitter.com/vaberer)\n\nI like \u0026#9733;. Do not forget to \u0026#9733; this super convenient library.\n\n## Added ```UISegmentedControl``` \u0026 ```UITabbarItem``` \u0026 ```UISlider``` \u0026 ```UIStepper``` \u0026 ```UITextField``` support!\n\n\nFont Awesome swift library for iOS. No image icons any more. Using Font Awesome Swift library is very easy to use. Look at the demo app which shows all icons and their names or just visit [FontAwesome](http://fortawesome.github.io/Font-Awesome/icons/).\n\n\n\u003cp align=\"center\"\u003e\n  \u003cimg height=\"480\" src=\"https://github.com/Vaberer/Font-Awesome-Swift/blob/master/resources/image1.png\"/\u003e\n\u003c/p\u003e\n\n## Requirements\n\n- iOS 8.0+\n- Xcode 8\n\n## Installation\n\n### CocoaPods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects.\n\nCocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\nTo integrate Font Awesome Swift into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '8.0'\nuse_frameworks!\n\npod 'Font-Awesome-Swift', '~\u003e 1.7.2'\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\nDo not forget to import to your swift files where you want to use this library:\n```swift\nimport Font_Awesome_Swift\n```\n\nCheck branches `swift-2.2`, `swift-2.3` or `swift-3`\n\n### Manually\n\n1. Copy `FAIcon.swift` and `FontAwesome.ttf` files into your project\n2. Check to import `FontAwesome.ttf` in project, \"Project\" \u003e \"Target\" \u003e \"Copy Bundle Resources\"\n\n\n## Usage\n\nSuper easy way how to add an icon.\n\u003cp align=\"center\"\u003e\n  \u003cimg height=\"200\" src=\"https://github.com/Vaberer/Font-Awesome-Swift/blob/master/resources/helper.png\"/\u003e\n\u003c/p\u003e\n\n\n### UIImage\nFor Stacked images, please refer [Stacked Icons](http://fontawesome.io/examples/#stacked)\n```Swift\n    UIImage.init(icon: .FATwitter, size: CGSize(width: 35, height: 35))\n    \n    // Change colors\n    UIImage.init(icon: .FATwitter, size: CGSize(width: 35, height: 35), textColor: .red, backgroundColor: .black)\n    \n    // Stacked Images With Bigger Background\n    UIImage.init(bgIcon: .FASquareO, bgTextColor: .white, topIcon: .FATwitter, topTextColor: .white, bgLarge: true)\n    UIImage.init(bgIcon: .FACircle, bgTextColor: .black, topIcon: .FAFlag, topTextColor: .white, bgLarge: true)\n    \n    // Stacked Images With Smaller Background\n    UIImage.init(bgIcon: .FACamera, bgTextColor: .black, topIcon: .FABan, topTextColor: .red, bgLarge: false)\n\n    // Stacked Images With Bigger Background and Custom Size\n    UIImage.init(bgIcon: .FASquare, bgTextColor: .black, topIcon: .FATerminal, topTextColor: .white, bgLarge: true, size: CGSize(width: 50, height: 50))\n\n```\n\n\n### UIImageView\n```Swift\n    imageView.setFAIconWithName(icon: .FATwitter, textColor: .blue, backgroundColor: .gray)\n\n    imageView.setFAIconWithName(icon: .FATwitter, textColor: .blue)\n    \n```\n\n\n### UILabel\n```Swift\n    labelName.FAIcon = .FAGithub\n\n    labelName.setFAIcon(icon: .FAGithub, iconSize: 35)\n\n    labelName.setFAText(prefixText: \"follow me on \", icon: .FATwitter, postfixText: \". Thanks!\", size: 25)\n\n    // Bigger icon:\n    labelName.setFAText(prefixText: \"follow me on  \", icon: .FATwitter, postfixText: \". Thanks!\", size: 25, iconSize: 30)\n\n    labelName.setFAColor(.red)\n    \n```\n\n\n### UIButton\n```Swift\n    buttonName.setFAIcon(icon: .FAGithub, forState: .normal)\n\n    // Set icon size\n    buttonName.setFAIcon(icon: .FAGithub, iconSize: 35, forState: .normal)\n\n    buttonName.setFAText(prefixText: \"follow me on \", icon: .FATwitter, postfixText: \". Thanks!\", size: 25, forState: .normal)\n\n    // Bigger icon\n    buttonName.setFAText(prefixText: \"follow me on \", icon: .FATwitter, postfixText: \". Thanks!\", size: 25, forState: .normal, iconSize: 30)\n\n    // Change color:\n    buttonName.setFATitleColor(color: .red, forState: .normal))\n    \n```\n\n\n### UIBarButtonItem\n```Swift\n    // Standard font size\n    barName.FAIcon = .FAGithub\n\n    // Custom font size\n    barName.setFAIcon(icon: .FAGithub, iconSize: 35)\n\n    barName.setFAText(prefixText: \"follow me on \", icon: .FATwitter, postfixText: \". Thanks!\", size: 25)\n\n    barName.tintColor = .red\n\n```\n\n\n### UITextField\n```Swift\n    // Right View Icon\n    textfield.setRightViewFAIcon(icon: .FASearch, rightViewMode: .always, textColor: .red, backgroundColor: .clear, size: nil)\n\n    // Left View Icon\n    textfield.setLeftViewFAIcon(icon: .FAPlus, leftViewMode: .always, textColor: .red, backgroundColor: .clear, size: nil)\n\n```\n\n\n### UISegmentedControl\n```Swift\n  segmentedControl.setFAIcon(icon: .FATwitter, forSegmentAtIndex: 0)\n  \n```\n\n\n### UIStepper\n```Swift\n    stepper.setFABackgroundImage(icon: .FAGithub, forState: .normal)\n    stepper.setFAIncrementImage(icon: .FABellO, forState: .normal)\n    stepper.setFADecrementImage(icon: .FABellSlashO, forState: .normal)\n    \n\n```\n\n\n### UITabbarItem\n```Swift\n  tabBarController?.tabBar.items?.first?.setFAIcon(.FATwitter)\n  \n  // Options to change selected and unselected color\n  tabBarItem.setFAIcon(icon: .FATwitter, size: nil, textColor: .red, backgroundColor: .black, selectedTextColor: .yellow, selectedBackgroundColor: .white)\n  \n  // Options to change selected and unselected color with specific size\n  tabBarItem.setFAIcon(icon: .FATwitter, size: CGSize(width: 35, height: 35), textColor: .red, backgroundColor: .black, selectedTextColor: .yellow, selectedBackgroundColor: .white)\n  \n```\n\n\n### UISlider\n```Swift\n  // Change minimum or maximum value image\n  slider.setFAMinimumValueImage(icon: .FABellSlashO)\n  slider.setFAMaximumValueImage(icon: .FABellO)\n\n  // change minimum or maximum value image with a specific size\n  slider.setFAMinimumValueImage(icon: .FABellSlashO, customSize:  CGSize(width: 35, height: 35))\n  slider.setFAMaximumValueImage(icon: .FABellO, customSize:  CGSize(width: 35, height: 35))\n  \n```\n\n\n### UIViewController\n```Swift\n  // Change navigation title\n  FATitle = .FATwitter\n  \n```\n\n\n## Author\n\nPatrik Vaberer, patrik@toptal.com\n\n- [LinkedIn](https://www.linkedin.com/in/vaberer)\n- [@vaberer](https://twitter.com/vaberer)\n- [Blog](http://vaberer.com)\n\n### Licence\n\nFont Awesome Swift is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVaberer%2FFont-Awesome-Swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVaberer%2FFont-Awesome-Swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVaberer%2FFont-Awesome-Swift/lists"}