convert ipad xib to iphone xib in xcode 4 - iphone

I am trying to find out, how to convert iPad xib to iPhone xib.
I found this question which sais in one of the answers:
"Now you must change the code of nib name and switch iPhone - iPad"
I don't understand how to do that. And I think it might be important, because in my UIView, Simulated Matrix, Size, I have the option "iPad full screen", and I would like to use "iPhone full screen"
Thanks, Shefy

I am not sure what you are trying to do but you can just remove the base view of xib and add a new UIView with the desired size add this as the base view of the xib

Related

Copied iPhone storyboard and pasted directly into iPad storyboard, but not every view controller displays correctly on iPad

I am making separate storyboards for my app on iPhone and iPad. All of the elements on both storyboards are the same, but I needed to change a few things like font size, constraints, etc.
I did Command A (select all) and Command C to copy all of the iPhone view controllers. Then I did Command V to paste all the VCs into the iPad storyboard. Most of the VCs in the iPad storyboard display with the correct iPad format, but a few of the VCs will still display with the iPhone format even when I'm using an iPad...
I made sure that the iPad storyboard was being used for the iPad device type. Any help would be greatly appreciated

Converting Storyboard to iPad from iPhone storyboard

I wanna convert storyboard from iPhone to iPad. So i tried this answer.
Converting Storyboard from iPhone to iPad
When i opened the new iPad Storyboard, it just shows the error as below:
So how can i resolve this?? Or Give me suggestions to convert to iPad Storyboard. I'm using Xcode 6.3.1
Try this:
Make sure your projects setting is in Universal
Add key "Main storyboard file base name (iPad)" in your plist file with MainStoryboard_iPad as the value

Bottom button not showing in iOS Simulator

I am developing an app for iOS in which i took new ViewController
In that ViewController i dragged two UIButtons
Here is the image of .xib file
:
but when i run this project in my simulator i am unable to see my bottom button, you can see here in my simulator,
:
Where i am doing mistake ? i am not using autolayout because my deployment target is iOS 4.3
Thanks in advance.
if we create the navigationbar and tabbar programmatically then occupies a space in our viewcontroller so if we need to set our viewcontroller from .xib properly then we must have to left the space of navigation and tabbar by selectin those from .xib so that we can have exact space left for our other stuff i'm glad that it helped you. you're welcome. :)
It seems that your trouble caused by tab bar, that you create from code. I assume, you will see your button in case of simple comment line with tab bar creation. As this button is hidden, you can change it's y position or change size of your view in xib file.
I have observed such problems when we are using different sizes of .xib and iPhone simulator
i mean to say if u are using Ratina 4 for .xib .. make sure that u r also using iPhone simulator of Ratina 4 and the frame of TabBar Controller should b (0,0,320,568)
And in the case of Ratina 3.5 it should be (0,0,320,480)

What is the best way to handle iPad/iPhone views?

I'm developping an iPhone/iPad application and I want to make specific views for both iPad and iPhone. I was wondering what was the best way to select the handle the view selection.
Should I create a MainViewController with a custom push method which handle the selection (iPad or iPhone version of the view) ?
What is the best way to do that ?
If your iPhone nib is named, MyApp.xib, name the iPad nib to "MyApp~ipad.xib" (mind the lowercase "P"). The latter one will automatically be loaded for iPad.
If you want to create specific view for iPhone and iPad,when you create a new project -> Select Device Family as "Universal" .2 xib files will be created. One for iPhone and another for iPad respectively which you can use to design iPhone and iPad interface.

Load different view for different device on UITabBarController load

i have a tabbar controller created by interface builder. It has 5 tab with 5 views.
Now i can porting this project in ipad compatible version.
Using xcode and IB i created the correct views for ipad with "create ipad version using autosizing masks".
I have TestView_iPad.xib and TestView.xib
Ok!
Now, how can i load at startup in my tabbar controller the iphone or ipad correct nib file??? What is the right way?
I need to do this in my testview controller or in my appdelegate?
I recognize the devices correctly, but i not able to load from different nib file, because it where setted from interface builder (Nib Name = "TestView" from Inspector)!
someone have a trick?
thanks,
A
For my iOS app, I use two different NIBs and yes, they both have UITabBarControllers. The way I do it is by adding a key to my Info.plist: Main nib file base name (iPad) and copy the iPhone xib and rename it (Example: TabBar_iPad.xib) Then add your new xib's name as the value for Main nib file base name (iPad) and enter the xib's name destined for the iphone under the key Main nib file base name (iPhone)
It works great!