• 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
Table view question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Table view question


  • Subject: Table view question
  • From: Dave <email@hidden>
  • Date: Wed, 7 Apr 2010 16:27:39 +0100

Hi All,

I was wondering if it is possible to change an Object in the underlying array associated with a Table View and have the Table update?

If the user clicks an entry in the table I want to change the string on one of the rows in a section. My table is arranged as a Number of Sections with 4 rows per section, as in:

Section 0
   Row 1
   Row 2
   Row 3
   Row 4

Section 1
  Row 1
  Row 2
  Row 3
  Row 4


For example, if the user clicks on Section 1, Row 3, I want to grab the Object (an NSString) for that section/row and change it.


So if the value was "one", then the users clicks it, I want it to change to "two"
If "two" change it to "three"
If "three change it to "four"
If "four change it to "one"


Is it possible to change it in-situ or do I have to remove the object, change it and add it back?

Also is it ok to do this inside the "cellForRowAtIndexPath" method?

Thanks a lot
All the Best
Dave




_______________________________________________

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: Table view question
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: exceptions when NSTextStorage initialized with empty string
  • Next by Date: Re: exceptions when NSTextStorage initialized with empty string
  • Previous by thread: Re: Core Data: binding to a sum
  • Next by thread: Re: Table view question
  • Index(es):
    • Date
    • Thread