Answer the question
In order to leave comments, you need to log in
What's wrong with Interface Builder?
A friend working on a small IOS development team wrote me the following:
- to implement a horizontal slideshow / tablet, we usually use the standard UICollectionView
- for a vertical one, either UITableView or UICollectionView
- UILabel, UIButton, UItextField, UITextview are mainly used
- navigation using UINavigationController
- if something more custom, then we use Coconut-Kit https: //github.com/defagos/CoconutKit
- we try to separate strings and pictures (i.e. it is better to separate pictures from text - this way there are much less problems with localization)
- we usually wrap strings in NSLocalizedStrings to facilitate localization later
- we try not to use interface builder(.xib files and stroryboard) ui alignment is performed for UIView in the layoutSubviews method, for UIViewController in the viewWillLayoutSubviews / viewDidLayoutSubviews methods,
the interface builder also refuses to facilitate localization
Answer the question
In order to leave comments, you need to log in
Everything seems right to you. I don’t envy those people who support such a project with layoutSubviews and without xibs
IB is a mess of their fields in different menus. If serious customization of controls, animations, etc. is used. it's much easier to write everything in code. And yes, the texts are not the last.
To use or not to use IB is a matter of taste. Some people think that it simplifies development. Some people find it difficult.
Personally, it has always been more convenient for me to create everything in code: when you return to the project after a while, looking at the code, you can immediately understand what, where, how and why. This method is more flexible, and I feel complete control over the UI, I can make it whatever I want.
I'm also a little confused by the situation when something works, but I don't know why it works. I do not want to blindly believe the checkboxes set in the constructor.
On the other hand, if you need to sketch out a basic UI very quickly, and attach some actions to it, then IB is very useful.
Now localization works even for Interface Builder. And yes, IB also renders custom controls with a bang.
Each approach has its pros and cons. Problems when using xib will begin as soon as you start using the version control system (which is inevitable when working in a team)
1. It is not possible to determine who made what edits to xib
2. The impossibility of correctly resolving conflicts during merge
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question