5 karma · joined Mar 1, 2012 (14y ago) · 2 submissions
comment 14y ago · link · parent
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.
comment 14y ago · link · parent
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