Search code examples
iosobjective-cautolayoutuicollectionview

Real device not showing changes as per iPad storyboard in Xcode 7.3.1


Folks I am facing the issues and that is I am making changes in my storyboard but this changes are not getting affected in my real device or simulator. Please help to figure it out. I have duplicated iPhone Storyboard and made it iPad storyboard with the reference of this question of stack overflow converting-storyboard-from-iphone-to-ipad. few of its screens has been changed to iPad but few of them are still in iPhone size. I have tried to make changes into them with iPad sizes but it always showing the unchanged screens on real device or simulator.

This is what my iPad simulator showing This is how I have moved my collection view from x and y


Solution

  • Friend if you want to do proper universal changes please follow below steps

    Open application in Xcode. Select Project Navigator.

    Select your Project Target.

    In Deployment Info section, select Devices. Here you will see 3 options – iPhone, iPad and Universal. Change from iPhone to Universal.

    It will prompt you an alert Copy “Main” to useInnovationM-iPhoneOnly-To-Universal-App as main iPad interface. It is prompting to use the name of the Storyboard (Main here) to create another iPad group. Normally, you would select to copy.

    It will add new iPad group.

    Add new Storyboard file under the iPad group in Project Navigator. Name it Main_iPad.storyboard.

    Change name of iPhone storyboard as Main_iPhone.storyboard from Main.storyboard.

    Update entry in plist. Main storyboard file base name – Main_iPhone Add entry in plist. Main storyboard file base name (iPad) – Main_iPad.Now add your controller, outlet, action to Main_iPad.storyboard.

    Make changes to Main_iPad.storyboard to make it utilize the complete screen. This would involve making changes in position, height and width of components.

    Also, you need to provide images for iPad.

    In order to all this work please you should check your xcode version before doing any of it ?