in which way i can add programmatically an uiswitch as navigation items or btw on my navigation bar? i'm going crazy :D
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithCustomView: mySwitch] autorelease];
UISwitch *foo = [[UISwitch alloc] init];
UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithCustomView:foo];
self.navigationItem.rightBarButtonItem = item;
[item release];
[foo release];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With