V
V
Vasily Trotsky2014-09-24 13:58:44
iOS
Vasily Trotsky, 2014-09-24 13:58:44

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

Now I am just beginning to slowly get involved in all these matters and I cannot objectively evaluate what has been said.
It seems to me that the less code is written for the UI, the better, and I see only pluses in the interface builder. But maybe there's something I don't understand...

Answer the question

In order to leave comments, you need to log in

6 answer(s)
S
smanioso, 2014-09-24
@smanioso

They should also abandon classes and GMOs.

S
s0L, 2014-09-24
@s0L

Everything seems right to you. I don’t envy those people who support such a project with layoutSubviews and without xibs

G
gleb_kudr, 2014-09-24
@gleb_kudr

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.

A
agee, 2014-09-25
@agee

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.

I
iMike, 2014-10-02
@iFamily

Now localization works even for Interface Builder. And yes, IB also renders custom controls with a bang.

K
ksnegov, 2014-10-02
@ksnegov

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 question

Ask a Question

731 491 924 answers to any question