Handle different screen size for iOS Devices - ios

I have spent two days for Phonegap-iOS tutorial to handle different screen size for iOS devices(iPhone4,iPhone5,iPad etc). I have not found any good tutorial for this.
I would appreciate for any help. Please let me know if any anyone has any idea on how to achieve it.
Thanks,
Nitin.

If I am not wrong you must be developing your front pages using HTML5? If so give height and width of elements in %. Your pages will automatically resize according to screen size. Search for responsive web design you will get a lot of stuff to read.
Another solution is to use media queries.

Related

Building for multiple screen sizes

One screen of my application involves displaying a form - asking the user to enter details which can be posted and saved eventually. In my form, I'm asking for the title, date, description, and attach any images. So there are UILabels, UITextFields, UIButtons, and UITextView involved. And they are displayed using interface builder + constraints.
Now as I view this screen on phones ranging from 8 to XR, I notice, for example in the XR, there is a lot of white space not being utilized. I understand the problem is due to my constraints. How do I adapt my constraints to help with this issue? So in the case of a longer screen such as an XR, my UIViews make use of the space provided rather than being bunched on the top half of the screen. I'm still a beginner w/iOS so I'm assuming it has to do something with constraints but not sure. How can I tackle this issue/change my approach when envisioning iOS applications?
Need some expert to enlighten me w/some iOS wisdom!
It's important to understand how autolayout and constraint works. After that you'll just need to create the UI ONCE in most cases and it will be good for all devices.
Since you're new I suggest putting one object(eg: UILabel) at a time and add constraints on it and see if it works before you add another object
Kindly see this link:
https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/index.html
and there are a lot of tutorial videos in youtube you can watch.
happy coding

Best approach at designing an iOS frontend

I am designing my first iOS app at the moment. Every view of the app needs to be available in portrait aswell landscape. Also all iPhone versions need to be supporrted.
As someone always working with windows and never owning any apple product it was a pain in the ass getting started but slowly things seem to work out. But before the whole design approach takes a wrong direction I rather ask here:
What I want to do is have constraints based on multipliers as much
as possible.
I will try to avoid constant values as much as possible since from
my understanding they arent scaling. I read that you can change them
programmatically but if possible I want to stay in the designer for
frontend related stuff.
Since the multiplier cant be changed based on the current size class
I plan to have a set of constraints for all kind of portrait size
classes and another one for landscape (using installed feature of
xcode)
To up and downscale labels and textviews I want to have a height
constraint to the superview with a very tiny multiplier (will
probably be complicated to keep all textviews the same height when
there are different parents across them?)
In theory this should produce views which up and downscale well and look the same on all kind of iPhone screens. Now I am curious what more experienced iOS designers think about my "plan":
Do you have different approaches?
Is there any book/tutorial/page you can suggest?
Thanks in advance! :)

How to Create Dynamic-Sized Paged Horizontal UIScrollView Using AutoLayout in Xcode 6

I Want to create a UIScrollView In Storyboard Using AutoLayout.
Horizontal Paged Scrolling Enabled,
Dynamic Page Size Adaptability (that is, page size should adapt for iPhone 4s thru iPhone 6 Plus screen size)
I'd be thankful if someone would give me a direction as to how I Should proceed to achieve this.
I have searched around the web for this but haven't found anything as clear and as accurate to what I want to achieve.
I solved it myself.
Here is the link to my demo of what I wanted to achieve.
Hope this helps others too.
https://github.com/ArshAulakh59/ScrollAutoLayoutTest
Apologies for the delay guys but now I have added the steps to achieve this via video on the github page.

iOS / xCode4: image sizes for TableViews and Pickers

Is there any indicator in xcode about the size of table cells and picker cells, so I can work out how big my images need to be in there, how much gap to leave for the edges etc. Just need some kind of guidelines indicator as to where my cursor is on the control I suppose. How do you guys deal with working out layouts?
Thanks (sorry if the question is a bit wooly).
Xcode does not provide any such guidelines to do so, but there are some other software that can be used.
You can use MockApp or omni graffle to design your apps. You can also use photoshop but it might be an over kill if your app is small or low budget or if you dont know how to use it.

ipad:orientation issues

Regards to everybody here I am with another problem. I have some screens which basically have several search filters and search results are displayed accordingly in a table. Now I have orientation issues cause this search screen does not cover the full screen in landscape mode.
Solutions that I came across:
Two xibs for same view but I'll loose data if I do so as this data will be in bulk so I can store it locally.
write lots of coordinate related code which is again cumbersome as there will be lots of search filters.
Autoresizemask -> not able to implement this upto expectations. (I tried this but was able to move the screen to the center but I wanted the complete view expanded resizefill something)
Can anybody enlighten me on this so that screens can be prepared in standard ways.
Thnx in advance.
Refer the screen shots
ok it finally worked.. we just have to adjust resizing mask for xibs or set autoresizemasks for the view-- as Ole Begemann mentioned

Resources