mutableArray contents gets corrupted in "cellForRowAtIndexPath" func of UITableView

Discussion in 'iOS Programming' started by pravara15, Nov 17, 2009.

  1. pravara15 macrumors newbie

    May 14, 2009
    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. robbieduncan Moderator emeritus


    Jul 24, 2002
    Post all the code. Without it we cannot help.
  3. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    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