Same xib for iPhone4 and iPhone5 possible?

前端 未结 8 647
不思量自难忘°
不思量自难忘° 2020-12-04 17:03

Is there any way I can design my classes for both iPhone4 and iPhone5 using the same xib?

8条回答
  •  没有蜡笔的小新
    2020-12-04 17:31

    If you want to make some small changes(e.g images position and sizes, scroll view content insets..), you can use codes to differentiate between iPhone 5 and iPhone 4/4s, and implement your codes inside the if/else statement.

    Use this:

    https://stackoverflow.com/a/12447113/1371949

    to detect the iPhone type.

提交回复
热议问题