News for hackers. Stuff that matters.
Re:The Curious Case of iPhone 6+ 1080p Display by bsaul on Thursday September 11, 2014 @03:47AM (#8301352)
As an ios dev, i know autolayout exists and lets you somehow manage the different resolutions if you manage to change your set of mind ( no more .frame = or .center= to change the location of a view dynamically but update constraints instead), and get away with the ugliest thing in the ios api that are constraint string expressions ( which almost made me throw up the first time i saw them).

But let's face it, that's one less thing we can mock Android devs about. Pixel perfect Wysiwyg ui building in interface builder has one foot in the grave.

Re:The Curious Case of iPhone 6+ 1080p Display by dep_b on Thursday September 11, 2014 @10:59AM (#8302945)
It's really time to dump those code views son. Interface Builder gives you all the tools you need to do it and works reliable, gives a LOT of feedback on your constraints when you build them.

You should learn auto layouts using Interface Builders, otherwise it's a nightmare because you're not getting the feedback you need to learn it right in the first place.

You need to start using priorities right, specially when you are doing >=, <= constraints you also need to add a low prio == constraint. It's not that hard, but you will be really frustrated if you keep clinging on to your coded views.

Try to chop up your Storyboards if you work in teams. They shouldn't be so big that you have trouble following the flow on one monitor.

Re:The Curious Case of iPhone 6+ 1080p Display by duaneb on Thursday September 11, 2014 @12:06PM (#8303384)
You can't code review storyboards.
Re:The Curious Case of iPhone 6+ 1080p Display by dep_b on Thursday September 11, 2014 @07:24PM (#8305794)
Less code is a good thing! I hope you fire up Xcode to see with your own eyes if the code-only view looks okay as well?

Also it's much more documenting to they guy that's going to maintain your screens later on.

Re:The Curious Case of iPhone 6+ 1080p Display by cerberusss on Friday September 12, 2014 @03:51AM (#8306962)
Why not? You can simply open a storyboard and review it, no?
Re:The Curious Case of iPhone 6+ 1080p Display by duaneb on Friday September 12, 2014 @11:29AM (#8308545)
That requires downloading, checking it out (at the exclusion of your other branches), reviewing it, figuring out how to make comments on it even though there's no review interface for storyboards, rinse repeat. Code review in objective-c is commenting on code in github while code compiles and evaluating screenshots of the current state. If apple came out with a way to review storyboards on something as convenient of github, I might consider it.
Re:The Curious Case of iPhone 6+ 1080p Display by bsaul on Thursday September 11, 2014 @12:14PM (#8303443)
i did, son. but now tell me how you do complex animations on subviews in an autolayout view without adding constraint by code.
Re:The Curious Case of iPhone 6+ 1080p Display by dep_b on Thursday September 11, 2014 @07:20PM (#8305769)
I have no idea what complex would be in your case but adding game-like animations to a view with auto layouts would probably not be a good idea.

But the whole point is that auto layouts from IB can be controlled from code as well so you don't have to write the code for the auto layouts completely in code. Writing auto layouts in code is laborious and it's easier to make mistakes.

So if you "park" a low priority constraint for the end point or even the points in between you can let them take over by changing priorities only. Also you can animate most other properties as well if you need it.

Re:The Curious Case of iPhone 6+ 1080p Display by lpsz on Thursday September 11, 2014 @10:09AM (#8302637)
FWIW, there are frameworks out there to make writing NSLayoutConstraints much more sensible. For example [1]

[1] https://github.com/Masonry/Masonry

Re:The Curious Case of iPhone 6+ 1080p Display by iamraymondc on Thursday September 11, 2014 @07:40PM (#8305858)
Hopefully apple has updated the storyboard tools to do all of the layout constraints. I remember back in xcode5, there were some constraints that were only possible via code :(
Re:The Curious Case of iPhone 6+ 1080p Display by mahyarm on Thursday September 11, 2014 @01:47PM (#8303982)
If your getting edge cases, why don't you just write your own layoutSubviews method and avoid using constraints except for very basic things? It's relatively simple stuff to write, and is more performant than autolayout, since layoutSubviews is O(1)-ish while autolayout looks like it's O(n^2).

If you don't believe me, look at this blog article that measures it: http://floriankugler.com/blog/2013/4/21/auto-layout-performa...

Re:The Curious Case of iPhone 6+ 1080p Display by Tepix on Thursday September 11, 2014 @04:21AM (#8301448)
It's not just a matter of layout, it's also a matter of making sure that UI elements are not too small and not too large.
Re:The Curious Case of iPhone 6+ 1080p Display by paulojreis on Thursday September 11, 2014 @04:54AM (#8301541)
That seems like the only thing that they managed to keep - the assured physical dimensions of UI elements. The 44 point as a minimum guideline for tappable button size is valid for all resolutions (4:3 1x, 4:3 2x, 16:9 2x, 16:9 3x).

P.S. At least on the iPhone. The iPad mini (sporting the same resolution as the physically bigger brothers) will produce smaller UI elements.