文件名称:ios-新特性引导页.zip
文件大小:167KB
文件格式:ZIP
更新时间:2022-07-31 13:46:26
滚动视图
YSNewFeature文件夹:控件所在位置,使用时直接拖入工程即可。 使用方法,异常简单(代码过于简单,不再做解释): 修改:Appdelegate的didFinishLaunchingWithOptions方法: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { window = UIWindow(frame: UIScreen.main.bounds) if !UserDefaults.standard.bool(forKey: "alreadyUsedApp"){ // 未使用过App,首次使用 let images:[UIImage] = [UIImage(named:"1")!,UIImage(named:"2")!] let rootVC = YSNewFeature(frame: window!.bounds, images: images, completion: { UserDefaults.standard.set(true, forKey: "alreadyUsedApp") self.window?.rootViewController = ViewController() }) window?.rootViewController = rootVC } else{ window?.rootViewController = ViewController() } window?.makeKeyAndVisible() return true }
【文件预览】:
YSNewFeature
----YSNewFeature()
--------ViewController.swift(476B)
--------Assets.xcassets()
--------YSNewFeature()
--------Base.lproj()
--------.DS_Store(6KB)
--------AppDelegate.swift(3KB)
--------Info.plist(1KB)
----.DS_Store(6KB)
----YSNewFeature.xcodeproj()
--------project.xcworkspace()
--------project.pbxproj(12KB)
--------xcuserdata()