{"id":2077,"url":"https://github.com/ranesr/SwiftIcons","last_synced_at":"2025-08-06T13:32:37.159Z","repository":{"id":16781150,"uuid":"80581591","full_name":"ranesr/SwiftIcons","owner":"ranesr","description":"🎢Swift Library for Font Icons - ★ this library","archived":false,"fork":false,"pushed_at":"2023-11-05T10:53:17.000Z","size":6627,"stargazers_count":804,"open_issues_count":26,"forks_count":108,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-12-01T01:03:48.171Z","etag":null,"topics":["dripicons","font-awesome","font-icons","fontawesome","fonts","google-material-icons","icofont","icons","ionic","ionicons","ios","linearicons","map-icon","material-icons","open-iconic","state-face","swift","swift5","ttf","weather-icons"],"latest_commit_sha":null,"homepage":"https://ranesr.github.io/SwiftIcons/","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/ranesr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-02-01T02:01:34.000Z","updated_at":"2024-11-07T16:09:13.000Z","dependencies_parsed_at":"2024-01-29T17:08:20.752Z","dependency_job_id":null,"html_url":"https://github.com/ranesr/SwiftIcons","commit_stats":{"total_commits":91,"total_committers":8,"mean_commits":11.375,"dds":"0.10989010989010994","last_synced_commit":"1b67ce246b9a7dca0a14c81eed4932986d9d0f52"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranesr%2FSwiftIcons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranesr%2FSwiftIcons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranesr%2FSwiftIcons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranesr%2FSwiftIcons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ranesr","download_url":"https://codeload.github.com/ranesr/SwiftIcons/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228682583,"owners_count":17956494,"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":["dripicons","font-awesome","font-icons","fontawesome","fonts","google-material-icons","icofont","icons","ionic","ionicons","ios","linearicons","map-icon","material-icons","open-iconic","state-face","swift","swift5","ttf","weather-icons"],"created_at":"2024-01-05T20:16:02.916Z","updated_at":"2024-12-09T14:30:59.661Z","avatar_url":"https://github.com/ranesr.png","language":"Swift","funding_links":["https://www.buymeacoffee.com/saurabhrrane"],"categories":["Text","Libs","Swift","Fonts [🔝](#readme)"],"sub_categories":["Font","Fonts","Other free courses"],"readme":"[![SwiftIcons](https://github.com/ranesr/SwiftIcons/raw/master/resources/logo.png)]()\n\n[![BuyMeACoffee](https://img.shields.io/badge/buy%20me%20a%20coffee-%E2%98%95%EF%B8%8F-917A01.svg)](https://www.buymeacoffee.com/saurabhrrane)\n\n[![CocoaPods](https://img.shields.io/cocoapods/v/SwiftIcons.svg)](https://cocoapods.org/pods/SwiftIcons) [![Platform](https://img.shields.io/cocoapods/p/SwiftIcons.svg)](http://cocoadocs.org/docsets/SwiftIcons) ![Swift](https://img.shields.io/badge/%20in-swift%205.0-orange.svg) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n[![Travis](https://img.shields.io/travis/ranesr/SwiftIcons.svg)](https://travis-ci.org/ranesr/SwiftIcons/) [![License](https://img.shields.io/cocoapods/l/SwiftIcons.svg?style=flat)](http://cocoapods.org/pods/SwiftIcons)\n\n## Swift Library for Font Icons\n\nPlease \u0026#9733; this library.\n\nNow, you don't have to download different libraries to include different font icons. This SwiftIcons library helps you use icons from any of the following font icons.\n\n* Dripicons\n* Emoji\n* FontAwesome\n* Icofont\n* Ionicons\n* Linearicons\n* Map-icons\n* Material icons\n* Open iconic\n* State face icons\n* Weather icons\n* TypIcons\n\nSwiftIcons supports different objects from the object library.\n\n* UIImage\n* UIImageView\n* UILabel\n* UIButton\n* UISegmentedControl\n* UITabBarItem\n* UISlider\n* UIBarButtonItem\n* UIViewController\n* UITextfield\n* UIStepper\n\n\n## Requirements\n\n- iOS 9.0+\n- Xcode 8\n\n\n## Installation\n\n### Cocoapods\n\n[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects.\n\nMake sure you have the latest version of CocoaPods by running:\n\n```bash\n$ gem install cocoapods\n# (or if the above fails)\n$ sudo gem install cocoapods\n```\n\nUpdate your local specs repo by running:\n\n```bash\n$ pod repo update\n```\n\nAdd the following lines to your `Podfile`:\n\n```ruby\ntarget 'YourProject' do\n    use_frameworks!\n    pod 'SwiftIcons', '~\u003e 3.0'\nend\n```\n\nThen run the following command\n\n```bash\n$ pod install\n```\n\nYou can start using the library by importing it wherever you want\n\n```swift\nimport SwiftIcons\n```\n\n### Carthage\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager for Cocoa projects.\n\nInstall the latest version of [Carthage](https://github.com/Carthage/Carthage#installing-carthage).\n\nAdd this line to your `Cartfile`:\n\n```\ngithub \"ranesr/SwiftIcons\" ~\u003e 3.0\n```\n\nor for `master`,\n\n```\ngithub \"ranesr/SwiftIcons\" \"master\"\n```\n\nThen run `carthage update --platform ios` and add the built framework to your project by following [these instructions from Carthage](https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos).\n\n### Manually\n\nCopy all the files from `Source` folder.\n[Link to files](https://github.com/ranesr/SwiftIcons/tree/master/Source).\n\n- SwiftIcons.swift\n- Dripicons.ttf\n- Emoji.ttf\n- FontAwesomeBrands.ttf\n- FontAwesomeRegular.ttf\n- FontAwesomeSolid.ttf\n- Icofont.ttf\n- Ionicons.ttf\n- Linearicons.ttf\n- MapIcons.ttf\n- MaterialIcons.ttf\n- OpenIconic.ttf\n- Stateface.ttf\n- WeatherIcons.ttf\n- TypIcons.ttf\n\nCheck to import all ttf files in project, \"Project\" \u003e \"Target\" \u003e \"Copy Bundle Resources\"\n\n\n## Library Reference\n\nYou can check library reference documentation [here](http://cocoadocs.org/docsets/SwiftIcons/).\n\n## Usage\n\n- No more image icons any more\n\nThere are different font types for each of the font icons\n\n| Font Icons       | Version    | Font Types           | Icons                                               |\n|:----------------:|:----------:|:--------------------:|:---------------------------------------------------:|\n| Dripicons        | 2.0        | dripicons            | [dripicons](https://github.com/amitjakhu/dripicons) |\n| Emoji            |            | emoji                | [emoji](http://jslegers.github.io/emoji-icon-font/) |\n| FontAwesome      | 5.1.0      | fontAwesome          | [fontAwesome](https://fontawesome.com/icons?d=gallery\u0026m=free)         |\n| Icofont          | 1.0.0 Beta | icofont              | [icofont](http://icofont.com)                       |\n| Ionicons         | 2.0.1      | ionicons             | [ionicons](http://ionicons.com/)                    |\n| Linearicons      | 1.0.0      | linearIcons          | [linearIcons](https://linearicons.com/free)         |\n| Map-icons        | 3.0.2      | mapicons             | [mapicons](http://map-icons.com/)                   |\n| Material icons   | 2.2.0      | googleMaterialDesign | [googleMaterialDesign](https://material.io/icons/)  |\n| Open iconic      | 1.1.1      | openIconic           | [openIconic](https://useiconic.com/open)            |\n| State face icons |            | state                | [state](http://propublica.github.io/stateface/)     |\n| Weather icons    | 2.0.10     | weather              | [weather](http://weathericons.io/)                  |\n| TypIcons         | 2.0.7      | TypIcons             | [Typicons](https://www.s-ings.com/typicons/)        |\n\n\nWhen setting an icon to any object, you have to mention which font type it is and then select which icon you want to set from that particular font icon.\n\n\n### UIImage\n\n```Swift\nimport SwiftIcons\n\nUIImage.init(icon: .emoji(.airplane), size: CGSize(width: 35, height: 35))\n\n// Icon with colors\nUIImage.init(icon: .emoji(.airplane), size: CGSize(width: 35, height: 35), textColor: .red)\nUIImage.init(icon: .emoji(.airplane), size: CGSize(width: 35, height: 35), textColor: .white, backgroundColor: .red)\n\n// Stacked icons with bigger background\nUIImage.init(bgIcon: .fontAwesomeRegular(.circle), topIcon: .fontAwesomeRegular(.square))\n\n// Stacked icons with smaller background\nUIImage.init(bgIcon: .fontAwesomeSolid(.camera), topIcon: .fontAwesomeSolid(.ban), topTextColor: .red, bgLarge: false)\n\n// Stacked icons with custom size\nUIImage.init(bgIcon: .fontAwesomeSolid(.camera), topIcon: .fontAwesomeSolid(.ban), topTextColor: .red, bgLarge: false, size: CGSize(width: 50, height: 50))\n\n```\n\n\n### UIImageView\n\n```Swift\nimport SwiftIcons\n\n// Setting icon to image view\nimageView.setIcon(icon: .weather(.rainMix))\n\n// Icon with colors\nimageView.setIcon(icon: .mapicons(.amusementPark), textColor: .white, backgroundColor: .blue, size: nil)\n\n```\n\n\n### UILabel\n\n```Swift\nimport SwiftIcons\n\n// Setting icon to label\nlabel.setIcon(icon: .ionicons(.paintbrush), iconSize: 70)\n\n// Icon with colors\nlabel.setIcon(icon: .googleMaterialDesign(.rowing), iconSize: 70, color: .white, bgColor: textColor)\n\n// Icon with text around it\nlabel.setIcon(prefixText: \"Bus \", icon: .linearIcons(.bus), postfixText: \" icon\", size: 20)\n\n// Icon with color \u0026 colored text around it\nlabel.setIcon(prefixText: \"Medal \", prefixTextColor: .red, icon: .ionicons(.ribbonA), iconColor: .red, postfixText: \"\", postfixTextColor: .red, size: nil, iconSize: 40)\n\n// Icon with text with different fonts around it\nlabel.setIcon(prefixText: \"Font \", prefixTextFont: font1!, icon: .fontAwesomeSolid(.font), postfixText: \" icon\", postfixTextFont: font2!)\n\n// Icon with text with different fonts \u0026 colors around it\nlabel.setIcon(prefixText: \"Bike \", prefixTextFont: font1!, prefixTextColor: .red, icon: .mapicons(.bicycling), iconColor: textColor, postfixText: \" icon\", postfixTextFont: font2!, postfixTextColor: .blue, iconSize: 30)\n\n```\n\n\n### UIButton\n\n```Swift\nimport SwiftIcons\n\n// Setting icon to button\nbutton.setIcon(icon: .linearIcons(.phone), forState: .normal)\n\n// Icon with size and color\nbutton.setIcon(icon: .openIconic(.clipboard), iconSize: 70, color: .blue, forState: .normal)\n\n// Icon with text around it\nbutton.setIcon(prefixText: \"Please \", icon: .googleMaterialDesign(.print), postfixText: \" print\", forState: .normal)\n\n// Icon with color \u0026 colored text around it\nbutton.setIcon(prefixText: \"Lock \", prefixTextColor: .red, icon: .googleMaterialDesign(.lock), iconColor: .yellow, postfixText: \" icon\", postfixTextColor: .blue, forState: .normal, textSize: 15, iconSize: 20)\n\n// Icon with text with different fonts around it\nbutton.setIcon(prefixText: \"Happy \", prefixTextFont: font1!, icon: .ionicons(.happy), postfixText: \" face\", postfixTextFont: font2!, forState: .normal)\n\n// Icon with text with different fonts \u0026 colors around it\nbutton.setIcon(prefixText: \"Pulse \", prefixTextFont: font1!, prefixTextColor: .darkGray, icon: .openIconic(.pulse), iconColor: .red, postfixText: \" icon\", postfixTextFont: font2!, postfixTextColor: .purple, forState: .normal, iconSize: 40)\n\n// Icon with title below icon\nbutton.setIcon(icon: .emoji(.ferrisWheel), title: \"Ferris Wheel\", color: .red, forState: .normal)\n\n// Icon with title below icon with different color \u0026 custom font\nbutton.setIcon(icon: .weather(.rainMix), iconColor: .yellow, title: \"RAIN MIX\", titleColor: .red, font: font!, backgroundColor: .clear, borderSize: 1, borderColor: .green, forState: .normal)\n\n```\n\n\n### UISegmentedControl\n\n```Swift\nimport SwiftIcons\n\n// Setting icon at particular index\nsegmentedControl.setIcon(icon: .linearIcons(.thumbsUp), forSegmentAtIndex: 0)\nsegmentedControl.setIcon(icon: .linearIcons(.thumbsDown), forSegmentAtIndex: 1)\n\n// Icons with sizes \u0026 colors\nsegmentedControl.setIcon(icon: .fontAwesomeSolid(.male), color: .red, iconSize: 50, forSegmentAtIndex: 0)\nsegmentedControl.setIcon(icon: .fontAwesomeSolid(.female), color: .purple, iconSize: 50, forSegmentAtIndex: 1)\n\n```\n\n\n### UITabBarItem\n\n```Swift\nimport SwiftIcons\n\n// Setting icon to tab bar item\ntabBar.items?[0].setIcon(icon: .fontAwesomeSolid(.font), size: nil, textColor: .lightGray)\n\n// Stacked icons for tab bar item\ntabBar.items?[1].setIcon(bgIcon: .fontAwesomeRegular(.circle), bgTextColor: .lightGray, topIcon: .fontAwesomeSolid(.square), topTextColor: .lightGray, bgLarge: true, size: nil)\n\n```\n\n\n### UISlider\n\n```Swift\nimport SwiftIcons\n\n// Change minimum \u0026 maximum value icons\nslider.setMaximumValueIcon(icon: .emoji(.digitNine))\nslider.setMinimumValueIcon(icon: .emoji(.digitZero))\n\n// Change minimum \u0026 maximum value icons with colors\nslider.setMaximumValueIcon(icon: .linearIcons(.pointerUp), customSize: nil, textColor: .red, backgroundColor: .clear)\nslider.setMinimumValueIcon(icon: .linearIcons(.pointerDown), customSize: nil, textColor: .blue, backgroundColor: .clear)\n\n```\n\n\n### UIBarButtonItem\n\n```Swift\nimport SwiftIcons\n\n// Setting icon to bar button item\nbarButtonItem.setIcon(icon: .ionicons(.iosFootball), iconSize: 30)\n\n// Icon with colors\nbarButtonItem.setIcon(icon: .ionicons(.iosFootball), iconSize: 30, color: textColor)\n\n// Icon with custom cgRect\nbarButtonItem.setIcon(icon: .ionicons(.iosFootball), iconSize: 30, color: textColor, cgRect: CGRect(x: 0, y: 0, width: 30, height: 30), target: self, action: #selector(barButtonItem(sender:)))\n\n// Icon with text around it\nbarButtonItem.setIcon(prefixText: \"Please \", icon: .ionicons(.iosDownload), postfixText: \" download\", cgRect: CGRect(x: 0, y: 0, width: 30, height: 30), size: 23, target: self, action: #selector(barButtonItem(sender:)))\n\n// Icon with color \u0026 colored text around it\nbarButtonItem.setIcon(prefixText: \"Blue \", prefixTextColor: .red, icon: .ionicons(.iosFootball), iconColor: .blue, postfixText: \" football\", postfixTextColor: .green, cgRect: CGRect(x: 0, y: 0, width: 30, height: 30), size: 20, iconSize: 30, target: self, action: #selector(barButtonItem(sender:)))\n\n// Icon with text with different fonts around it\nbarButtonItem.setIcon(prefixText: \"Digit \", prefixTextFont: font1!, icon: .emoji(.digitOne), postfixText: \" One\", postfixTextFont: font2!, cgRect: CGRect(x: 0, y: 0, width: 30, height: 30), target: self, action: #selector(barButtonItem(sender:)))\n\n// Icon with text with different fonts \u0026 colors around it\nbarButtonItem.setIcon(prefixText: \"\", prefixTextFont: font1!, prefixTextColor: .red, icon: .ionicons(.iosFootball), iconColor: .blue, postfixText: \" football\", postfixTextFont: font2!, postfixTextColor: .green, cgRect: CGRect(x: 0, y: 0, width: 30, height: 30), iconSize: 24, target: self, action: #selector(barButtonItem(sender:)))\n\n```\n\n\n### UIViewController\n\n```Swift\nimport SwiftIcons\n\n// Setting icon to the title\nself.setTitleIcon(icon: .emoji(.animalHorse), iconSize: 30, color: .red)\n\n```\n\n\n### UITextfield\n\n```Swift\nimport SwiftIcons\n\n// Setting left view icon\ntextfield.setLeftViewIcon(icon: .fontAwesomeSolid(.search))\n\n// Left view icon with colors \u0026 leftViewMode\ntextfield.setLeftViewIcon(icon: .state(.TX), leftViewMode: .always, textColor: .blue, backgroundColor: .clear, size: nil)\ntextfield.setLeftViewIcon(icon: .googleMaterialDesign(.plusOne), leftViewMode: .unlessEditing, textColor: .green, backgroundColor: .clear, size: nil)\n\n// Setting right view icon\ntextfield.setRightViewIcon(icon: .openIconic(.questionMark))\n\n// Right view icon with colors \u0026 rightViewMode\ntextfield.setRightViewIcon(icon: .weather(.rainMix), rightViewMode: .always, textColor: .red, backgroundColor: .clear, size: nil)\n\n```\n\n\n### UIStepper\n\n```Swift\nimport SwiftIcons\n\n// Setting icons\nstepper.setDecrementIcon(icon: .ionicons(.iosPause), forState: .normal)\nstepper.setIncrementIcon(icon: .ionicons(.iosPlay), forState: .normal)\n\n```\n\n\n## Examples\n\nPlease check out the [SwiftIcons App](https://github.com/ranesr/SwiftIcons/tree/master/SwiftIconsApp). In the demo project, if you click on any object, you will see the method description in the logs for the icon of that object.\n\n\n## SwiftIcons Mentions \u0026 Usage\n\n- [Fabcoding Article](http://fabcoding.com/curved-tabbar-with-a-round-middle-button/) by Zeba Rahman, same content in Medium post: [Fabcoding Medium Post](https://medium.com/fabcoding/curved-tabbar-with-a-round-middle-button-swift-6f2f10aff8bd)\n- [Classmate](https://github.com/raheelshah31/Classmate) by Raheel Shah\n- [Open Source Projects](https://www.findbestopensource.com/product/ranesr-swifticons), Collection of open source projects\n- [Mention on Awesome iOS](http://awesomeios.com/), A curated list of awesome iOS ecosystem\n- [Medium Article on Storyboard](https://medium.com/@malcolmcollin/look-mom-no-storyboard-1e721101c29f) by Malcolm Kumwenda\n  - Sentence used in the article: **This is literally the only place that I made use of the SwiftIcons library but I thought it would be beneficial to show off a cool library that makes working with icons absolutely awesome.**\n\nIf you are using SwiftIcons in your app and want to be listed here, simply create a new issue [here](https://github.com/ranesr/SwiftIcons/issues/new).\n\nI am always curious who is using my projects \u0026#x1f60a;\n\n\n## Author\n\n**Saurabh Rane**\n\n- [Email](mailto:saurabhrrane@gmail.com)\n- [LinkedIn](https://linkedin.com/in/ranesaurabh)\n\nSpecial thanks to [Patrik Vaberer](https://github.com/Vaberer) and his initial work on [Font-Awesome-Swift](https://github.com/Vaberer/Font-Awesome-Swift) library\n\n\n## Licence\n\nSwiftIcons 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%2Franesr%2FSwiftIcons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Franesr%2FSwiftIcons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franesr%2FSwiftIcons/lists"}