Using Different Screen Sizes [closed] - ios

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have an app made for a iPhone 5 screen and am having trouble making it so that it will look the same on a iPhone 4. I can't seem to figure out how to use both screen sizes without making 2 storyboards because there are about 35 views. Any answer that may help me fix this problem will be greatly appreciated.
Sincerely, Nick
~Beginner at IOS Development

Create the views more dynamic. For instance does a tableview fill up the extra space with rows. Autolayout can help increasing the distance between UIElements for this.
The old (iOS 6) way to disable iPhone 5 was not to submit the iPhone 5 Splashcreen. Afaik this "trick" isnt working anymore.
Best have a look on xcode 5. It can switch the storyboard from 4"to 3.5"on the fly and respects autolayout. Consider it as a great opportunity to get used to autolayout. (You will need it in the next gen of devices it seems)
Edit:
Make sure the top most view does resizing and this resize is passed down to your table/collectionview
If you use Autolayout then just pin the 4 borders of the collection view,
If you dont use autolayout, refer to picture 2 and make sure the autosizing behaves the same. Either way will work.

Related

Swift Constraints Don't Apply to All Sizes [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I'm trying to do something kinda of basic, but the Xcode has changed its constraint mechanism for size classes, apparently.
And so I want to know how to make this constraint actually apply for all size classes.
iPhone 7
iPhone SE
Please check out these images with constraints and set your lay out accordingly.
It appears I just used a bad previously programmed view controller, I have created a new one, added the subviews and constrains, and everything works fine now.

Xcode - Swift arrange images in a grid 2x4 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am developing a universal iOS app. I am looking to achieve the below grid layout using 8 images (inclusive of the text).
My skills of autolayout are poor, especially for universal apps. I would like the layout to remain for iPad and smaller screen devices, and scale the images accordingly.
I am unsure how to achieve this. Could you suggest a method and perhaps point me in the right direction by providing suggestions on methods to achieve this, such as UICollectionView or grid layout using autolayout.
Collection view! It's a great way to arrange things in a view like this that automatically adapts to screen size.
Apple docs - https://developer.apple.com/library/ios/documentation/UIKit/Reference/UICollectionView_class/
Simple example you can follow - How to make a simple collection view with Swift
UICollectionView is a powerful tool, can be tricky to nail down at first but follow along on the tutorial and you should be able to make your design in no time!

Constraints in Xcode (Swift 2 iOS App) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm making a simple iOS app in xcode using Swift and while I have the entire backend figured out (and it works perfectly), I don't understand constraints AT ALL. I'm trying to make my layout adaptive so it works on all iphone screens but I'm having a really difficult time. Any suggestions on how I can create the perfect layout? Resources would be helpful too. Most resources don't explain the concept or start from scratch.
Another issue I'm having is that every time I click on something, e.g. a table cell, and uncheck "Constrain to margins" and set the constraints, the changes aren't saved and as soon as I hit enter they revert back to the original settings.
REALLY lost on this whole constraints thing. Thanks!
So for learning constraints, I would advice you to do this tutorial. It is lengthy but it covers a lot of important concepts.
www.raywenderlich.com/115440/auto-layout-tutorial-in-ios-9-part-1-getting-started-2
As for constraint to margins, you need to deselect "constraint to margins" before you edit the values. And once you edit a value, make sure the red lines are activated, and do not click on add constraints until you are sure of all the values. (1)
(Image 1)
You can check and edit the constraint in this window, just select your view and go here (2)
(image 2)

Stacks and Auto-layout across iOS devices [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
So I'm following a set of tutorials and have come to a point where I have the app working (A simple calculator), but the UI could still be improved.
The current UI works great on phones, but when going up to an iPad, parts of the UI expand as needed, but the buttons stay at quite a small size. I have no constraints keeping the buttons small and the stack that the buttons are in do expand to fill the space.
My project files can be found here:
https://github.com/maza256/retrocalc
An image to explain is found here:
iPhone and iPad Preview image
Any help would be great.
After looking at your project I found one change that you can make. Go to storyboard and select the buttons then click on attribues inspector. Then under control change the alingment options on the far right, which will cause your image to expand to fit the space.
Ipad
Inspector Setting
Sorry that i didn't catch this in my post. But you will need to click on the stack view for the top row of numbers and make sure to make the stack view settings like this.
Buttons are the right size. They are not small and behave as you expect. Try to change background color:
iPad screenshot
The problem is that you have very small images. You have to provide .#2x and .#3x images, so you won't lost quality on iPad.
Image assets

iPhone 4 and iPhone 5 compatible app - Storyboards or Autolayout? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I should create an app compatible with the screen sizes of the iPhones 4 and 5. On the web I found some ways to organize my project. The best ways to do it are to:
create two storyboards,call one when screen size is 568 and the other when screen size is 480
use autolayout and have an unique storyboard
I don't know how to use autolayout and I should learn its implementation in my project.
Then in this situation, I want to know by your experience what's the best approach.
I think that first approach is very intricate and slow, with two storyboards you can make mistakes and don't have the same situation in each device.
In my experience I used xib files, and I used two xib file for each viewcontroller, a solution which is very very noisy.
Then, what can you tell me about these approaches?
AutoLayout will make it easier to adjust your UI for both screen size, but even with the old UIViewAutoresizing you will be able to get everything working.
I would suggest that you do not use 2 storyboards or NIB for that mater, because if a some point an other screen size is introduced you need to create a third storyboard/NIBs.
You can even use the UIViewAutoresizing in NIB and in code.
Just set the autoresizing mask correct to grow/shrink with the screen size and you will be good to go.
Well , if you want to make app that run on both iOS 7 and iOS 6, than its better to use Autolayout, because it is easy to use, and also too much flexible.
Because your other options are too much complex and time consuming as well.

Resources