It looks like a MonoTouch bug to me. The Obj-C selector being sent to the
instance is wrong. It should be apportionsSegmentWidthsByContent and not
setApportionsSegmentWidthsByContent.
What iOS version is your iPad running?
ApportionsSegmentWidthsByContent is iOS5 only. Using that property seems to
work on my iPad with iOS5.1 installed...
You could try something like this to avoid 'unknown selector' errors
if (*yourSegmentedControl*.RespondsToSelector(new
19, 2012 4:37 PM
To: Roy Goode
Cc: Dean Cleaver; monotouch@lists.ximian.com
Subject: Re: [MonoTouch] Problem with UISegmentedControl on iPad
Hey,
Roy, it's a property. See
http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/ObjectiveC/Chapters/ocProperties.html#//apple_ref/doc
Thanks Sebastien, sorry, I stand corrected and educated!
To be honest, I figured I was mistaken moments after writing the line The
property was added in iOS 5.0. But I'd instinctively clicked the Send
button and it was too late.
On 19 March 2012 16:36, Sebastien Pouliot sebast...@xamarin.com