HNHacker News
TopNewBestAskShowJobs

nomadromrom

5 karma · joined March 1, 2012

submissionscomments
nomadromrom··on Making of an iPhone app design (Sharypic)
It's still the same. It's a real pain :(

For instance the 'like' and 'share/invite' buttons are composed of several labels and images, and their position is computed depending on screen orientation, size of the button icon, internationalisation of the strings and length of the badge item (the 'like' badge indicates a count). There's a transparent UIButton which sits on top of all these widgets to get the tap event. And we're changing the background image when the user taps in/out/up/down the button.

nomadromrom··on Making of an iPhone app design (Sharypic)
The sidebar isn't a stock Apple API. Before implementing it, I've been benchmarking a few frameworks on github, none of them being appropriate for the app needs. I wanted the facebook sidebar-like menu but being able to use a standard UINavigationController for the rest of the navigation in the app. In the Facebook app, they've implemented their own view navigation system.

So in the sharypic app, it's a custom implementation where the sidebar view is added directly to the main UIWindow, but below the rootViewController. Tapping the menu button triggers an animation to move the whole rootViewController's view left/right.

It's not ideal because the sidebar view controller doesn't get the orientation change info anymore and making all the views stay in place requires an important amount of hacks (for instance presenting a modal view controller while the rootViewController is shifted on the right causes the rootViewController to be placed back to its original position). The code actually can't be exposed as a reusable framework because of all the hacks implemented here and there.

Since then, I stumbled upon https://github.com/edgecase/ECSlidingViewController, which can be a good candidate for a sidebar implementation, and I might switch to it for the future of the sharypic app.

Romain, developer of the sharypic app