Convert iPad xib to iPhone xib

北战南征 提交于 2019-12-10 20:38:14

问题


I have seen many posts and tutorials about converting iPhone xibs to iPad xibs, but I want to do it the other way around.

The only resource I've been able to find is this : Convert iPad application to iPhone?

And it only covers compilation and code deviation. I know about the ~ipad / ~iphone xib postfix trick, but would like to get a head start on generating the iPhone xib, so that I don't have to create it from scratch, but can start with an automatically modified version of the original xib and work from there.

I have seen tools that do this the other way around (iPad xib from iPhone xib), but that is not what I'm looking for. Does anyone know of such a tool, or of a manual way to get this head start?

(Main issue would be resizing elements to fit in their relative position in the lower resolution)

Thanks!


回答1:


You can copy and past the xib file and rename it with "nameXib_iPad.xib". In this way your object are linked with the original class. Now you must change the code of nib name and switch iPone - iPad.

have you tried to do it?




回答2:


you can use constraints to make the xib file compatible with iPhone an iPad.



来源:https://stackoverflow.com/questions/10900427/convert-ipad-xib-to-iphone-xib

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!