• 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
[iPhone] NSTableView and NSIndexPath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iPhone] NSTableView and NSIndexPath


  • Subject: [iPhone] NSTableView and NSIndexPath
  • From: Ryan Homer <email@hidden>
  • Date: Sat, 22 Mar 2008 21:31:09 +0800

NSTableView has a delegate method as follows:

- (UITableViewCell *)tableView:(UITableView *)tableView
	cellForRowAtIndexPath:(NSIndexPath *)indexPath
	withAvailableCell:(UITableViewCell *)availableCell


You can figure out which section and row of the table is in question using indexPath.section and indexPath.row respectively. However, I'm having a hard time creating my own NSIndexPath that has section and row as properties. Is this a special case of NSIndexPath?


What I'm really trying to do is that once I have my table built up (think of the contact list, where each section is labeled A, B, C, etc. and in each section there are multiple rows, one for each contact starting with that letter) I would like to programatically scroll to a particular section using UITableView's

scrollToRowAtIndexPath:atScrollPosition:animated:


However, I'm not sure how to create the NSIndexPath that's needed for the first parameter so that I can scroll to, say, section 3, row 0.


Any ideas?

Thanks!
_______________________________________________

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


  • Follow-Ups:
    • Re: [iPhone] NSTableView and NSIndexPath
      • From: Cathy Shive <email@hidden>
  • Prev by Date: Re: XML to RTF transformation via XSL
  • Next by Date: Re: [iPhone] NSTableView and NSIndexPath
  • Previous by thread: Re: Changing properties inside a relationship entity
  • Next by thread: Re: [iPhone] NSTableView and NSIndexPath
  • Index(es):
    • Date
    • Thread