引导页
实现原理: 通过为Appdelegate添加分类, 在分类中添加guideWindow属性并交换“`func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
效果图
![引导页.gif](http://upload-images.jianshu.io/upload_images/1684666-af637cd9a6d76afc.gif?imageMogr2/auto-orient/strip)
####1.Appdelegate添加guaidWindow属性
private struct AssociatedKeys {
static var guideWindowKey = “guideWindowKey”
}
private var guaidWindow: UIWindow? {
get {
return objc_getAssociatedObject(self, &AssociatedKeys.guideWindowKey) as? UIWindow
}
set {
if newValue != nil {
objc_setAssociatedObject(self, &AssociatedKeys.guideWindowKey, newValue, .OBJC_ASSOCIATIO