Property 'edgesForExtendedlayout' not found on object of type 解决方案

用Xcode4,iOS7以前的SDK编辑使用了iOS7新特性的工程,如果用到了 edgesForExtendedLayout属性,会报错Property 'edgesForExtendedlayout' not found on object of type,此时解决方案有二:

一:升级Xocde到5,Base SDK使用默认的iOS7 SDK。

二:写一个宏判断使用。

#ifdef IOS7_SDK_AVAILABLE
  self.edgesForExtendedLayout = UIRectEdgeNone;
#endif

(如果iOS7不执行上述代码则把Xcode重启)

 

用Xcode5,iOS7 SDK遇到了上述的问题。。。。一般来说是不可能遇到的,如果真的悲催地遇到了,请把SDK库里的除iOS7 SDK以外的SDK全部删除,路径是

/Applications/Xcode.app/Contents/Developer

/Platforms/iPhoneOS.platform/Developer/SDKs

猜你喜欢

转载自wenrisheng.iteye.com/blog/1991388
今日推荐