This post is a scream of anger toward Apple, and yet there is hope in me. I’ve been an iOS developer for 4 years, and what at first seemed momentary imperfection, irrelevant details, over the years turns into Chinese water torture, and you and I use IB every day, or at least once a week.

Perhaps Apple does not deserve such criticism - however, everything else, or almost everything else, is at their best. Excluding iTunes and the Apple developer portal (which in recent years has, nevertheless, become significantly better), technologies allow us to focus on what you are doing, and not on how it will look in IE.
At first I didn’t use IB at all, it seemed so crooked and wretched to me after other visual editors. Even Macromedia Dreamviewer MX, IMHO, had more chances to be called WYSIWYG editors for the UI. But several years passed, and a wonderful thing appeared - Autolayout - which is catastrophically inconvenient to implement in code. Little happiness in this code:
')
UIImageView *iv = [[UIImageView alloc] initWithImage:image]; UIView *renderView = [[UIView alloc] initWithFrame:iv.bounds]; NSInteger completedDistance = renderView.bounds.size.width * percentsCompleted; UIView *progressView = [[UIView alloc] initWithFrame:CGRectMake(completedDistance, 0, renderView.bounds.size.width, renderView.bounds.size.height)]; progressView.backgroundColor = RGB_UICOLOR(255, 255, 255, 0.8); renderView.clipsToBounds = YES; [renderView addSubview:iv]; [renderView addSubview:progressView];
but view code
NSMutableArray *constraints = [@[] mutableCopy]; [constraints addObject:[NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.parentView attribute:NSLayoutAttributeWidth multiplier:1 constant:0]]; [constraints addObject:[NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:self.parentView attribute:NSLayoutAttributeHeight multiplier:1 constant:0]]; [constraints addObject:[NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.parentView attribute:NSLayoutAttributeTop multiplier:1 constant:0]]; [constraints addObject:[NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self.parentView attribute:NSLayoutAttributeLeading multiplier:1 constant:0]]; [self.parentView addConstraints:constraints];
plunges the soul of the developer into depression and depression. In IB, the autolayout setting at the beginning is also for sugar, but as time goes on you adjust, you begin to force yourself not to notice the terrible jambs, to endure small flaws for now ... you do not get hysterical and the number of blunders that have been uncorrected for years, does not exceed all reasonable the limits. But there is no alternative, the format is undocumented, there will be no third-party tools! Here is my short little black list:
- give a scale of at least 200%! If there are many small elements on the view, you can go crazy with a mouse into microscopic views, choosing from a long list is also not an easy task;
- not all properties of views can be set visually, if 30% is good. I remember Borland Delphi and his magical Object Inspector, in which you could create almost any view, and it looked almost the same as in runtime. In IB, views look like shit, or more precisely, Picasso's set of abstract squares. But there is a flag Hidden (ALL, ALL expose it programmatically depending on the events!) And Stretching (I do not even know what it is);
- Previously, as a table header, I rolled a view (UIView), now I need a UITableViewHeaderFooterView. Okay, where can I drag it to Xib? Right, from nowhere, write with your hands! And if you try to slip a UIView-xy table, I’ll get offended and sneak;
- There is no intelligible XML that generates IB. Manually it is impossible neither to correct, nor to smite. You begin, God forgive me, to envy Android developers - they have a moderately shitty visual editor, but if something happens, write with pens - no one will be offended!
- After changing the class, the view of its “IB-superkey” does not change, which leads to glitches and crashes of both your application and the whole xCode. Suppose you created a UITableViewCell for half an hour with a lot of subsets and constructs, and suddenly realized that you needed a CollectionView and, accordingly, its cell. Only one way out - until you have spent an irreplaceable supply of vital energy, delete the Xib and recreate it from scratch. This is the only way Apple can guarantee your application’s performance;
- Where are the distinct best practices on storyboards, especially if the application is not a notebook or calculator? When you try to port on an ipad application that a Hindu or compatriot who is passionate about Indian culture has developed exclusively in a storyboard, you cry with bloody tears. Cells of tables need to be forbidden to create in storyboards, only and only! The system should have minimum fool protection;
Not enough of all this, we recently added a new pain in the ass:
- The most intuitive IB interface (sorry taftology) from all previous reincarnations! Constraints often pretend to be the Leading space (apparently, such a fish is in its own xibe). The only way to understand what it is is to slightly push the Assistant Editor window, but!
- In this case, our canvas begins to smoothly go up and to the left!
- For the year that has passed since the release of iOS 6, everyone has become accustomed to, that IB itself delivers all unnecessary constructs to logical integrity, and here, by default, it does this implicitly, during Xib compilation! So, it is impossible to predict what the introduction of width alone will lead to without launching the application. I advise you to use the “Add missing constraints” command and typeset in the old fashioned way.
To its credit, Apple can say that the counters stopped moving from every sneeze on a mouse, and this brought me to a nervous breakdown 4 times in xCode 4, and my partner’s partner’s partner even died of a heart attack.
Those who have recently discovered iOS, sing “finish it!” In chorus, faithfully believing in the icon of the apple and Steve Jobs. To which I object: “Do not finish it!”, They always have a dozen more important things to do. Really important, beautiful things,
but Apple - we deal with IB every day, take pity on us, mere mortal developers!
At parting, I want to offer an interesting survey: