Hi,
Using Composer, I am trying to implement a swipe style navigation, as seen in Mail or Notes. Eg:
http://tech4eleven.com/wp-content/uploads/2013/10/navigate-swipe-email-ios7.png
http://cdn.iphonehacks.com/wp-content/uploads/2013/09/swipe-to-go-back.jpg
The user interaction is this: From a document or sub-level menu, swiping from the left edge of the screen towards the right will pull the current display across the screen. The parent menu level will be revealed and, after reaching a certain point on the screen, releasing the drag will cause the current display to complete the transition itself, effectively navigating to the parent menu.
Notes uses this to move the user from the note file to the list of notes and Mail uses it to move from an email to the Inbox and then again to the list of accounts.
I have tried building this using Composer. The technique would be to have a touch area to start the drag and move the current sceneGroup with the touch. If the touch/drag is released before getting, for example, 33% across the screen, a transition is used to put the sceneGroup back to where it started.
If the touch/drag is released in the right 66% of the screen, a transition is used to move the sceneGroup all the way to the right of the screen. Two problems occur here:
-
The sceneGroup below needs to be ‘manually’ affected to make it visible because Composer has set it’s isVisible property to false. This is straightforward and, while a bit of a hack, works fine.
-
At the completion of the transition, to complete the navigation back to the previous scene, composer.gotoScene([name]) should be called, of course. This will cause composer to handle all the usual scene transitions (here, these are suppressed by the lack of parameters) and event firing present when changing scenes. What it also does is cause the flickering of the scene behind, due to the direct control that Composer has on the sceneGroups.
So, the question here is: Does anyone have a good, clean method of performing this type of transition without screwing with Composer so much that it is obviously visible? My preference, of course, would be that composer does all it’s usual handling, minus the direct placement of the sceneGroups, but that, it would seem, is not an option at present.
Cheers,
Matt