AFAIK Multiple bar button items is an iPad exclusive feature - I think you'll have to work out a different layout for the iPod/iPhone.
On 17 December 2011 01:50, jlindborg <[email protected]> wrote: > Went out and snagged a iPod Touch to test with and I'm glad I did - I have > several views I put two buttons in the RightBarButtonItems colleciton on > and > it crashes my app on the iPod, but works fine on my iPad as well as all > versions of the simulator I tried. Not sure if this is a poor idea or not. > Code looks like this in the ViewDidLoad: > > ======== > UIBarButtonItem _addButton = new UIBarButtonItem (UIImage.FromBundle > ("Images/more_24.png"), UIBarButtonItemStyle.Plain, > Handle_AddNewPrivateRecordingClicked); > > UIBarButtonItem _editButton = new UIBarButtonItem (UIImage.FromBundle > ("Images/delete_24.png"), UIBarButtonItemStyle.Plain, Handle_EditMode); > > NavigationItem.RightBarButtonItems = new UIBarButtonItem[] > {_addButton,_editButton}; > ======== > > on the iPod in debug mode it kicks this out: > > 2011-12-16 17:42:38.467 MultiPageTest[207:707] -[UINavigationItem > setRightBarButtonItems:]: unrecognized selector sent to instance 0x7188e70 > log: Unhandled exception at the applicaiton > level:MonoTouch.Foundation.MonoTouchException: Objective-C exception > thrown. > Name: NSInvalidArgumentException Reason: -[UINavigationItem > setRightBarButtonItems:]: unrecognized selector sent to instance 0x7188e70 > at MonoTouch.UIKit.UINavigationItem.set_RightBarButtonItems > (MonoTouch.UIKit.UIBarButtonItem[] value) [0x00000] in <filename unknown>:0 > > So... am I doing something ill advised and should change my ways or is this > a bug? > > -- > View this message in context: > http://monotouch.2284126.n4.nabble.com/iPod-Touch-unhappy-with-use-of-RightBarButtonItems-tp4207021p4207021.html > Sent from the MonoTouch mailing list archive at Nabble.com. > _______________________________________________ > MonoTouch mailing list > [email protected] > http://lists.ximian.com/mailman/listinfo/monotouch >
_______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
