Display zoom iOS 9 [resize] - ios

Is there a way to change frame of UILabel if the iPhone in Zoomed mode because the application is okay with standard mode but zoomed mode the UILabel inside tableView doesn't show whole text.

See iPhone6 Display Zoom Functionality disturbs the whole view for some ideas, but I wish there was a more comprehensive guide, e.g., from Apple, on how we can make our apps support "display zoom" properly. Any pointers to something like that? Anyone?

Related

iOS how to expand Image View to borders in Launch Screen?

I am 2 days into iOS app development, I am quite new. The very first thing I wanted to implement in my app is a Launch Screen using Storyboards (I heard there are other ways but I found this the easier). I have a vector-based PDF file (image) because I wanted to implement a gradient background without a loss in quality that supports all device resolutions.
I created an Image View in the Interface-Builder (IB) but it does not automatically stretch vertically and horizontally to fill the device length.
I simulate my results on an iPhone 14, only thin white margins appear, but on a large iPad, the majority of the screen is white. It's like as if the the image resolution is fixed across all devices.
No matter what resizing I try, I can't get it to work.
I come from an Android app development background so something like this is very easy to implement (we have fill_parent / match_parent to stress the view to its containing parent view dimensions). Is such a behavior possible on iOS ?
You have to apply constraint on the image in launch screen.

Layout issue with iPhone X cropping off the full screen

Below is the output of my application when displayed on an iPhone X, it works perfect with all other iPhone, since they are not full screen with rounded edges.
as you can see the top portion where the time and battery icons are located is not fully filled in?
I am not sure how I can fix this. Should it be in the code or can I do it in the storyboard, I have tried in the storyboard but I have not been successful yet. Does anyone have any idea and/or tips of what I need to adjust in the storyboard to get it fo fill the full screen.
Please note this has the stretchy header, like twitter profile effect, which I still wish to retain.
EDIT
This question may have the answer you are looking for if you wish to extend your view underneath the status bar on an iPhone X.
Original answer
Is the constraint to the top of your view a hard coded value? You should be using the safe areas to attach auto layout constraints so that your app will layout correctly on the iPhone X.
More information on laying out your ViewControllers for the iPhone X can be found here

Same button position in relation to iPhone 5/6/6+ screen resolution in Xcode 6

I'm coding a remote control with a background (designed in Photoshop) already for the iPhone 6+ with the proper resolution, which I use with an UIImageView at full size.
I disabled Autolayout/Size Classes and set the size to Inferred. Further I uploaded all relevant LaunchImages for proper scaling.
The UIImageView scales properly for all screen sizes, but the buttons I put over the background are moving.
For example:
All buttons (over 1-9, Power Off, Menu ecc.) should always stay at the same position (in releation to the selected device and screen resolution).
I can't get it, that all buttons stay over the designed photoshop elements.
Please give me a good advice, to solve this issue.
I would recommend using size classes and Autolayout. This type of thing is exactly what they are made for.
This youtube video is a great introduction to size classes and some Autolayout:
https://www.youtube.com/watch?v=IwSTXY0awng&feature=youtu.be

ioS change button images to fill up the screen for iphone 3.5 inch and iphone 4 inch

I've just started writing iOs apps for work and I came across this problem which has to do with resizing my buttons on a screen to suit both the iPhone 3.5 inch and 4 inch. If you look at the screenshots below you will probably get the majority of what I am trying to solve.
So our designer has designed the layout whereby as you can see the colour buttons are supposed to fill the height of the screen for both iphone sets of devices, minus the height of the stautus bar and the navigation bar of the app.
I've had a look around a liitle bit about auto-resize, however I don't feel it is suitable for the requirements as you can see in the image.
Another approach that I thought about was in code, I would write an if statement, to determine if the person using the app was on the iphone 4 inch then load different images. However upon thinking about it more detail I would have to change the position for each of those buttons to ensure that the newly loaded images to prevent overlapping.
My question would be is there a way to change the position of the buttons in objective c to achieve what I want according to the screenshots?
Also it would be greatly appreciated if you can tell me if I am on the right track on the approach of my current problem.
Thanks heaps.
If you don't want to use AutoLayout, then I would advise turning it off in Interface Builder so you can control the frames manually. As for controlling the frames, make sure each of your views that you want to edit is accessible to your code (either its an IBOutlet or you manually instantiate it) and then adjust the myView.frame property. myView.frame is a CGRect, so you can edit it like this: myView.frame = CGRectMake(x, y, width, height).

UIViewController Size doesn´t work

Hi im currently developing an Universal app for iPhone, iPod and iPad. I have all view controllers in both storyboards set to Inferred. It works fine on iPhone Retina and on all iPads but when you put it in landscape mode it gets all messed upp and on the iphone 3,5 inch simulator the bottom gets cut off. How can i fix this? Do i have do create seperate view controllers for landscape mode and iphone 3,5? And the write some code that recognizes if its in landscape mode and iphone 4? I thought this worked automatically. Or have i done something wrong?
There is no quick fix/answer to your question.
Since the screen size is different while using horizontal and vertical orientations - it is simply not the same canvas and thus you will need to do some manual work to set it right.
Strategy 1.
Assuming your layout is simple - there are not too many elements and all elements can theoretically fit both horizontal and vertical screen size:
You should use auto layout from the Interface builder - Look at an excellent video from WWDC
https://developer.apple.com/wwdc/videos/
(video 406 - Taking Control of Auto Layout in Xcode 5)
In few words - you set spacers to your elements, aligning them to the end of your view (dynamically), therefore you can make your element shrink and move automatically respecting the current screen orientation.
Strategy 2.
Assuming your UI is complex and will not fit both orientations:
have a different xib file for horizontal and vertical views, this can take some time, but it is a solid solution that always looks good.
You simply need to track changes in orientation and load the appropriate xib.
Your problem will only be solved if you use Autolayouting and for that you need to go through some tutorials
Ray's Tutorial
Another Very well explained tutorial
Going through the above articles will definately help you in solving your problem

Resources