私有KVC
與系統(tǒng)版本無(wú)關(guān)路狮,與Xcode
版本有關(guān)虫啥,Xcode11
編譯會(huì)奔潰。
其中UITextField
[textField setValue:[UIColor xxx] forKeyPath:@"_placeholderLabel.textColor"];
dis -n "-[UITextField valueForKey:]" 命令
其中UISearchBar
[self setValue:@"xxx " forKey:@"_cancelButtonText"];
iOS 13
的searchbar
添加了一個(gè)- (void)set_cancelButtonText:(NSString *)text
方法览祖,這個(gè)方法專門(mén)用來(lái)命中kvc
孝鹊。一旦命中 就 crash
通過(guò)計(jì)算TabBar上的圖片位置設(shè)置紅點(diǎn),紅點(diǎn)位置有偏移
如果之前有通過(guò)TabBar上圖片位置來(lái)設(shè)置紅點(diǎn)位置展蒂,在iOS13上會(huì)發(fā)現(xiàn)顯示位置都在最左邊去了又活。遍歷UITabBarButton
的subViews
發(fā)現(xiàn)只有在TabBar
選中狀態(tài)下才能取到UITabBarSwappableImageView
,解決辦法是修改為通過(guò)UITabBarButton
的位置來(lái)設(shè)置紅點(diǎn)的frame
锰悼。
黑夜模式
Apps on iOS 13 are expected to support dark mode Use system colors and materials Create your own dynamic colors and images Leverage flexible infrastructure
Apps on iOS 13 are expected to support dark mode Use system colors and materials
審核強(qiáng)制要求適配黑夜模式柳骄,近在咫尺。
蘋(píng)果登錄
Sign In with Apple will be available for beta testing this summer. It will be required as an option for users in apps that support third-party sign-in when it is commercially available later this year.
如果 APP 支持三方登陸(Facbook箕般、Google耐薯、微信、QQ丝里、支付寶等)曲初,就必須支持蘋(píng)果登陸,且要放前邊杯聚。
對(duì)于非iOS平臺(tái)臼婆,Web、Android 可以使用 JS SDK幌绍,網(wǎng)頁(yè)版本登錄颁褂,邏輯類似、Facebook傀广、QQ登錄颁独。
建議支持使用Apple提供的按鈕樣式,已經(jīng)適配各類設(shè)備伪冰。
模態(tài)彈出默認(rèn)交互改變
Defines the presentation style that will be used for this view controller when it is presented modally. Set this property on the view controller to be presented, not the presenter.
If this property has been set to UIModalPresentationAutomatic, reading it will always return a concrete presentation style. By default UIViewController resolves UIModalPresentationAutomatic to UIModalPresentationPageSheet, but other system-provided view controllers may resolve UIModalPresentationAutomatic to other concrete presentation styles.
iOS 13 的 presentViewController 默認(rèn)有視差效果誓酒,模態(tài)出來(lái)的界面現(xiàn)在默認(rèn)都下滑返回。 一些頁(yè)面必須要點(diǎn)確認(rèn)才能消失的糜值,需要適配丰捷。如果項(xiàng)目中頁(yè)面高度全部是屏幕尺寸坯墨,那么多出來(lái)的導(dǎo)航高度會(huì)出現(xiàn)問(wèn)題。
App啟動(dòng)過(guò)程中部分View可能無(wú)法實(shí)時(shí)獲取到frame
可能是為了優(yōu)化啟動(dòng)速度病往,App 啟動(dòng)過(guò)程中捣染,部分View可能無(wú)法實(shí)時(shí)獲取到正確的frame
AppDelegate
獲取DeviceToken
失敗
以下方法中:
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data)
在iOS 13中可以通過(guò)以下方法獲取:
let token = [UInt8](deviceToken).map{String(format: "%02x", $0)}.joined()
print("\(token)")