会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
liuw_flexi
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
3
4
5
6
7
8
9
10
11
···
29
下一页
2020年5月11日
Swift 使用Xib自定义View
摘要: 参考自: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
阅读(2155)
评论(0)
推荐(0)
2020年5月7日
iOS mp3播放锁屏界面展示和耳机拔出事件
摘要: 要实现后台播放的功能,在 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 方法添加如下代码 //在静音模式下也能播放音频 进入后台
阅读全文
posted @ 2020-05-07 17:01 liuw_flexi
阅读(469)
评论(0)
推荐(0)
2020年4月27日
iOS position(位置)和anchorPoint(锚点)
摘要: 参考自: 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
阅读(922)
评论(0)
推荐(0)
不规则分页,如图
摘要: 用 UICollectionViewFlowLayout 来做 PagingEnableLayout.h #import <UIKit/UIKit.h> @interface PagingEnableLayout : UICollectionViewFlowLayout @end PagingEna
阅读全文
posted @ 2020-04-27 13:54 liuw_flexi
阅读(426)
评论(0)
推荐(0)
2020年4月20日
UIScrollViewDelegate 方法注解
摘要: 参考自 https://www.cnblogs.com/liuting-1204/p/5960815.html //scrollView滚动时,就调用该方法。任何offset值改变都调用该方法。即滚动过程中,调用多次 - (void)scrollViewDidScroll:(UIScrollView
阅读全文
posted @ 2020-04-20 16:23 liuw_flexi
阅读(303)
评论(0)
推荐(0)
2020年4月3日
iOS13 创建项目SceneDelegate文件
摘要: // // 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
阅读(1335)
评论(0)
推荐(0)
SwiftUI 中CaseIterable的作用?
摘要: 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
阅读(778)
评论(0)
推荐(0)
SwiftUI 中Codable的作用?
摘要: // 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
阅读(421)
评论(0)
推荐(0)
SwiftUI 中 Hashable的作用?
摘要: 参考 https://www.jianshu.com/p/06c993c5ad89 只有遵循了Hashable 协议 才能被添加到 Set 中 或者用作 Dictionary 的 key 值。 比较结构体和类的不同,类必须要实现Hashable的协议方法 struct Person:Hashable
阅读全文
posted @ 2020-04-03 11:56 liuw_flexi
阅读(803)
评论(0)
推荐(0)
SwiftUI 中Identifiable 的作用?
摘要: https://developer.apple.com/tutorials/swiftui/building-lists-and-navigation 其实Identifiable 非常简单实用,主要作用就是作为一个对象的唯一标识。 在创建地标列表时: List(landmarkData, id:
阅读全文
posted @ 2020-04-03 11:52 liuw_flexi
阅读(1306)
评论(0)
推荐(0)
上一页
1
···
3
4
5
6
7
8
9
10
11
···
29
下一页
公告