A
A
artem-Kolyadin2018-06-21 13:39:45
iOS
artem-Kolyadin, 2018-06-21 13:39:45

How to develop UI for iOS application? Advanced UIKit?

Good day!
I ran into a problem that I don’t have a clear idea and understanding of the correct approaches to the implementation / programming of the UI part of the application, so far there are no special problems with the “backend” part, so to speak.
Let me give you an example:
When I realized that the application needs to be subordinated to something more advanced and modern than simple MVC, I studied the issue of architectural patterns, chose the right one (VIPER), studied in more detail and implemented it.
However, the following tasks:

  1. Make a reusable grid with elements of the "icon-signature" type, and show in three columns on a small screen, four on large ones, plus slightly increase or decrease the size of these icons and signatures themselves. As a result, I created a xib file for one such grid element, and a UIView descendant class, to which an array of pictures / captions is passed and it calculates and builds everything there
  2. The two blocks (upper and lower) can be resized relative to the content, and the block between them (label) can take up all the remaining space. At the same time, the text in UILabel should not go half a line under frame. I had to slightly trim the height of the label in the code so that the length was a multiple of the height of one line
  3. Reuse the table by removing some buttons from the tab-bar. For example, there is a main ribbon of elements, but there is the same ribbon, only with favorites
    caused me a lot more problems and it was much more difficult to google their implementation. As a result, I did everything myself, but I am sure that there are more correct and elegant approaches to solving those problems with the UI that appear every day. There is also a question: Storyboard or UI in code? Or part there, part - there? So far, I have the second option with a separate storyboard for each controller and interspersed with xib files for some reusable views like a round icon and a caption. However, there are suspicions that it is better to do this in code (setting sizes, positions, constraints), using third-party libraries for layout, because faster in terms of application operation, more convenient and easier in terms of version control.
    The question is not specifically about the above points, but about general theoretical background and good practices for working with UIKit. For I can simply throw in the necessary non-adaptive interface, connect it with outlets and fill the view with the necessary content for a long time, even 70 percent of autolayout tasks can be implemented quite well. However, in the process of growth and complication of ui and application capabilities, I need more and more theory and practice on UIKit at a level above junior. Please tell me what are the current bad / best practices, what is considered good form and what is not? Maybe there are some sites / tutorials where they show how to create reusable UI components, how to build a complex autolayout (as a rule, all tutorials are very simple and in real life you have to do something much more complicated,

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question