I didn't check the Targeted for iPad option when creating a View Controller. How can I fix my UIView to be targeted for iPad devices using XCode 4.2?

后端 未结 2 859
借酒劲吻你
借酒劲吻你 2020-12-19 16:09

I made a mistake when I created one of my UIViewController objects. When I created the files, I forgot to select the Target for iPad option.

<

相关标签:
2条回答
  • 2020-12-19 16:30

    Change it in Build Settings -> Targeted device family OR under Devices in Summary tab.

    You'll find the above in your project's Targets section.

    EDIT: Sorry for the misunderstanding. THIS SO post seems to address your issue.

    0 讨论(0)
  • 2020-12-19 16:38

    Try this at your own risk:

    First, back-up your original Xib file. Next, modify the second line from:

    <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">

    to

    <archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">

    Next, open the source code of the xib, and in every ocurrence of the element:

    <string key="IBDocument.TargetRuntimeIdentifier">
    

    Replace the value IBCocoaTouchFramework with IBIPadFramework.

    Good luck!

    0 讨论(0)
提交回复
热议问题