设为首页 加入收藏

TOP

处理Xcode 警告(一)
2017-10-13 10:28:37 】 浏览:5547
Tags:处理 Xcode 警告

除了代码中我们手动加入的

#Waring  标示 所产生的警告,我们都应该重视。下面是一些警告的处理。

 1,方法过期,或 使用新的api  替换方案

  multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock: 

使用替代方案:

multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error: 

 http://cocoadocs.org/docsets/AFNetworking/2.1.0/Classes/AFHTTPRequestSerializer.html

  2,storyboard 不支持的配置 警告

storyboard: warning: Unsupported Configuration: Plain Style unsupported in a Navigation Item

   原因是你导航栏上的按钮使用了不支持的 style see

 修改 Plain 为Done   fix waring .

http://stackoverflow.com/questions/10945859/plain-style-unsupported-in-a-navigation-item-warning-with-my-customized-bar-bu

 

3,

1)storyboard: warning: Unsupported Configuration: Scene is unreachable due to lack of entry points and does not have an identifier for runtime access via -instantiateViewControllerWithIdentifier:.

 大意是为了在程序中动态访问Scene,需要给其设置一个Storyboard ID,所以给出了警告,解决方法:设置一个Storyboard ID即可. (基本上sb钟的所有VC都需要加,才可消除警告,这里根据自己需求。但也可检查出 sb里面无用的VC,可以干掉)。

 http://blog.csdn.net/freedom2028/article/details/8589375

 

2)storyboard: warning: Unsupported Configuration: Prototype table cells must have reuse identifiers

必须给sb 里德cell 添加重用标示。(这里看需求。)

 

3)storyboard: warning: Unsupported Configuration: Segues initiated directly from view controllers must have an identifier for use with -[UIViewController performSegueWithIdentifier:sender:]

大意:segues 没有设置标识,虽然有连线。这种一般都可以废弃。

 或 重新添加标示 结合代码。。

http://stackoverflow.com/questions/24087250/segue-identifier-error

 

4) storyboard Frame for "Table View" will be different at run time.

不全的 约束导致。谨慎修改。可能是代码中需要。

 http://stackoverflow.com/questions/18739572/xcode-5-layout-errors-misplaced-view-frame-for-label-will-be-different-at-runt

 

5) storyboard: warning: Ambiguous Layout: Size and vertical position are ambiguous for "Add Address View".

 同上 ,默林两颗的 约束,解放方案同上。

 

4,storyboard: warning: Ambiguous Layout: Horizontal position is ambiguous for "Scroll View".

自动约束 位置不明确。

 补全。

 

5,Images.xcassets

1), Images.xcassets/: warning: Missing Content: The file "credit_card_light.png" for the image set "credit_card_light" does not exist.

credit_card_light.png 不存在。

 but, 明明存在。

 show finder 。

 文本编辑,Contents.json .对比其他正常的。

 删掉上面的

 "filename" : "credit_card_light.png"

   fix done.

 2), Images.xcassets: An iPhone Retina (4-inch) launch image for iOS 7.0 and later is required.

   暂没有处理,解放方案 参考

http://stackoverflow.com/questions/19732975/adding-ios-7-version-of-iphone-4-inch-launch-image-to-project-breaks-launch-imag

 

6,Apple Mach-O Linker Warning

 1)、Directory not found for option “ –L path”

尝试项目(目标) - > 构建设置 - > search  path

 and clear it。

http://stackoverflow.com/questions/16644982/apple-mach-o-linker-warning-directory-not-found

 2)、Apple Mach-O linker Warning: lgnoring file …

 http://stackoverflow.com/questions/10535678/apple-mach-o-linker-warning

 3), dsymutil warning (armv7) …… .o  unable to open object

首页 上一页 1 2 下一页 尾页 1/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇UI进阶 即时通讯之卸载Openfire 下一篇关于UIImage类的对象两种初始化方..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目