On Tue, Apr 6, 2010 at 11:04 AM, Kalyanraju M <kalyan_effig...@yahoo.com> wrote:
> How could I make the first row not to be edited or moved in UITableView
>
> I know that with
> - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath 
> *)indexPath
> the first row could be set not to move but if another cell is dropped above 
> the first one this will we moved down so is moving in the end.
>

Implement this method:

- (NSIndexPath *)tableView:(UITableView *)tableView
targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath
*)sourceIndexPath toProposedIndexPath:(NSIndexPath
*)proposedDestinationIndexPath

Make it check proposedDestinationIndexPath and if it contains a spot
you don't want to be able to drag to (like section 0, row 0), your
method should return an alternate (like section 0, row 1)

-- 
// jack
// http://nuthole.com
// http://learncocoa.org
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to