https://github.com/tidwall/ioniconsswift
Ionicons for Swift and iOS
https://github.com/tidwall/ioniconsswift
Last synced: 9 months ago
JSON representation
Ionicons for Swift and iOS
- Host: GitHub
- URL: https://github.com/tidwall/ioniconsswift
- Owner: tidwall
- License: mit
- Created: 2015-06-09T17:30:50.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-10-03T17:29:34.000Z (over 6 years ago)
- Last Synced: 2025-04-05T03:12:05.937Z (9 months ago)
- Language: Swift
- Homepage:
- Size: 164 KB
- Stars: 29
- Watchers: 4
- Forks: 28
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IoniconsSwift
[Ionicons](http://ionicons.com/) integration for Swift and iOS.
**Built for Swift 4.0** - for older versions of swift please use the `swift\1.2`, `swift\2.0`, and `swift\3.0` branches.
## Features
- Includes all *732* icons.
- Tiny API, just one `enum` type and two methods.
- All icons are always balanced and squared.
- Generate icons as `UIImage` or `UILabel`
## Installation
[Carthage](https://github.com/Carthage/Carthage): Add `github tidwall/IoniconsSwift` to your `Cartfile`.
[CocoaPods](https://cocoapods.org): Add `pod 'IoniconsSwift', :git => 'http://github.com/tidwall/IoniconsSwift.git', :branch => 'master'` to your `Podfile`.
## Example
```swift
import IoniconsSwift
// Square UIImage of an icon.
let image = Ionicons.alert.image(35)
let image = Ionicons.iosClock.image(35, color: UIColor.greenColor())
// Square UILabel
let label = Ionicons.alert.label(35)
let label = Ionicons.iosClock.label(35, color: UIColor.greenColor())
```
## Contact
Josh Baker [@tidwall](http://twitter.com/tidwall)
## License
The IoniconsSwift source code is available under the MIT License.