Want to use muliple nibs for different iphone interface orientations

前端 未结 4 535
自闭症患者
自闭症患者 2020-12-20 22:57

I have a situation, I have created two different nibs, one in Portrait Mode and other in Landscape mode. I had lots of designs in the view so, i had to opt for two different

4条回答
  •  Happy的楠姐
    2020-12-20 23:08

    You can't init self again once self has already been init'ed.

    When rotating, you will need to:

    1. Use loadNibNamed:owner:options: to load the nib by hand into an NSArray. (See the documention).
    2. Set self.view to the object at index 0 of that array.

提交回复
热议问题