Converting Storyboard from iPhone to iPad
2014-05-21 10:37
330 查看
I found out a kind of solution:
Duplicate your iPhone-Storyboard and rename it
Close Xcode and then open this file any text editor.
Search for
Change the code in the MainStoryboard_iPad.storyboard from:
Now save everything and reopen Xcode -> the iPad-Storyboard contains the same as the iPhone-file but everyting could be disarranged
This saved me hours - hopefully this will help you
After some digging through the storyboard source code, it turns out that the iPad storyboard was copied from the iPhone storyboard. So, the question really became how do I convert an iPhone storyboard into an iPad storyboard?
The answer is surprisingly simple. I ran across this SO answer -- to convert an iPhone storyboard to an iPad storyboard, do the following:
From Xcode, right-click on the storyboard and choose Open As -> Source code
Search for
Right-click on the storyboard again and choose Open As -> iOS Storyboard
The storyboard will now show all views in the correct size.
################
http://stackoverflow.com/questions/8465769/converting-storyboard-from-iphone-to-ipad http://stackoverflow.com/questions/9877113/xcode-storyboard-why-does-the-ipad-storyboard-show-iphone-sized-views
Duplicate your iPhone-Storyboard and rename it
MainStoryboard_iPad.storyboard
Close Xcode and then open this file any text editor.
Search for
targetRuntime="iOS.CocoaTouch"and change it to
targetRuntime="iOS.CocoaTouch.iPad"
Change the code in the MainStoryboard_iPad.storyboard from:
<simulatedScreenMetrics key="destination" type="retina4"/> to <simulatedScreenMetrics key="destination"/>
Now save everything and reopen Xcode -> the iPad-Storyboard contains the same as the iPhone-file but everyting could be disarranged
This saved me hours - hopefully this will help you
After some digging through the storyboard source code, it turns out that the iPad storyboard was copied from the iPhone storyboard. So, the question really became how do I convert an iPhone storyboard into an iPad storyboard?
The answer is surprisingly simple. I ran across this SO answer -- to convert an iPhone storyboard to an iPad storyboard, do the following:
From Xcode, right-click on the storyboard and choose Open As -> Source code
Search for
targetRuntime="iOS.CocoaTouch"and change it to
targetRuntime="iOS.CocoaTouch.iPad"
Right-click on the storyboard again and choose Open As -> iOS Storyboard
The storyboard will now show all views in the correct size.
################
http://stackoverflow.com/questions/8465769/converting-storyboard-from-iphone-to-ipad http://stackoverflow.com/questions/9877113/xcode-storyboard-why-does-the-ipad-storyboard-show-iphone-sized-views
相关文章推荐
- ios storyboard中 iphone 和iPad 之间的转换方式
- Library for Converting Data to and from C Structs for Lua 5.1
- iOS 如何 分别为 iPad 和 iPhone 建立 不同的 storyboard
- How to Downgrade From iPhone Firmware 2.2 to 2.1 视频教程降级iphone 2.2 到2.1
- Using Storyboards To Make Navigation Based iPhone Apps
- 将思科7912G SIP电话转成SCCP模式(Converting an In-Use Phone from SIP to SCCP for IP Phone 7912G)
- How to find crash logs for iPhone, iPod Touch or iPad applications
- Converting from GLSurfaceView to TextureView (via GLTextureView)
- 转换到 StoryBoard 的公布说明(Converting to Storyboards Release Notes)
- xcode 6.1 iphone/ipad storyboard
- Converting to Storyboards Release Notes
- WPF 和 UWP 中,不用设置 From 或 To,Storyboard 即拥有更灵活的动画控制
- Xcode6为iPhone、iPad创建不同的storyboard
- Any gotchas at all with converting from MyISAM to InnoDB?
- Converting_everything_to_and_from_wxString
- Porting Over iPad game to iphone the easy way cocos2d
- In an iOS 5 Storyboard, how do you push a new scene to the original view controller from a Popover?
- Converting a project from VS.NET 2003 to VS.NET 2002
- iphone/ipad实现自定义的开关UISwitch(continuous,clipsToBounds,userInteractionEnabled属性)