To run the example project, clone the repo, and run pod install
from the Example directory first.
ZeroXmas is available through CocoaPods. To install
it, simply add the following line to your Podfile:
swift >= 4.2
pod 'ZeroXmas'
CONFIG |
|
import ZeroXmas
UIColor.zx.tint
UIColor.zx.subTint
UIColor.zx.background
UIColor.zx.border
UIColor.zx.empty
UIColor.zx.customA
UIColor.zx.customB
UIColor.zx.customC
ZXTintColorConfig.plist |
|
UIColor.zx.title
UIColor.zx.body
UIColor.zx.mark
UIFont.zx.titleFont()
UIFont.zx.markFont()
UIFont.zx.bodyFont()
//more:
UIFont.zx.bodyFont(18)
UIFont.zx.bodyFont(fix: -1)//size = ZXFontConfig.bodyFontSize - 1
UIFont.zx.bodyFont(fix: 1) //size = ZXFontConfig.bodyFontSize + 1
//iconFont
UIFont.zx.iconFont()
ZXFontConfig.plist |
|
ZXConfig.loadNavBarConfig()
self.zx.addNavBarButtonItems(textNames: ["关闭"], font: nil, color: UIColor.yellow, at: .left)
self.zx.addNavBarButtonItems(textNames: ["\u{e673}"], font: UIFont.zx.iconFont(30), color: UIColor.zx.subTint, at: .right, fixSpace: 5)
TEST |
|
ZXNavBarConfig.plist |
|
ZXConfig.loadTabBarConfig()
tabBar = UITabBarController()
tabBar.zx.addChild(T1ViewController(), fromPlistItemIndex: 0, imageAsTemplate: true)
tabBar.zx.addChild(T2ViewController(), fromPlistItemIndex: 1)
tabBar.zx.addChild(T3ViewController(), fromPlistItemIndex: 2)//showAsPresent
tabBar.zx.addChild(T4ViewController(), fromPlistItemIndex: 3, imageAsTemplate: true)
tabBar.zx.addChild(T5ViewController(), fromPlistItemIndex: 4, imageAsTemplate: true)
...
ZXTabBarConfig.plist |
|
ZXNetwork.async(...)
ZXNetwork.uploadImage(...)
ZXNetwork.fileupload(...)
Bundle
NSAttributedString
ReusableView
String
Timer
UIAlertController
...
extension ZeroXmas where Base: XXX {
static func sFunc() {}
func Func() {}
}
XXX.zx.sFunc()
XXX().zx.Func()
iFallen, hulj1204@yahoo.com
ZeroXmas is available under the MIT license. See the LICENSE file for more info.