UIStackView Disappointments

When working with UIStackView within Interface Builder I would frequently encounter errors that would tell me the an impossible co-efficient could not be reconciled within auto-layout. I fixed this by not using UIStackView. This was a difficult decision to make and only came after losing a few hours to these issues. I had actually argued to target iOS 9 in large part because of my excitement about this new tool; hopefully Apple will fix it in iOS 10. 😞

The aforementioned error:

Cannot find an outgoing row head for incoming head during optimization of variable with near-zero coefficient, which should never happen.

Yet another, more frustrating problem I was hitting involved the reliable crashing of Xcode when working with 4 horizontal stack views within a larger vertical stack view. I lost half a day to this and once again accepted that I would have to pretend UIStackView does not exist.

Someone let me know if they ever fix it. 😒

My Xcode Habits

I like to get the few people who actually read my website slightly annoyed, and so I thought what better way to achieve such a thing than by posting three things that I do in Xcode that you inevitably and vehemently ​disagree with.

  • ​I avoid using primitive types such as int and float as much as possible. Instead I opt for NSInteger, NSUInteger, CGFloat and so on. There are certainly cases where the former must be used, but NSNumber tends to help avoid even those rare instances.
  • ​When using NSInteger, or BOOL, I will add the 'assign' declaration. Technically assigns an instance variable to these properties, but I'm not sure whether it even does anything anymore.
  • I will never use Storyboards and will occasionally avoid the Interface Builder if I can. Storyboards seem too guided and I don't like the idea of it, but when it comes to XIBs there are times where the layout is made much easier by not coding it all. However, I really enjoy the control that programming a layout can give you, and I've even started embracing AutoLayout.

xcode for ipad

Creating iOS apps on the iPad is an as yet unseen, and largely undiscussed subject. Short of a few forum posts about the matter, I'm yet to hear it discussed in the depth I feel it deserves. This is something that I would genuinely adore, because to be honest, I can't afford an Apple computer yet. I'm certainly not very educated on the matter, I do however understand that Xcode runs on Apple computers with an Intel processor, and so it's probably not going to happen any time soon.

My reasoning is, I have seen a definite push from Apple to prove that the iPad is not simply a device with which to consume media, but also for creating it. Xcode would be such a drastic step in that direction, the only negative I see would be a possible decline in the purchase of their laptop / desktop computers. It needn't be as fleshed out, and probably wouldn't even feature the iOS simulator, but a basic app akin to the scaled down functionality of Garage Band would be brilliant.

Please tweet me with any information / details / speculation on the subject, because as aforementioned, I'm really rather ignorant on the systems in place which would prevent this. I'd also love to hear anyone's opinions to be honest.