Clancey / FlyoutNavigation

Other
95 stars 87 forks source link

How to adapt to be used as a slide control for toggle switch list #26

Closed mackcope closed 11 years ago

mackcope commented 11 years ago

Clancey, I need to update a WebView map based on what is toggled in a list. My idea is to use your slide-out menu to provide the functionality, and change the standard controls to be toggle switches. Any tips on how I might do that? Thanks!

Clancey commented 11 years ago

I am already using it that way in gMusic. My offline switch is just an element in the list.
If you pass null in the ViewController array for the switches, it will not try switching screens. You can instead just tie into the even for that particular element.

On Monday, July 1, 2013 at 12:57 PM, mackcope wrote:

Clancey, I need to update a WebView map based on what is toggled in a list. My idea is to use your slide-out menu to provide the functionality, and change the standard controls to be toggle switches. Any tips on how I might do that? Thanks!

— Reply to this email directly or view it on GitHub (https://github.com/Clancey/FlyoutNavigation/issues/26).

mackcope commented 11 years ago

Thanks! I'll try that.

mackcope commented 11 years ago

I have been trying to apply your suggestion and I want to make sure that I am doing what you specified. Do you mean that I would set the FlyoutNavigationController.ViewControllers property to null? I am not sure what you mean by "pass null in the ViewController array for the switches." Could you elaborate a little more? Thanks!

androidcn commented 11 years ago

NavigationRoot = new RootElement ("Navigation") { new Section ("Pages") { new StringElement ("Animals"), new StringElement ("Vegetables"), new StringElement ("Minerals"), new switchElement(), nee booleanElement() } }, // Supply view controllers corresponding to menu items: ViewControllers = new [] { new UIViewController { View = new UILabel { Text = "Animals (drag right)" } }, new UIViewController { View = new UILabel { Text = "Vegetables (drag right)" } }, new UIViewController { View = new UILabel { Text = "Minerals (drag right)" } }, }

try it

mackcope commented 11 years ago

That makes sense, thanks for your help!