Update labels in UITableViewCell from multiple threads - ios

After getting the data from multiple device, I am reloading tableview but tableview is flashing the labels. For example, two rows are in tableview contains two labels each. When I call reload tableview, displaying data in first row and second row will be empty and when displaying second row, first row will be empty. Like that it is flashing please help me how can I solve this
like this I am reloading tableview
[devicesTableView performSelectorOnMainThread:#selector(reloadData)
withObject:nil
waitUntilDone:NO];
This is CellForAtIndexPath Method:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *simpleTableIdentifier = #"DeviceCustomTableViewCellIdentifier";
devicesCustomTableViewCell = (DeviceCustomTableViewCell *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (devicesCustomTableViewCell == nil)
{
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:#"DeviceCustomTableViewCell" owner:self options:nil];
devicesCustomTableViewCell = [nib objectAtIndex:0];
}
DeviceDetails *deviceDetailsEntity = [devicesArray objectAtIndex:indexPath.row];
devicesCustomTableViewCell.deviceName.text = deviceDetailsEntity.deviceLocalName;
for (int i=0; i<[dataArray count]; i++) {
DeviceParticulars *deviceParticulars = [dataArray objectAtIndex:i];
if ([[[deviceParticulars.peripheral identifier] UUIDString] isEqualToString:deviceDetailsEntity.deviceAddress]) {
devicesCustomTableViewCell.temperatureValueLabel.text = deviceParticulars.tempReadOutStr;
}
In this, DeviceDetails class is core data class, In that I am saving BLE device name as per requirement.
DeviceParticulars class is NSObject class for saving data from multiple BLE devices like I am getting temperature from multiple devices. I am displaying Temp values in tableview.
dataArray is an array contains DeviceParticulars object.

Reloading the entire table every time a peripheral value changes is expensive and, as you are seeing, has visual impacts.
You can change your custom cell to act as a delegate to your model object - DeviceParticulars
In your DeviceParticulars.h file, register the delegate property and protocol
#property (weak,nonatomic) id delegate;
#protocol DeviceParticularsDelegate
- (void)didUpdateDevice:(DeviceParticulars *)device;
#end
In your DeviceParticulars.m file, where you update readings, call
[self.delegate didUpdateDevice:self];
Then in your DeviceCustomTableViewCell.h, add <DeviceParticularsDelegate> to the class definition and add a property to store your deviceParticulars
#property (strong,nonatomic) DeviceParticulars *myDevice;
In the .m implement the delegate method
-(void)didUpdateDevice:(DeviceParticulars *)device {
// Update cell labels as required
}
and implement prepareForReuse
- (void)prepareForReuse {
self.myDevice.delegate=nil; // Remove this cell as delegate for existing device;
}
Finally, set the delegate in your cellForRowAtIndexPath
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *simpleTableIdentifier = #"DeviceCustomTableViewCellIdentifier";
devicesCustomTableViewCell = (DeviceCustomTableViewCell *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (devicesCustomTableViewCell == nil)
{
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:#"DeviceCustomTableViewCell" owner:self options:nil];
devicesCustomTableViewCell = [nib objectAtIndex:0];
}
DeviceDetails *deviceDetailsEntity = [devicesArray objectAtIndex:indexPath.row];
devicesCustomTableViewCell.deviceName.text = deviceDetailsEntity.deviceLocalName;
for (int i=0; i<[dataArray count]; i++) {
DeviceParticulars *deviceParticulars = [dataArray objectAtIndex:i];
if ([[[deviceParticulars.peripheral identifier] UUIDString] isEqualToString:deviceDetailsEntity.deviceAddress]) {
deviceParticulars.delegate=deviceCustomTableViewCell; //Set the delegate
devicesCustomTableViewCell.myDevice=deviceDetails; //Set device property
devicesCustomTableViewCell.temperatureValueLabel.text = deviceParticulars.tempReadOutStr;
}

Try using the -dequeueReusableCellWithIdentifier:forIndexPath: method for iOS 6 and later. It will automatically instantiate a cell if there is no reusable one, so you don't have to check if cell==nil. Not sure what causes your problems but I think it's worth to try it.
Please let me know if it helps.

Related

Using iOS loadNibName to retrieve subclass of UITableViewCell

I have a UITableView filled with cells from a NIB-based subclass of UITableViewCell. I obtain each one like this:
+(id) getClassObjectFromNib:(NSString*) nibName subclassOf: (Class) cls owner:(id)own
{
id result = nil;
NSArray* topLevelObjects = [[NSBundle mainBundle]
loadNibNamed:nibName
owner:own
options:nil];
for ( id currentObject in topLevelObjects )
{
if ([currentObject isKindOfClass:cls])
{
result = currentObject;
[result retain];
break;
}
}
return result;
}
My call looks like:
#interface TargetViewController : UITableViewController
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *CellIdentifier = [TargetCell defaultReuseIdentifier];
TargetCell* cell = (TargetCell*) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = (TargetCell*) [UtilityHelper getClassObjectFromNib:CellIdentifier subclassOf:[UITableViewCell class] owner:self];
}
if ( nil != cell )
{
// Other initialization code for cell controls
cell.showsReorderControl = 1;
}
return cell;
}
But 'dealloc' never gets called on the cells when their view unloads. If I remove the 'retain' above, dealloc gets called, but the app crashes when a cell is deleted individually (via swipe) from the UITableView (crash due to message to deleted item).
Except for the single deletion case, releasing the items occurs property when the view unloads. The crash is "-[TargetCell _setDeleteAnimationInProgress:]: message sent to deallocated instance".
I discovered the problem was due to reloading the table view as part of the row deletion operation (in commitEditingStyle).
[self.tableView reloadData];
This appears to work for standard UITableViewCells but does not work when the cell is a subclass loaded from an XIB. Now I just alter the data source, delete the row (using deleteRowsAtIndexPaths) and return.

Save random number generated in Table View

My app is currently generating random numbers (see code below). What I want is to save that number once the user hits the "Save" button and show it on a table view.
#import "ViewController.h"
#interface ViewController ()
#end
#implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
[self.clickyButton setTitle:#"Generate" forState:UIControlStateNormal];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)handleButtonClick:(id)sender {
// Generates numbers 1 to 49, without creating duplicate numbers.
NSMutableSet * numberSet = [NSMutableSet setWithCapacity:5];
while ([numberSet count] < 7 ) {
NSNumber * randomNumber = [NSNumber numberWithInt:(arc4random() % 49 + 1)];
[numberSet addObject:randomNumber];
}
NSArray * numbers = [numberSet allObjects];
self.n1.text = [NSString stringWithFormat:#"%#", [numbers objectAtIndex:0]];
self.n2.text = [NSString stringWithFormat:#"%#", [numbers objectAtIndex:2]];
self.n3.text = [NSString stringWithFormat:#"%#", [numbers objectAtIndex:3]];
self.n4.text = [NSString stringWithFormat:#"%#", [numbers objectAtIndex:4]];
self.n5.text = [NSString stringWithFormat:#"%#", [numbers objectAtIndex:5]];
self.n6.text = [NSString stringWithFormat:#"%#", [numbers objectAtIndex:6]];
}
#end
Please explain me how I can save it on a table view. xcode beginner.
You should create a variable that's accessible within the scope of the whole class rather than just the specific -handleButtonClick: method, and then add the generated numbers to that variable - an array, set, etc...
From there, you can implement the table view to read the values from the variable via var[indexPath.row] (assuming it's an array), and display it. You will need to call [tableView reloadData]; once the array has been filled with objects to make sure that the tableview displays the data.
create a NSMutableArray for UITableViewDataSource and cache the number.
when a number created by the user,add this number into NSMutableArray.
reload UITableView and show all numbers.
If you use only one number you should think about displaying it in another UI element, preferably a UILabel I would say.
If you want to use a UITableView you will either have to create it with static cells (e.g. in a Storyboard) or configure the data source and delegate object for it (which doesn't really seem what you want right now, unless maybe if you wanted to display multiple random numbers in a list...)
Before anything you should make the array numbers as a variable. In that way it is much easier than creating n1,n2,n3,.... I will show you how to solve your problem based on an existing numbers NSArray variable defined.
You need to implement the UITableView delegates in your header file. So let's suppose this is your header file after implementing the delegates:
#import <UIKit/UIKit.h>
#interface ViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>
#property (weak, nonatomic) IBOutlet UITableView *tableView;
#end
Then take your tableview (IBOutlet or programatically) and set the dataSource and delegate in the implementation file. You should do this in the viewDidLoad: method like this:
[_tableView setDelegate:self];
[_tableView setDataSource:self];
After you have done this you need to implement the delegate methods for the UITableView. This ones:
This method will tell the Table View how many rows it needs to show. In your case is the size of the NSArray called numbers:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return numbers.count;
}
This method will tell the Table View what to show on each cell (DON'T FORGET TO ASSING THE CELL IDENTIFIER OF THE CELL IN THE INTERFACE BUILDER TO "Cell")
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellIdentifier = #"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
}
cell.textLabel.text = [numbers objectAtIndex:indexPath.row];
return cell;
}
Use this method if you want to do something when the user touches a cell in the table view:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
}
Finally to add numbers to the list as the user touches the button you just need to add these lines of code to your method triggered by the button:
- (IBAction)handleButtonClick:(id)sender {
// Generates numbers 1 to 49, without creating duplicate numbers.
NSMutableSet * numberSet = [NSMutableSet setWithCapacity:5];
while ([numberSet count] < 7 ) {
NSNumber * randomNumber = [NSNumber numberWithInt:(arc4random() % 49 + 1)];
[numberSet addObject:randomNumber];
}
//In case you want to delete previous numbers
[numbers removeAllObjects];
numbers = [numberSet allObjects];
[_tableView reloadData];
}

CustomCell label value does not change

I have created a customCell with UIButton and UILabel
code here:
ItemViewController.h:
#interface ItemViewController : UIViewController<UITableViewDelegate,UITableViewDataSource>
{
NSArray *arr;
IBOutlet ItemCustomCell *itemCell;
}
#property(nonatomic,retain)IBOutlet UITableView *tblItem;
ItemViewController.m
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier = #"SimpleTableItem";
ItemCustomCell *cell = (ItemCustomCell *) [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil) {
[[NSBundle mainBundle] loadNibNamed:#"ItemCustomCell" owner:self options:nil];
cell = itemCell;
}
cell.btnPlus.tag=indexPath.row;
[cell.btnPlus addTarget:self action:#selector(incrementValue:) forControlEvents:UIControlEventTouchUpInside];
return cell;
}
-(void)incrementValue:(UIButton *)btnAdd
{
NSLog(#"btn%d",btnAdd.tag);
NSIndexPath *indexPath=[NSIndexPath indexPathForRow:btnAdd.tag inSection:0];
ItemCustomCell *cell = (ItemCustomCell*)[tblItem cellForRowAtIndexPath:indexPath];
cell.lblCount.text=[NSString stringWithFormat:#"%d",[cell.lblCount.text intValue]+1];
}
ItemCustomCell.h
#interface ItemCustomCell : UITableViewCell
{
}
#property(nonatomic,strong)IBOutlet UIButton *btnPlus;
#property(nonatomic,assign)IBOutlet UILabel *lblCount;
Default value of label is 1. When I click on the button it displays next value.
When I scroll up or down the tableView label value reset to 1. What I am doing wrong here?
For customCell, you need to specify its reuse identifier and its class name in Xib and load to your cell for reuse:
cell = [[[NSBundle mainBundle] loadNibNamed:#"ItemCustomCell" owner:self options:nil] lastObject];
EDIT
It's better to use IBOutlet and delegate to implement action inside CustomCell then use tag.
//ItemCustomCell.h
#class ItemCustomCell;
#protolcol ItemCustomCellDelegate
-(void) clickPlusButtonInsideCell:(ItemCustomCell *)cell;
#end
#interface ItemCustomCell
#property(weak, nonatomic) id<ItemCustomCellDelegate> delegate;
//Hookup with your view in Xib
#property (weak, nonatomic) IBOutlet UILabel *label;
-(IBACtion)clickPlusBut:(id)sender;
#end
//ItemCustomCell.m
-(IBACtion)clickPlusBut:(id)sender{
[self.delegate clickPlusButtonInsideCell:self];
}
Use
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier = #"SimpleTableItem";
ItemCustomCell *cell = (ItemCustomCell *) [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil) {
cell = [[[NSBundle mainBundle] loadNibNamed:#"ItemCustomCell" owner:self options:nil] lastObject];
}
cell.delegate = self;
return cell;
}
-(void) clickPlusButtonInsideCell:(ItemCustomCell *)cell{
cell.label.text = #"something";
}
The problem is that you are setting the value of your label from a function associated to your button.
When you scroll your view, making your cell disappearing and re-appearing, your controller rebuild your cell.
So if you don't save the value of your label, you will lose it everytime your cell go out of the screen.
Add something (like an array) to save the value for each of your label. increase the value saved in the same time you are incrementing the value displayed.
You need to store the data seperately, in an array of integers for example. And when you show the cell get the value from the array.
Right now your value is stored in the label, but when you refresh you lose that data and it resets to the default value of 1.
So in your cellForTableRow you set the label text to the value from the array. And in your second method you increase the value stored in the array and then reload data (or change the label manually like you do now.)
You should follow the following approach while using UITableViewCell from nib.
if (cell == nil) {
NSArray *topLevelArray = [[NSBundle mainBundle] loadNibNamed:#"ItemCustomCell" owner:self options:nil];
cell = [topLevelArray objectAtIndex:0];
}
You already have answers about storing the state of the cell outside the cell, because it gets reset when it is recycled. Those are correct.
If the selected state is important - then store it in the object that the cell is representing. That way, if you are configuring the cell based on this object, it will correctly persist through recycling.
If the state is transient, and doesn't need to be stored in the object, you need to store this state somewhere. There are a couple of answers about using an NSArray to store this state. I personally prefer to use an NSDictionary with the indexPath as the key. Since NSIndexPath conforms to NSCopying it can be used as the key for an NSDictionary.
Found a solution, in numberOfSectionInTableView i have to apply a condition based on the state of the tableview and change the label value accordingly. i was using paging so that is the solution.
if someone else is not using paging in a tableview then just set a value before sending a JSON request and apply condition based on the value in numberOfSectionInTableView and it will work.
Your code is displaying next value because your are incrementing value on button click.
cell.lblCount.text=[NSString stringWithFormat:#"%d", [cell.lblCount.text intValue]+1];
And tableView label value are resetting to 1 because new cell creates each time.
You should need to know more about tableview how it work and how to use reusable cell. Have a look this article A Closer Look at Table View Cells

Weird value coming from TableViewController which is filled with data from JSON

Today I encountered bug, that I'm unable to replicate and it is very confusing for me.
Ok little background:
I'm currently working on app, that has tab bar controller as initial view controller. There are several nav controllers connected to different tab bar items.
One of them is a tableViewController, that is populated from JSON.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier = #"SimpleTableItem";
SimpleTableCell *cell = (SimpleTableCell *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil)
{
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:#"SimpleTableCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
}
//NSMutableArray for storing loaded values
[pics addObject:imageLoad];
[names addObject:[aucdict objectForKey:#"name"]];
[idcka addObject:[aucdict objectForKey:#"auction_id"]];
// Configure the cell...
cell.nameLabel.text = [aucdict objectForKey:#"name"];
cell.priceLabel.text = [NSString stringWithFormat:#"%#",priceString];
cell.timeLabel.text = [NSString stringWithFormat:#"%#",timeString];
cell.thumbnailImageView.image = imageLoad;
return cell;}
After clicking on row, I perform performSegueWithIdentifier:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[self performSegueWithIdentifier:#"showAuctionDetail" sender:self];}
and in prepareForSegue I send some data to next ViewController
-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
namesArray = [[NSArray alloc] initWithArray:names];
picsArray =[[NSArray alloc] initWithArray:pics];
IDarray = [[NSArray alloc] initWithArray:idcka];
if ([segue.identifier isEqualToString:#"showAuctionDetail"])
{
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
detailViewController *dViewController = segue.destinationViewController;
dViewController.selectedAuctionTitle = [namesArray objectAtIndex:indexPath.row];
dViewController.auctionPic = [picsArray objectAtIndex:indexPath.row];
dViewController.id_aukcie = [IDarray objectAtIndex:indexPath.row];
}}
Now comes my problem. Sometimes (this really confuses me, because it I haven't found when does it happen) when I start the application, and tap on some row, I get totally different data passed to DetailViewController. The only thing, I can guess is that my arrays are different (they contain more or less values) than actual JSON response. But that would mean, my app would crash if I clicked on first or last item in table (index out of bounds or something like that), that never happened.
I've seen this bug happened maybe 5 times randomly. I tried to run and quit app for 20 times in a row and it happened only once.
P.S. I know that class name (detailViewController) should start with capital letter, I apologize for that :)
edited: as rdelmar suggested
I think the problem is having the call out to the server in the cellForRowAtIndexPath: method. You should put that code in viewDidLoad, and then when the data has come back, and is finished parsing, call reloadData on your table view.

IOS Static Table with Custom Cell only draws a random cell

I am trying to create a "settings" table view for my app. I am trying to mimic it to be the same style as the gneral setting on an Iphone. I have created my own custom cell class by inheriting from UITableCell. I gave it the appropriate IBOulets and i have hooked them up in the storyboard. I also hooked up the switch to my tableViewControler, but for some reason my code is only returning me one empty cell (it being only one cell is not an issue atm for that's all i have in my setting). I triple checked and made sure that I'm using the same cell identifier in my code and in storyboard. Anyone know why I'm getting a blank cell back?
Here is my .h file for my custom cell.
#interface NHPSettingsCell : UITableViewCell
#property (nonatomic,weak) IBOutlet UILabel *settingLabel;
#property (nonatomic,strong) IBOutlet UISwitch *settingSwitch;
#end
MY Problem code is here, my .h file for the custom cell:
#import "NHPSettingsCell.h"
#implementation NHPSettingsCell
#synthesize settingLabel, settingSwitch;
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
// Initialization code
}
return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
#end
My method for drawing the cell in my custom view controller:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = #"SettingsCell";
NHPSettingsCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[NHPSettingsCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
cell.selectionStyle = UITableViewCellStyleDefault;
}
cell.settingLabel.text = #"firstSetting";
//check the if user wants promt of disclaimer each time or not.
if([prefs boolForKey:#"firstSetting"] == YES){
cell.settingSwitch.on = YES;
}else{
cell.settingSwitch.on = NO;
}
return cell;
}
Now the thing that annoys me is i have successfully managed to implement the cellForRowAtIndexPath method for a dynamic table that uses custom cells. I have also implements the code for a static table using the default cell, but for a static table with custom cells it just doesn't seem to work. Here is the code on how I implemented my custom cells on a dynamic table (note how i didn't have to init the cells but it works).
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = #"InteractionResultCell";
NHPResultCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
// Configure & Fill the cell
cell.leftLabel.text = [[resultsList objectAtIndex:indexPath.row] substanceName];
cell.rightLabel.text = [[resultsList objectAtIndex:indexPath.row] substanceName2];
NSString *color = [NSString stringWithFormat:#"%#", [[resultsList objectAtIndex:indexPath.row] color]];
//Change a hex value to a readable 0x number to pass ot hte macro so we can go from a hex color to a RGB system.
NSScanner *scanner;
unsigned int tempint=0;
scanner = [NSScanner scannerWithString:color];
[scanner scanHexInt:&tempint];
cell.severityButton.backgroundColor = UIColorFromRGB(tempint);
return cell;
}
Two problems:
If you are using static cells, do not implement any datasource methods in your view controller (numberOfRows, numberOfSections, cellForRow...) as this will override what you have built in the storyboard. The table has the sections, rows and content you give it in the storyboard.
Cells loaded from the storyboard (either dynamic prototypes, or static cells) are initialised using initWithCoder:, not initWithStyle:. awakeFromNib: is a better place to put your set up code.
dequeueReusableCellWithIdentifier: works only if a cell has already been created to prevent repeated memory allocations. You cannot reuse a cell without creating it first. The static cells created in the xib are the default type. That's why it doesn't work for static table with custom cells. Add the cell creation code after reuse as you've done in your custom view controller's cellForRowAtIndexPath: method:
if (cell == nil) {
cell = [[NHPSettingsCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
cell.selectionStyle = UITableViewCellStyleDefault;
}
EDIT- To init your custom cell, you'll have to load from xib. Add the following class method to your NHPSettingsCell.m:
+(NHPSettingsCell*) createTextRowWithOwner:(NSObject*)owner{
NSArray* wired = [[NSBundle mainBundle] loadNibNamed:#"NHPSettingsCell" owner:owner options:nil];
NHPSettingsCell* cell = (NHPSettingsCell*)[wired firstObjectWithClass:[NHPSettingsCell class]];
return cell;
}
and then call it from your custom view controller as:
cell = (NHPSettingsCell*)[tableView dequeueReusableCellWithIdentifier: CellIdentifier];
if (Nil == cell) {
cell = [NHPSettingsCell createTextRowWithOwner:self];
}

Resources