madebybowtie/FlagKit
madebybowtie/FlagKit has 3,106 GitHub stars and 329 forks. GitHot measured 0 stars in 24 hours, -1 in 7 days, and -1 in 15 days. Last checked 2026-11-23 21:36 UTC. Last push 2026-09-25.
实测星标增长
- 24小时
- 0
- 7天
- -1
- 15天
- -1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
关于
适用于应用和网页的精美旗帜图标。
网站与应用README.md
原文
FlagKit
Beautiful flag icons for usage in apps and on the web. All flags are provided as stand-alone PNG and SVG files. FlagKit also provides an Asset Catalog and framework for easy use on Apple platforms.
Installation (iOS, macOS, tvOS)
FlagKit provides a framework for easy installation as a dependency. You can also manually copy the Asset Catalog into your project.
SwiftPM
Add the folowinig as repository URL:
https://github.com/madebybowtie/FlagKit.git
Carthage
Add the following line to your Cartfile:
github "madebybowtie/FlagKit"
Manual
Add Assets/FlagKit.xcassets to your target.
Usage (iOS, macOS, tvOS)
FlagKit provides both rectangular unstyled flags and styled flags in a variety of shapes. Our sample project demonstrates how to display flags and customize them into different shapes (rounded corners, square, circle).
Note: Styling is currently not supported by FlagKit on macOS
This brief example loads the flag for the users current locale, and retrieves the unstyled flag and a styled flag:
let countryCode = Locale.current.regionCode!
let flag = Flag(countryCode: countryCode)!
// Retrieve the unstyled image for customized use
let originalImage = flag.originalImage
// Or retrieve a styled flag
let styledImage = flag.image(style: .circle)
You can always access the underlying assets directly, through the bundled Asset Catalog:
let countryCode = Locale.current.regionCode!
let bundle = FlagKit.assetBundle
let originalImage = UIImage(named: countryCode, in: bundle, compatibleWith: nil)
Reference
FlagKit provides over 250 flags. A list of all flags can be found here.
More Info
Have a question? Please open an issue!
License
FlagKit is released under the MIT license. See LICENSE.
探索相关项目
加载中…