这是环信ChatDemo2.0报错html
NSInteger numberOfBeforeSection = [_update[@"oldModel"] numberOfItemsInSection:updateItem.indexPathBeforeUpdate.section];
改成c++
NSInteger numberOfBeforeSection = [(UICollectionView *)_update[@"oldModel"] numberOfItemsInSection:updateItem.indexPathBeforeUpdate.section];
全局配置
在工程的Info.plist的中,增长/修改 UIUserInterfaceStyle为UIUserInterfaceStyleLight或UIUserInterfaceStyleDark
git
这个在xcode 10也存在的问题,采用大佬的方式处理,道理同样把须要的文件放到对应的路径下。不过大佬写了一个脚本,更方便github
Xcode 10和Xcode 11中删除的libstdc++库 https://github.com/devdawei/libstdc-xcode
四、present到登陆页面时,发现新页面不能顶到顶部
缘由是iOS 13 多了一个新的枚举类型 UIModalPresentationAutomatic,而且是modalPresentationStyle的默认值。
浏览器
UIModalPresentationAutomatic实际是表现是在 iOS 13的设备上被映射成UIModalPresentationPageSheet。
ruby
可是须要注意一点PageSheet 与 FullScreen 生命周期并不相同 FullScreen会走完整的生命周期
bash
,PageSheet由于父视图并无彻底消失,因此viewWillDisappear及viewWillAppear并不会走,
app
若是这些方法里有一些处理,仍是换个方式,或者用FullScreen
字体
设置方法:跟暗黑模式同样放到 push的时候或者根视图控制器 self.modalPresentationStyle = UIModalPresentationFullScreen;
因为在13中把SearchBar中的textField直接暴露给开发者使用,无需在经过kvc获取。
if ([[[UIDevice currentDevice]systemVersion] floatValue] >= 13.0) { searchField = _vSearchBar.searchTextField; }else{ searchField = [self valueForKey:@"_searchField"]; }
[_phone setValue:C6 forKeyPath:@"_placeholderLabel.textColor"];
UITextField *textfield = [[UITextField alloc]init]; NSMutableAttributedString *arrStr = [[NSMutableAttributedString alloc]initWithString:textfield.placeholder attributes:@{NSForegroundColorAttributeName : [UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:12]}]; textfield.attributedPlaceholder = arrStr;
这个2020年4月前处理了就好
想尝试能够参考https://www.jianshu.com/p/e1284bd8c72a
从 iOS 8 的时候,苹果就引入了 LaunchScreen,咱们能够设置 LaunchScreen来做为启动页。
固然,如今你还可使用LaunchImage来设置启动图。
不过使用LaunchImage的话,要求咱们必须提供各类屏幕尺寸的启动图,来适配各类设备,随着苹果设备尺寸愈来愈多,这种方式显然不够 Flexible。
而使用 LaunchScreen的话,状况会变的很简单, LaunchScreen是支持AutoLayout+SizeClass的,因此适配各类屏幕都不在话下。
⚠️从2020年4月开始,全部使⽤ iOS13 SDK的 App将必须提供 LaunchScreen,LaunchImage即将退出历史舞台。可使用Launch Storyboards来进行解决。
之前只设置选中状态的颜色是能够的,如今能够这样设置
[vc.tabBarItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: MENU_ITEM_SELECTED_COLOR, NSForegroundColorAttributeName, nil] forState:UIControlStateSelected
if (@available(iOS 13.0, *)) { self.tabBar.tintColor = MENU_ITEM_SELECTED_COLOR; } else { [vc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName: MENU_ITEM_SELECTED_COLOR} forState:UIControlStateSelected]; }
在 iOS 8 以前,咱们在 UITableView 上添加搜索框须要使用 UISearchBar + UISearchDisplayController 的组合方式,而在 iOS 8 以后,苹果就已经推出了 UISearchController 来代替这个组合方式。在 iOS 13 中,若是还继续使用 UISearchDisplayController 会直接致使崩溃
CBCentralManager,iOS13之前,使用蓝牙时能够直接用,不会出现权限提示,iOS13后,再使用就会提示了。
在info.plist里增长NSBluetoothAlwaysUsageDescription 咱们要一直使用您的蓝牙,具体作什么别问我
默认样式变为白底黑字,若是设置修改过颜色的话,页面须要修改
MPMoviePlayerController is no longer available. Use AVPlayerViewController in AVKit.
在iOS13中对于MPMoviePlayerController使用的废弃,须要使用AVKit中的AVPlayerViewController来达到播放的目的。
参考: http://www.javashuo.com/article/p-tmqfmnkb-cz.html
pod install 报错 sudo gem update --system 也不行
dunkhomedeMacBook-Pro:get dunkhome$ pod install -bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory
dunkhomedeMacBook-Pro:get dunkhome$ sudo gem update --system ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) bad response Not Found 404 (https://gems.ruby-china.org/specs.4.8.gz)
竟然是404,因而我用浏览器打开https://gems.ruby-china.org,发现其服务域名更换了:
而后删除gem源:
gem sources --remove https://gems.ruby-china.org/
修改gem源:
gem sources -a https://gems.ruby-china.com
查看gem源是不是最新的:
gem sources -l
升级cocoapods:
sudo gem install -n /usr/local/bin cocoapods --pre
查看升级后的cocoapods版本:
pod --version
如今最新的是
MacBook-Pro:get dunkhome$ pod --version
1.8.3