Re: Segue exit action when using default <Settings button
Re: Segue exit action when using default <Settings button
- Subject: Re: Segue exit action when using default <Settings button
- From: Kyle Sluder <email@hidden>
- Date: Sat, 28 Mar 2015 02:20:08 -0600
On Sat, Mar 28, 2015, at 12:53 AM, Steve Mills wrote:
> I have a Settings scene, much like the iOS Settings app, with a table
> view. Each item segues to a unique scene via the show action. Each
> subscene then automatically gets a <Settings button to go back to the
> main Settings scene. When exiting each subscene, I want that controller's
> prepareForSegue:sender: to be called so I can save the settings to prefs
> at that point.
>
> All the tutorials for handling unwiding that I can find add specific
> Unwind or Go Back buttons to the scene's view, rather than using the
> automatic < Settings button. How can I set up the unwind action for these
> automatic <Settings buttons?
I'm assuming that "< Settings" is the standard back button here—that is,
your nav controller's root view controller's nav item's title is
"Settings".
Tapping on the back button does not fire a segue. One of our concerns is
that the behavior of the back button should be predictable: it should
always result in popping one view controller off the nav stack.
If you'd like to customize the animation that happens during the
transition, you can implement
-navigationController:animationControllerForOperation:fromViewController:toViewController:
on the navigation controller's delegate.
>
> Or should I instead just have all of the controls in each subscene just
> set the pref right when they're changed instead of waiting to unwind?
Yes, this is the expected user experience on iOS. Remember that the user
can always leave your app via the Home button. If they toggle a setting
and leave, then re-enter your app via a link or other means, they expect
their change to have been persisted.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden