Bug 1814 - Exception with 4.3 SDK: UITableView.MoveRows: unrecognized selector sent to instance
Summary: Exception with 4.3 SDK: UITableView.MoveRows: unrecognized selector sent to i...
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 4.x
Hardware: Macintosh Mac OS
: High major
Target Milestone: Untriaged
Assignee: Sebastien Pouliot
Depends on:
Reported: 2011-11-01 13:23 UTC by Ivan Nikitin
Modified: 2012-01-09 09:24 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Sample project (8.56 KB, application/zip)
2011-11-01 13:23 UTC, Ivan Nikitin

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Ivan Nikitin 2011-11-01 13:23:53 UTC
Created attachment 800 [details]
Sample project

I have troubles with the latest 5.0.1 build and iOS 4.3. A call to
UITableView.MoveRow method throws NSInvalidArgumentException exception. This
happens with *4.3 devices/emulators only, 5.0 works perfectly*. That's
strange since moveRowAtIndexPath method signature didn't change since iOS
SDK 2.0.

Here is an exception stack trace:

-[UITableView moveRowAtIndexPath:toIndexPath:]: unrecognized selector sent
to instance 0x8299200
MonoTouch.Foundation.MonoTouchException: Objective-C exception thrown.
Name: NSInvalidArgumentException Reason: -[UITableView
moveRowAtIndexPath:toIndexPath:]: unrecognized selector sent to instance
 at (wrapper managed-to-native)
 at MonoTouch.UIKit.UITableView.MoveRow (MonoTouch.Foundation.NSIndexPath
fromIndexPath, MonoTouch.Foundation.NSIndexPath toIndexPath) [0x0002d] in
 at TableViewFailTestProject.TestController.HandleButtonTouchUpInside
(System.Object sender, System.EventArgs e) [0x00010] in
Comment 1 Sebastien Pouliot 2011-11-01 19:38:02 UTC
So 'moveRowAtIndexPath:toIndexPath:' [1] is new in iOS5 (and will fail in iOS4.x) but easily confused with 'tableView:canMoveRowAtIndexPath:' which is available since 2.0 [2]

[1] http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITableView_Class/Reference/Reference.html

[2] http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITableViewDataSource_Protocol/Reference/Reference.html