• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UITableView with only 1 row selectable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UITableView with only 1 row selectable


  • Subject: Re: UITableView with only 1 row selectable
  • From: Ricky Sharp <email@hidden>
  • Date: Fri, 24 Dec 2010 11:59:23 -0600

On Dec 24, 2010, at 11:28 AM, Remco Poelstra wrote:

> Hi,
>
> I'm unable to find that method. Is it still available?
>
> Kind regards,
>
> Remco
>
> Op 24 dec. 2010 om 14:01 heeft Ricky Sharp <email@hidden> het volgende geschreven:
>
>>
>> On Dec 24, 2010, at 4:01 AM, Roland King wrote:
>>
>>> Why not do it the other way around. Set allowsSelection to YES and then implement the delegate method tableView:willSelectRowAtIndexPath: to return nil for any row you do NOT want selected (see the documentation). That seems to be apple's designed way to do this.
>>
>> Actually, tableView:shouldSelectRow: should be used instead.  Have it return YES only for rows that are selectable.  I'll also assume that the OP is presenting the non-selectable rows differently (e.g. "dimming" them) to ensure that users will understand what is selectable and what is not.

Very sorry for this bad info; when searching for APIs, I had both Mac OS X and iOS doc sets enabled.

tableView:willSelectRowAtIndexPath: as was pointed out earlier is what you want.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com



_______________________________________________

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

References: 
 >UITableView with only 1 row selectable (From: Remco Poelstra <email@hidden>)
 >Re: UITableView with only 1 row selectable (From: Roland King <email@hidden>)
 >Re: UITableView with only 1 row selectable (From: Ricky Sharp <email@hidden>)
 >Re: UITableView with only 1 row selectable (From: Remco Poelstra <email@hidden>)

  • Prev by Date: NSTextField in NSMenuItem
  • Next by Date: UISearchDisplayController in UIToolbar on iPad
  • Previous by thread: Re: UITableView with only 1 row selectable
  • Next by thread: Edit text bounding boxes
  • Index(es):
    • Date
    • Thread