iOS 警告 收集 解决


 

1:IOS7.0 sizeWithFont:constrainedToSize:lineBreakMode:方法 iOS7 Deprecated

NSString类的sizeWithFont:constrainedToSize:lineBreakMode:方法,但是该方法已经被iOS7 Deprecated了,而iOS7新出了一个boudingRectWithSize:options:attributes:context方法来代替。

eg:

 CGSize itemS = [text boundingRectWithSize:(CGSize){self.menuScroll.bounds.size.width, self.menuScroll.bounds.size.height} options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15]} context:nil].size;

 

2:UITextInputMode currentInputMode is deprecated. 警告的解决

UITextView *textView = [[UITextView alloc] init]; UITextInputMode *currentInputMode = textView.textInputMode;

3:'strongify' macro redefined 警告的解决

这个宏声明重复,删一个

 

4:“Category is implementing a method which will also be implemented by its primary class”

在target的 build settings下  搜索other warning flags  然后给其添加 -Wno-objc-protocol-method-implementation 

5:ios xcode 下 报出 ”xx“is missing from working copy 的问题

环境:git 在本机上删除之后需要删除服务端的,使用git命令删除你删除掉的文件夹
git rm nameOfMissingFile


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM