All Projects β†’ Vaberer β†’ Font Awesome Swift

Vaberer / Font Awesome Swift

Licence: mit
Font Awesome swift library for iOS.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Font Awesome Swift

rofi-fontawesome
fontawesome icon list for rofi dmenu
Stars: ✭ 58 (-92.19%)
Mutual labels:  font, icons, font-awesome, font-icons
Swifticons
🎒Swift Library for Font Icons - β˜… this library
Stars: ✭ 747 (+0.54%)
Mutual labels:  icons, font-awesome, font-icons
Vectoriconsroundup
A comparison between popular vectorial icon fonts
Stars: ✭ 126 (-83.04%)
Mutual labels:  icons, font-awesome, font-icons
Linearicons
Linearicons is the highest quality set of line icons, matching with minimalist UI designs in iOS.
Stars: ✭ 64 (-91.39%)
Mutual labels:  font, icons, font-icons
Iconfontcppheaders
C, C++ headers and C# classes for icon fonts: Font Awesome, Fork Awesome, Material Design, Kenney game icons and Fontaudio
Stars: ✭ 509 (-31.49%)
Mutual labels:  icons, font-awesome, font-icons
Alfred Font Awesome Workflow
🎩 Font Awesome workflow for Alfred
Stars: ✭ 714 (-3.9%)
Mutual labels:  font, icons, font-awesome
Font Awesome Php
A PHP library for Font Awesome 4.7.
Stars: ✭ 47 (-93.67%)
Mutual labels:  font, icons, font-awesome
Svelte Awesome
Awesome SVG icon component for Svelte JS, built with Font Awesome icons. Based on Justineo/vue-awesome
Stars: ✭ 193 (-74.02%)
Mutual labels:  font, icons, font-awesome
Imguifontstudio
Font Helper Gui Tool for programming
Stars: ✭ 149 (-79.95%)
Mutual labels:  font, font-awesome, font-icons
Font Awesome Scss
Font Awesome Scss Core (Unofficial)
Stars: ✭ 119 (-83.98%)
Mutual labels:  font, font-awesome, font-icons
Font Awesome Stylus
Stylus port for font-awesome 4.7.0
Stars: ✭ 77 (-89.64%)
Mutual labels:  font, icons, font-awesome
Swifticonfont
Icons fonts for iOS (Font Awesome 5, Iconic, Ionicon, Octicon, Themify, MapIcon, MaterialIcon, Foundation 3, Elegant Icon, Captain Icon)
Stars: ✭ 1,094 (+47.24%)
Mutual labels:  cocoapods, font, icons
Lgbutton
A fully customisable subclass of the native UIControl which allows you to create beautiful buttons without writing any line of code.
Stars: ✭ 2,216 (+198.25%)
Mutual labels:  xcode, font, font-icons
Glyphsearch
Search for icons from Font Awesome, Glyphicons, IcoMoon, Ionicons, and Octicons
Stars: ✭ 448 (-39.7%)
Mutual labels:  font, font-awesome
Dnspageview
δΈ€δΈͺηΊ― Swift ηš„θ½»ι‡ηΊ§γ€η΅ζ΄»δΈ”ζ˜“δΊŽδ½Ώη”¨ηš„ pageView
Stars: ✭ 461 (-37.95%)
Mutual labels:  xcode, cocoapods
Uitextfield Navigation
πŸ„β€β™‚οΈ UITextField-Navigation makes it easier to navigate between UITextFields and UITextViews
Stars: ✭ 436 (-41.32%)
Mutual labels:  xcode, cocoapods
Gedatsu
Gedatsu provide readable format about AutoLayout error console log
Stars: ✭ 464 (-37.55%)
Mutual labels:  xcode, cocoapods
Ttsegmentedcontrol
An elegant, animated and customizable segmented control for iOS created by Tapptitude
Stars: ✭ 471 (-36.61%)
Mutual labels:  xcode, cocoapods
Mbicons
MBIcons contains over 200 icons that can be resized to any dimensions as they are drawn using NSBezierPath.
Stars: ✭ 537 (-27.73%)
Mutual labels:  xcode, icons
Academicons
An icon font for academics
Stars: ✭ 541 (-27.19%)
Mutual labels:  font, icons

Font Awesome Swift

Font Awesome Swift

Follow me: @vaberer

I like β˜…. Do not forget to β˜… this super convenient library.

Added UISegmentedControl & UITabbarItem & UISlider & UIStepper & UITextField support!

Font 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.

Requirements

  • iOS 8.0+
  • Xcode 8

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

CocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command:

$ gem install cocoapods

To integrate Font Awesome Swift into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'Font-Awesome-Swift', '~> 1.7.2'

Then, run the following command:

$ pod install

Do not forget to import to your swift files where you want to use this library:

import Font_Awesome_Swift

Check branches swift-2.2, swift-2.3 or swift-3

Manually

  1. Copy FAIcon.swift and FontAwesome.ttf files into your project
  2. Check to import FontAwesome.ttf in project, "Project" > "Target" > "Copy Bundle Resources"

Usage

Super easy way how to add an icon.

UIImage

For Stacked images, please refer Stacked Icons

    UIImage.init(icon: .FATwitter, size: CGSize(width: 35, height: 35))
    
    // Change colors
    UIImage.init(icon: .FATwitter, size: CGSize(width: 35, height: 35), textColor: .red, backgroundColor: .black)
    
    // Stacked Images With Bigger Background
    UIImage.init(bgIcon: .FASquareO, bgTextColor: .white, topIcon: .FATwitter, topTextColor: .white, bgLarge: true)
    UIImage.init(bgIcon: .FACircle, bgTextColor: .black, topIcon: .FAFlag, topTextColor: .white, bgLarge: true)
    
    // Stacked Images With Smaller Background
    UIImage.init(bgIcon: .FACamera, bgTextColor: .black, topIcon: .FABan, topTextColor: .red, bgLarge: false)

    // Stacked Images With Bigger Background and Custom Size
    UIImage.init(bgIcon: .FASquare, bgTextColor: .black, topIcon: .FATerminal, topTextColor: .white, bgLarge: true, size: CGSize(width: 50, height: 50))

UIImageView

    imageView.setFAIconWithName(icon: .FATwitter, textColor: .blue, backgroundColor: .gray)

    imageView.setFAIconWithName(icon: .FATwitter, textColor: .blue)
    

UILabel

    labelName.FAIcon = .FAGithub

    labelName.setFAIcon(icon: .FAGithub, iconSize: 35)

    labelName.setFAText(prefixText: "follow me on ", icon: .FATwitter, postfixText: ". Thanks!", size: 25)

    // Bigger icon:
    labelName.setFAText(prefixText: "follow me on  ", icon: .FATwitter, postfixText: ". Thanks!", size: 25, iconSize: 30)

    labelName.setFAColor(.red)
    

UIButton

    buttonName.setFAIcon(icon: .FAGithub, forState: .normal)

    // Set icon size
    buttonName.setFAIcon(icon: .FAGithub, iconSize: 35, forState: .normal)

    buttonName.setFAText(prefixText: "follow me on ", icon: .FATwitter, postfixText: ". Thanks!", size: 25, forState: .normal)

    // Bigger icon
    buttonName.setFAText(prefixText: "follow me on ", icon: .FATwitter, postfixText: ". Thanks!", size: 25, forState: .normal, iconSize: 30)

    // Change color:
    buttonName.setFATitleColor(color: .red, forState: .normal))
    

UIBarButtonItem

    // Standard font size
    barName.FAIcon = .FAGithub

    // Custom font size
    barName.setFAIcon(icon: .FAGithub, iconSize: 35)

    barName.setFAText(prefixText: "follow me on ", icon: .FATwitter, postfixText: ". Thanks!", size: 25)

    barName.tintColor = .red

UITextField

    // Right View Icon
    textfield.setRightViewFAIcon(icon: .FASearch, rightViewMode: .always, textColor: .red, backgroundColor: .clear, size: nil)

    // Left View Icon
    textfield.setLeftViewFAIcon(icon: .FAPlus, leftViewMode: .always, textColor: .red, backgroundColor: .clear, size: nil)

UISegmentedControl

  segmentedControl.setFAIcon(icon: .FATwitter, forSegmentAtIndex: 0)
  

UIStepper

    stepper.setFABackgroundImage(icon: .FAGithub, forState: .normal)
    stepper.setFAIncrementImage(icon: .FABellO, forState: .normal)
    stepper.setFADecrementImage(icon: .FABellSlashO, forState: .normal)
    

UITabbarItem

  tabBarController?.tabBar.items?.first?.setFAIcon(.FATwitter)
  
  // Options to change selected and unselected color
  tabBarItem.setFAIcon(icon: .FATwitter, size: nil, textColor: .red, backgroundColor: .black, selectedTextColor: .yellow, selectedBackgroundColor: .white)
  
  // Options to change selected and unselected color with specific size
  tabBarItem.setFAIcon(icon: .FATwitter, size: CGSize(width: 35, height: 35), textColor: .red, backgroundColor: .black, selectedTextColor: .yellow, selectedBackgroundColor: .white)
  

UISlider

  // Change minimum or maximum value image
  slider.setFAMinimumValueImage(icon: .FABellSlashO)
  slider.setFAMaximumValueImage(icon: .FABellO)

  // change minimum or maximum value image with a specific size
  slider.setFAMinimumValueImage(icon: .FABellSlashO, customSize:  CGSize(width: 35, height: 35))
  slider.setFAMaximumValueImage(icon: .FABellO, customSize:  CGSize(width: 35, height: 35))
  

UIViewController

  // Change navigation title
  FATitle = .FATwitter
  

Author

Patrik Vaberer, [email protected]

Licence

Font Awesome Swift is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].