Xcode 4.5 corrupting XIBs?

前端 未结 8 2111
后悔当初
后悔当初 2020-12-13 04:09

i am using the new xcode 4.5, i have this lines of code on some view controller:

DiscoverCell* cell=[table dequeueReusableCellWithIdentifier:@\"DiscoverCell\         


        
8条回答
  •  臣服心动
    2020-12-13 04:10

    So, after about an hour of trying to figure this out, I figured out the issue. It is indeed what is described above: make sure your .xib is set to the same target version (in this case, most likely < 6.0) as what your main app was written for, and uncheck "Use Autolayout" in the options for this particular .xib.

    The reason it will work in the simulator, is because your simulator actually is running iOS6. When trying to use a device with an older iOS, will result in this error. My problem was, I was creating a custom TableViewCell which by default was targeted for iOS 6 and had the "Use Autolayout" checked. This was the culprit for me.

    Hopefully I'm able to save someone out there the grief I was put through with this error!

提交回复
热议问题