Saturday, November 29, 2014

The new UISplitViewController, Swift and iOS 7

I was playing around with Swift today and stumbled upon the new awesome UISplitViewController in iOS 8. This enhanced version of the controller makes it work for all iOS devices (originally, it only works with iPads). With the introduction of the "phablet", Apple had to improved their SDK to make it easier for devs to build app that works across all screen sizes. That's a good thing, but a little too late IMHO.

Anyway, back to UISplitViewController, the app created by the Xcode template only works with iOS 8 so I tried to dig in and see if it is possible to support iOS 7 with the same code, same storyboard and everything. It looked like it was possible. Many people tried that, particularly this blog post, but the best solution out there still doesn't have it working smoothly in iPad portrait mode where it should show a button to open the master view in a popup... After a few hours looking around, I finally found the solution and have a demo project available at github.com. Check it out now and I hope you find it useful.

Below are some screenshots:

UISplitViewController in iPad/iOS 7: button with text
UISplitViewController in iPad/iOS 8: button with text + arrow

UISplitViewController in iPhone 5s/iOS 7: button with text + arrow
UISplitViewController in iPhone 5s/iOS 8: button with text + arrow



UISplitViewController in iPhone 6+ landscape: fullscreen button

Download demo project here.


Thursday, November 13, 2014

The Cloud

It's such a good feeling to get a new phone and within minutes you have it running exactly as you like, thanks to the Cloud. The Cloud has its up and down ("Nobody understands the Cloud. It's a fucking mystery!"), yes but what else doesn't? Even people have their freaking mood swings.

All major players are improving their offering to tie users to their Clouds because that strategy pulls in customers for them and also helps with competing in the market. And it works. The Cloud comes in many shapes and forms but in general, user experience is way better. Everyone can do whatever they want fast, securely and conveniently (given that they have a decent internet connection of course). I really think the Cloud will be the future. Everything we are going to do will be on the Cloud. The pieces of hardware we have in the house, at our workplaces or in our pockets are just terminals. They could be broken, water damaged or stolen, who cares! Insurance would just replace it with the latest shiniest gear and you are good to go.

It's funny to think how we are going back to something similar to the old days server vs. dumb terminal. At least the terminals are smart now, that's some progress.