Want to know Autolayout best practices

Asked 2 years ago, Updated 2 years ago, 128 views

I am a student studying the creation of iOS apps at Objective-C. It may not be a good question because you are immature and misleading, but I would appreciate it if you could answer it.

When creating an application that can accommodate the screen size of all iPhone and iPad, how do you say better? Is it more efficiently efficient? Also, is Autolayout versatile?

The reason for this question was that I studied Autolayout in my own way, and the arrangement of View(IB) was limited to various complicated screens, so I couldn't arrange it the way I wanted it to. Because even if you can handle 4 inches and 4.7 inches, it's out of alignment with 5.5 inches, or you need to modify the original UIImageView material image?There was a problem with . I thought of a solution such as setting Autolayout for 4inch+4.7inch and 5.5inch, but I felt it was very inefficient.

Autolayout itself is good if it's case-by-case, but if Autolayout is all-purpose (which can be set up properly for any screen), it will continue to be very inefficient if you're not good at it, so I'd like to avoid it. If possible, how professionals do it?I would like to hear your opinion (how do you use Autolayout, etc.)

I looked up various things about Autolayout on the Internet like that, but I'm in trouble because I can't reach my own conclusion about creating Universal apps for Universal. I look forward to hearing from you.

ios objective-c xcode6 autolayout

2022-09-30 17:11

1 Answers

I can only say case by case, but personally I don't use stroyboard, I don't use Autolayout as much as I can, and basically I try to calculate the location and size according to the ratio and write in code.It's easier to calculate, and it's easier to manage by consistent source code.

However, it depends on the configuration of the app, so I don't think it's a matter of what's right, so I think it's better for you to learn by yourself and make a decision every time.


2022-09-30 17:11

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.