FlagKits 1.0.1

FlagKits 1.0.1

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jun 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by NguyenMinh.



 
Depends on:
Reusable>= 0
libPhoneNumber-iOS>= 0
 


FlagKits 1.0.1

  • By
  • NguyenMinh

LAM GIAU KHONG KHO TEAM

FlagKits

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS: 9.0

Usage

  • Set custom class with FKFlagHolderView on IB Design or create instance of FKFlagHolderView by code.
<p><a href="Screen_Shot_1.jpg" target="_blank"><img src="Screen_Shot_1.jpg" width="200" alt="Set custom class: FKFlagHolderView" style="max-width:100%;"></a></p>
  • Set background color for picker view:
@IBOutlet weak var holder: FKFlagHolderView!

// Set background color for picker view
holder.backgroundPickerColor = .white
  • Get flag image:
if let flagSheet = FKIcons.sharedInstance.spriteSheet {
    let image = flagSheet.getImageFor(code)
    btnFlag.setImage(image, for: .normal)
}

Installation

Manually as Embedded Framework

  • Clone FlagKits as a git submodule by running the following command from your project root git folder.
$ git submodule add https://github.com/LGKKTeam/FlagKits.git
  • Open FlagKits folder that was created by the previous git submodule command and drag the FlagKits.xcodeproj into the Project Navigator of your application’s Xcode project.

  • Select the FlagKits.xcodeproj in the Project Navigator and verify the deployment target matches with your application deployment target.

  • Select your project in the Xcode Navigation and then select your application target from the sidebar. Next select the “General” tab and click on the + button under the “Embedded Binaries” section.

  • Select FlagKits.framework and we are done!

Getting involved

  • If you want to contribute please feel free to submit pull requests.
  • If you have a feature request please open an issue.
  • If you found a bug check older issues before submitting an issue.
  • If you need help or would like to ask general question, feel free contact with me via email

Author

License

FlagKits is available under the MIT license. See the LICENSE file for more info.