Results 1 to 2 of 2

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.

Thread: NSDictionary objectAtIndex

  1. #1
    Default NSDictionary objectAtIndex
    Hi people,
    I'm trying to acces an NSDictionary for a table view.
    Now my problem is that in apple's example they use

     [aNSDictionary objectAtIndex:intIndex];
    but htis method is deprecated, if you look in the reference of NSDictionary they eliminated this moethod but i don't understand what I must use instead...
    I'm little bit confused please help


  2. #2
    Where was the example?

    objectAtIndex: is an NSArray method, not an NSDictionary method.

    An array is indexed by integers, a dictionary is indexed by keys, which can be any Objective-C object (hence
    - (id)objectForKey:(id)aKey

    Typically you would use NSString as keys, but you can do more sophisticated things.
    Starlight Computer Wizardry
    Pocket-sized Development
    Follow me on twitter: @NetMage

  3. The Following User Says Thank You to NetMage For This Useful Post:

    beit (2008-08-18)

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts