mutableArray contents gets corrupted in "cellForRowAtIndexPath" func of UITableView

Discussion in 'iPhone/iPad Programming' started by pravara15, Nov 17, 2009.

  1. macrumors newbie

    Joined:
    May 14, 2009
    #1
    Hi there,

    i have one Mutable array which contains objects of a class. When first time, view get loaded, data is displayed properly in table view.

    after that, when i tried to change the contents based on the value in picker control, the contents of mutable array shows, "Invalid".

    in the function "numberOfRowsInSection" of tableView, the contents of Mutable array are proper (what i want to display)

    but after that as soon as control goes to "cellForRowAtIndexPath" function, contents gets corrupted.

    Please let me know, how these two functions work?:confused:

    Thanx in advance.:)


    I have attached the code files, please find them.
     

    Attached Files:

  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Post all the code. Without it we cannot help.
     
  3. macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #3
    The usual cause of this is mistakes in memory management. If the array isn't retained correctly by the view controller then it won't be available in cellForRowAtIndexPath. How are you creating the array?
     

Share This Page