Re: Table view cell getting deselected in popover
Re: Table view cell getting deselected in popover
- Subject: Re: Table view cell getting deselected in popover
- From: Rick Mann <email@hidden>
- Date: Fri, 16 Nov 2012 16:07:22 -0800
On Nov 16, 2012, at 7:06 , Fritz Anderson <email@hidden> wrote:
> On 16 Nov 2012, at 3:15 AM, Rick Mann <email@hidden> wrote:
>
>> I have a UITableViewCell in a UINavController in a UISplitView. When in portrait, the selected cell gets deselected at some point after dismissing the popover containing the table view. Even though I implemented -didDeselectRowAtIndexPath: and -didUnhighlightRowAtIndexPath: (which get called during normal interaction with the table), they're not getting called during popover dismissal. Nor is the table being reloaded.
>>
>> Something else is deselecting the selected row. I don't want it to do that.
>>
>> I can select a row, see it turn blue, dismiss the popover, watch it slide off the screen (row still selected), bring the popover back, and see the row deselected.
>>
>> Anyone see this, and know of a workaround? Thanks.
>
> I assume the master view (within the nav controller) is a UITableViewController? Have you tried setting the controller's . clearsSelectionOnViewWillAppear to NO?
Ah. While unchecked in IB, it was still being set to true. Programmatically setting it to false fixed the issue. Yet another feature that one is not led to by the docs (a "See -[UITableViewController clearsSelectionOnViewWillAppear] next to the selection-related delegate methods would've helped).
Thanks a ton!
--
Rick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden