又一款简单地去“刘海”方案工具类

16,437 阅读1分钟
原文链接: github.com

Swift CocoaPods

Hair Powder for iPhoneX "M" Shape pattern baldness design. I hate iPhone X design. It can be rejected if you use this open source(developer.apple.com/ios/human-i…). Use this If you don't care Guidelines

hairpowder

Install

CocoaPods

Add pod 'HairPowder' to your Podfile.

##Usage

1. add Status Bar style to info.plist

plist You also can put next code to info.plist directly

	<key>UIStatusBarStyle</key>
	<string>UIStatusBarStyleLightContent</string>
	<key>UIViewControllerBasedStatusBarAppearance</key>
	<false/>

2. Run Powder Code

You Only have to is putting import and spread() function.

import UIKit
import HairPowder

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
    var window: UIWindow?
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        HairPowder.instance.spread()
        return true
    }
}

LICENSE

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