I have an app that was previously made for iPhone before, so i recently added an iPad storyboard, i followed some of the answers to related questions guidelines e.g
targetRuntime="iOS.CocoaTouch"and change it to targetRuntime="iOS.CocoaTouch.iPad"
i also added the ipad storyboard to my info menu
The only thing i have not yet done is this since i use Xcode 11.5, i couldn't see it in my storyboard source code
<simulatedScreenMetrics key="destination" type="retina4"/> and change it to to <simulatedScreenMetrics key="destination"/>
This is how my app is displayed on the simulator
versus how it looks on my storyboard below. Please don't mind the labels because they are localized in the simulator. Could anyone tell me what i am doing wrong
Related
I'm learning swift and IOS app development, and while doing some tests I moved some controls on the storyboard. But when I launch my app those changes do not appear, even when I do a "Clean" before to run it.
It is strange because if I add a control it appear on the app
Here is a screen shoot of the storyboard and the app runing on the IOS Simulator
http://www.designinnovation.be/documents/xcode.png
Could anyone help me?
You should become familiar with Auto Layout and introduce some constraints into your Storyboard. Then, it will arrange everything in the simulator automatically (well, for almost anything...)
Ok, this one is WEIRD. I wrote an app more than a year ago and it's been in the App Store and humming along nicely without any real problems. It's a Universal app and I've got a xib for iPhone and a xib for iPad.
Today I got an email from a user saying the UI was no good so I asked for a screenshot. The screenshot shows the iPad xib being displayed with my iPhone tab bar controller. O.o I've never seen this before and we have tens of thousands of users who are using the app just fine. The iPhone users see the iPhone xib and the iPad users see the iPad xib.
What the heck could have even happened here? I've asked her to delete and reinstall the app because it's the only thing I can think of... but how does this happen when everyone else's apps are working just fine?
This is what she is seeing:
This is what she should see on the iPhone interface:
This is the iPad interface that is being jammed into the iPhone ui:
It is my understanding (i have seen it) that some apps can be opened and viewed in an iPad. Although, the iPad keeps the screen small, or pixelated if doubled the screen size.
I am attempting to do the same thing with my app, however when I attempt to run it on an iPad it crashes with the error
'Could not find a storyboard named 'MainStoryboard_iPad'
This is obvious, as I do no have a storyboard for the iPad, but currently I don't want one. I just want the iPad to run the app as an iPhone app in a smaller version. So my question is, how do I stop it from looking for the iPad storyboard? Its my understanding I must adjust something in the plist.info but I don't know how to access that in xcode. its my understanding you select the project in the navigator then select 'info' but I don't see any information that people say should be in the plist.info.
Thanks
You seem to have made your application universal. You want to set your "devices" to iPhone. This can be done on the target summary page (No need to interact with your .plist directly).
Only target iPhone platform, and do not call any iPad interface objects in your code. You should look in your Main xib file to make sure there are no references to an iPad interface object.
iPhone only apps should natively run in double-pixel mode. In order to resolve the pixelated / grainy issue you see, use #2x (for iPhone) size images. This will reduce the pixelation you see, but will still contain some.
Ok, I found the final issue. After editing the summary to 'iPhone' I also had to go into the Info tab and change the line that says
'Main storyboard file base name (iPad) to MainStoryboard_iPhone. It was currently set to MainStoryboard_iPad. That second step fixed the issue.
Thanks guys!
I have very simple iPhone app, which uses just UIButtons, UIlabels, UITableView. without any custom controllers and graphics. How can I convert app to universal with that UI?
First update the application target device to Universal.
Update the application target device to Universal.
Check the Info.plist for NSMainNibFile & NSMainNibFile~ipad keys.
For all other views, have two different NIB. For example FirstView.xib & FirstView~ipad.xib. iOS runtime will load the proper view based on the device.
Here is a screenshot of a sample project:
I needed to convert my iPhone App to iPad yesterday and found the easiest way to do it as long as your app is pretty simple. Mine was literally just some tableViews that were set to auto-size. In Targets / Devices just change it from 'iPhone' to 'Universal' and then build your application. This worked very nicely for me. All tableViews were perfectly formatted for the iPad and that is really all I needed.
Note that if you had any other XIB files that were not just tableViews, such as a window with text fields, all you have to do is set them each to resize properly so they stretch and stay at the top and your simple app should be pretty much all set for the iPad.
Obviously you'll need to test it and tweak anything needed but for the most part the above worked magically for me and took literally one second to convert my iPhone app to an iPad app!
Just a silly question that just cant figure out. Ive been working on iPad apps for a while but now Im back on an iphone project.
I created an iphone 4.0 sdk based project but when i double tap on a xib file, IB comes with iPad layout and i cant figure out how to switch it back to iphone layout.
Anyone?
When you create the project, be sure to select Product = iPhone in the "New Project" window.
Also, if you already have the iPad views, you can transform them to iPod/iPhone views through File->Create iPod/iPhone Version using autosizing masks
Partially solved,solution sucks. i created a view based project and there IB shows xib with iphone layout. Couldnt find a solution yet when creating a window based project.