How do I programatically get a large iPad window on startup with MonoTouch? - cocoa-touch

I have the latest Ipad compatible Monotouch library. I have upgraded my projects to use 3.2 SDK and MonoTouch 1.9 Alpha.
The docs say you need to change the Window in your XIB for the large iPad Window. I don't use XIB. I build my interface from code by constructing the object programatically. What should I be doing to get the large iPad style Window?

Nothing (I assume).
[UIScreen mainScreen].bounds (and its equivalent on MonoTouch) will be 768x1024 in iPad mode and 320x480 in iPhone mode. If your windows and views do not have any hard-coded values they should adopt to the new size naturally.

After further investigation, I found that I needed to add an entry into the info.plist file like so:
Information Property List
UIDeviceFamily
item 0 2
Once this is present the dynamic Window class that I create is the full iPad screen size.
I think it is basically telling the system that my app supports that device. Will have to find our more in the docs.

Related

Upgrade project for iPhone X and iOS 11

I'm working on very old project which is written in objective-C and it's all views and controllers are written programatically. (There are not even XIBs, except some cells)
I've already open project in latest Xcode 9.3 and resolve all error and dependencies and compiled it successfully.
But now I want to upgrade the whole project to give support for iOS 11 and iPhone X layout, and I also want to add storyboards and remove all programatically controllers. It's also compatible for iPad and iPhone both.
Can anyone suggest me how to start it and what to keep in mind?
It's huge project so I'm bit confuse either would I make it or not. (I don't wanna introduce swift at the moment, first I'll update it for iPhone X layout and storyboards, then I'll think about swift too)
First of all start with creating UI on storyboard with autolayout.
Remove the resizing views conditions from the code.
Use size class to support both iPhone and iPad.
so basically first 3 steps will solve 70% of your issues.
My suggestion is don't move to the swift before doing all this.

Storyboard for iPhone-only application displaying iPad sizes?

I am following along with a tutorial on Lynda.com and I am using XCode 6, while the tutorial uses XCode 5, so perhaps this is the problem. I have created a tabbed application and set devices to iPhone but my storyboard file looks like it's displaying iPad sizes. Why is this? My storyboards for other projects are not displayed like that.
In Xcode 6 Main.storyboard is the single storyboard for all devices, no matter their screen size. Open the storyboard and you’ll see that it contains a single view controller, but of an unfamiliar size. Storyboards in previous versions of Xcode had to match the screen size of the target device. This clearly isn’t possible with the “one storyboard to rule them all” approach, so the storyboard is given an abstract size instead.
Please check this tutorial :
http://www.raywenderlich.com/83276/beginning-adaptive-layout-tutorial

Converting iPhone app to Universal, XCode 5.1 using Xib files

Our application(only for iPhone) is already in iTunes. Which was developed using xib files. Now client wants same app should support both iPhone & iPad.
1. If I change "Development Info -> Devices -> Universal", will this work properly in both kind of devices?
A. If Yes for above : If I change version of an app on iTunes with the same project name. How this can be achieved?
B. What Settings should I do in plist file and with xib files?
Plz suggest.
Thanks in Advance
You can change to Universal, so the application will RUN in both iPhone and iPad. Nonetheless, you will have to make changes to xib depending on the behavior of your app. Usually, iPads use list and detail views if it's in landscape, for example:
or in portrait view:
both look something like:
I want to point out again, on how your app behaves. Is not mandatory to use master-detail style, only if it fits your app.
And you can upload your binary to iTunes without problems. You could have problems if your app is using Universal and changing to iPhone or iPad only. And don't touch your plist.

Cordova mac default window height width

I just downloaded Cordova for mac from https://github.com/apache/incubator-cordova-mac.
I haven't made any changes, so I just load it up in Xcode and hit run, but the first thing I would like to do is specify the window size. I'm not very conversant with xcode and can't find references to the window size, I can't find any nib files either.
How would I set the window size?
Edit I used the method described at How to set NSView size programmatically? in my contentView implementation file.
Cordova runs full screen, and depending on the size of the splash screens included in the project will scale to all respective devices.
If you want to embed Cordova in your application you have to look here: http://docs.phonegap.com/en/2.4.0/guide_cordova-webview_index.md.html#Embedding%20WebView

Managing an iOS app across different platforms

I have an iOS 5.0 app presently and had a few questions regarding deploying the app across multiple platform and multiple OS upgrades. I would like to know if there is a clean and configurable system that allows me to have one project handle deployment to the iPhone iOS5 and iOS6 and the latest iPad iOS without having ugly selection statements everywhere determining the platform the app is being currently run on. So I would like to know if there is a way to manage the code from a dev prespective so i can support all version/platform specific features of my app depending on what platform/version it is being currently run on (for ex. automatically switching to use the longer dimension background images if the app is being run on an iPhone 5 with iOS 6)
Is there any way to have this functionality?
I am slightly confused with your question, but I'll explain what I know. Xcode already has a way to change your app depending on what Device/iOS Version the user is running. If you use storyboards, then it will automatically resize your app content depending on whether the screen has retina support, and the size of the screen. In addition, you can have a storyboard for iPad, so that when you run the app it will use the iPad version. It also will change the app icons. Just go to the project settings and scroll down until your get to the icons and lunch images.
Now, if you mean you want to change how your app works using the source code directly, then there is no easy to way to manage it. Your best bet is to go with Storyboards, as it makes it very easy to resize content depending on what device your using.