I have a MonoTouch 5 app I have written. I am using a custom table cell. On that cell is a UIStepper.
When I run this on the 5.0 similator or a 5.0 iPad or iPod Touch everything works fine.
I would like to target older devices as well, but am having one issue.
On the custom cell when I go to set the stepper.MinimumValue I am getting the following exception:
Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[UIStepper setMinimumValue:]: unrecognized selector sent to instance 0x426bee0
I have read things about the cell being garbage collected and such, but unless those are OS specific none of them make sense as being the problem.
Any suggestions?
The problem is that the
UIStepperclass doesn’t exist before iOS 5. It was added with iOS 5 and you can’t use that class if you’re targeting iOS 4. I’m not sure how you do it with MonoTouch, but you’ll have to provide your own implementation of a stepper to replace the system implementation on iOS 4 and branch the code accordingly.