上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 29 下一页
摘要: 参考自:http://www.voidcn.com/article/p-rummufan-cn.html Xib import UIKit class CustomXibView: UIView { @IBOutlet weak var nameTF: UITextField! @IBOutlet 阅读全文
posted @ 2020-05-11 15:32 liuw_flexi 阅读(2076) 评论(0) 推荐(0) 编辑
摘要: 要实现后台播放的功能,在 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 方法添加如下代码 //在静音模式下也能播放音频 进入后台 阅读全文
posted @ 2020-05-07 17:01 liuw_flexi 阅读(443) 评论(0) 推荐(0) 编辑
摘要: 参考自: https://www.jianshu.com/p/0dfccd073ae0 https://www.cnblogs.com/kingbo/p/7162364.html CALayer *MamiLayer = [CALayer layer]; MamiLayer.backgroundCo 阅读全文
posted @ 2020-04-27 15:57 liuw_flexi 阅读(876) 评论(0) 推荐(0) 编辑
摘要: 用 UICollectionViewFlowLayout 来做 PagingEnableLayout.h #import <UIKit/UIKit.h> @interface PagingEnableLayout : UICollectionViewFlowLayout @end PagingEna 阅读全文
posted @ 2020-04-27 13:54 liuw_flexi 阅读(402) 评论(0) 推荐(0) 编辑
摘要: 参考自 https://www.cnblogs.com/liuting-1204/p/5960815.html //scrollView滚动时,就调用该方法。任何offset值改变都调用该方法。即滚动过程中,调用多次 - (void)scrollViewDidScroll:(UIScrollView 阅读全文
posted @ 2020-04-20 16:23 liuw_flexi 阅读(252) 评论(0) 推荐(0) 编辑
摘要: // // SceneDelegate.swift // 菜鸟教程 // // Created by udc on 2019/11/29. // Copyright © 2019 udc. All rights reserved. // import UIKit class SceneDelegat 阅读全文
posted @ 2020-04-03 13:13 liuw_flexi 阅读(1309) 评论(0) 推荐(0) 编辑
摘要: Code enum Week: CaseIterable { case Sun case Mon case Tue case Wen case Thu case Fri case Sat } print(Week.allCases) //也可以重写allCases方法 enum Week2: Cas 阅读全文
posted @ 2020-04-03 12:03 liuw_flexi 阅读(764) 评论(0) 推荐(0) 编辑
摘要: // struct Animal: Codable{ // var name: String // var age: Int // } // // let jsonStr = "{\"name\" : \"dog\", \"age\" : 5}" // guard let jsonData = js 阅读全文
posted @ 2020-04-03 11:58 liuw_flexi 阅读(410) 评论(0) 推荐(0) 编辑
摘要: 参考 https://www.jianshu.com/p/06c993c5ad89 只有遵循了Hashable 协议 才能被添加到 Set 中 或者用作 Dictionary 的 key 值。 比较结构体和类的不同,类必须要实现Hashable的协议方法 struct Person:Hashable 阅读全文
posted @ 2020-04-03 11:56 liuw_flexi 阅读(768) 评论(0) 推荐(0) 编辑
摘要: https://developer.apple.com/tutorials/swiftui/building-lists-and-navigation 其实Identifiable 非常简单实用,主要作用就是作为一个对象的唯一标识。 在创建地标列表时: List(landmarkData, id: 阅读全文
posted @ 2020-04-03 11:52 liuw_flexi 阅读(1216) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 29 下一页