ios - UITableView not loading cell data when scrolling -


There is a UITableView setup on my view controller using my prototype cell when it loads the view controller when it loads my database (The code removed for security reasons), uses CustomisationObject to create a new object and then stores it in an orange.

When I run the application 4 loaded cells, right values ​​stored in local arrays.

Enter image details here

When I left the remaining two cells Scroll down to see if they are not loaded, then the values ​​are empty.

Enter image details here

Custom cell class

CustomizationCell.h

  #in Import & lt; UIKit / UIKit.h & gt; @Intefus Customization Cell: UITTEWewsell Property (Vulnerable, Notatomic) IBotllet UILBL * Title Oatlet; @property (weak, non-monomitive) ibotlet uislider * slider oleate; @end  

CustomizationCell.m

  #import "CustomizationCell.h" @implementation CustomizationCell @synthesize titleOutlet, sliderOutlet; - (id) initWithStyle: (UITableViewCellStyle) style reuseIdentifier: (NSString *) reuseIdentifier {self = [super initWithStyle: style reuseIdentifier: reuseIdentifier]; If (auto) {// initial code} returns itself; } - (zero) awakeFromNib {// Initial Code} - (zero) setset: (BOOL) selected animated: (BOOL) animated ([Super set selected: selected animated: animated]; // Configure view for selected state} @end  

Object Class

CustomizationObject.h

  @Inface Customization Object: NSBKect @ Property (Nonomatic, Weak) NSSTING * Local Channel; @ Property (Nonomatic, Vulnerable) NSSTing * Local Values; @end  

See Controller Class

CustomizationViewController.h

  #import & lt; UIKit / UIKit & Gt; @Instefus Customization VICI Controller: UIViewController & lt; UITableViewDelegate & gt; @end  

CustomizationViewController.m

  #import "CustomizationViewController.h" #import "CustomizationCell.h" #import "Customization Object." @Interface Customization VIC Controller (@ @Menture @ Implementation Customization Week Controller NSMUtableEre * LocalArray; - (zero) viewDidoadload [[Super Viewedload]; // SQL code deleted - reset query as a result local error = [[NSMUTABELARROR] INIT]; While ([resulting in the next]) {Customization object * Customization object = [[Custige object light] Init]; CustomizationObject.localChannel = [The resulting stringfor column: @ "COLUMN_ONE"]; CustomisationObject.localValue = [The resulting stringfor column: @ "COLUMN_TWO"]; [Local add-on object: custom object]; } [Close the database]; } - (NSInteger) numberOfSectionsInTableView: (UITableView *) tableview {return1; } - (NSInteger) tableView: (UITableView *) tableView numberOfRowsInSection: (NSInteger) section {return [localArray count]; } - (UITableViewCell *) tableView: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath {CustomisationCell * cell = [tableView dequeueReusableCellWithIdentifier: @ "cell" forIndexPath: indexPath]; Cell.titleOutlet.text = [[Local Area ObjectOndex: [IndexPath Row]] Local Channel]; Cell.sliderOutlet.value = [[[LocalArray objectAtIndex: [indexPath line]] localValue] intValue]; Return cell; } @end  

If I change the height of the table view then all 6 cells fit (no scrolling is required) they all load as expected, only when The cell seems to come within and out of the game.

After

all sorted. It needs to copy the memory properties and does not weaken in the customization object.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -