UIlabel gets shrink on scrolling UiTableView - iphone

I have two UILabel in side of UICell, which contains dynamic text so i need to resize its frame according to content, for which im using [string sizeWithFont] method to calculate the height of label view's frame inside of TableView heightForRowAtIndexPath to set the height of cell according to label height. Now what the problem is when i scroll my table, label inside of cell starts to shrink if i remove [label sizeToFit] method it doesn't shrink but from that my labels are getting overlapped which looks very messy. Where i am wrong please guide me..
here is my code for cellRowAtIndexPath method
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(#"cell");
BOOL ente = FALSE;
static NSString *CellIdentifier = #"CustomCell";
CustomCell *cell = (CustomCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:#"CustomCell" owner:nil options:nil];
for (id currentObject in topLevelObjects){
if ([currentObject isKindOfClass:[UITableViewCell class]]){
cell = (CustomCell *) currentObject;
ente = TRUE;
break;
}
}
}
/*
[cell.title sizeToFit];
[cell.dataTime sizeToFit];
CGSize size1 = [[mainEventArray objectAtIndex:[indexPath row]] sizeWithFont:[UIFont systemFontOfSize:13.0f] constrainedToSize:CGSizeMake(275, MAXFLOAT) lineBreakMode:UILineBreakModeWordWrap];
cell.title.frame = CGRectMake(50, 6, size1.width, size1.height);
CGSize size2 = [[mainEventTimeArray objectAtIndex:[indexPath row]] sizeWithFont:[UIFont systemFontOfSize:11.0f] constrainedToSize:CGSizeMake(275, MAXFLOAT) lineBreakMode:UILineBreakModeWordWrap];
cell.dataTime.frame = CGRectMake(50, 24, size2.width, size2.height);
*/
cell.title.text = [mainEventArray objectAtIndex:[indexPath row]];
cell.dataTime.text = [mainEventTimeArray objectAtIndex:[indexPath row]];
//if (ente) {
// NSLog(#"helllloo");
[cell.title sizeToFit];
[cell.dataTime sizeToFit];
//}
return cell;
}
and for heightForRowAtIndexPath method
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = #"CustomCell";
CustomCell *cell = (CustomCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
{
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:#"CustomCell" owner:nil options:nil];
for (id currentObject in topLevelObjects){
if ([currentObject isKindOfClass:[UITableViewCell class]]){
cell = (CustomCell *) currentObject;
break;
}
}
}
}
CGSize size1 = [[mainEventArray objectAtIndex:[indexPath row]] sizeWithFont:[UIFont systemFontOfSize:13.0f] constrainedToSize:CGSizeMake(230, MAXFLOAT) lineBreakMode:UILineBreakModeWordWrap];
cell.title.frame = CGRectMake(0, 0, size1.width, size1.height);
CGSize size2 = [[mainEventTimeArray objectAtIndex:[indexPath row]] sizeWithFont:[UIFont systemFontOfSize:11.0f] constrainedToSize:CGSizeMake(230, MAXFLOAT) lineBreakMode:UILineBreakModeWordWrap];
cell.dataTime.frame = CGRectMake(0, 0, size2.width, size2.height);
//NSLog(#"%f", size1.height + size2.height + 20);
return size1.height + size2.height + 20;
//NSString *str = [heights_ objectAtIndex:[indexPath row]];
// return [str floatValue] ;
}

Instead of doing your own customization. Try with dynamic uitableviewcell height. You will find really usefull & comparatively easier than what you have done.
You can check it here : http://www.cimgf.com/2009/09/23/uitableviewcell-dynamic-height/ with full of explanation. Enjoy programming.

In your case you need to set the height of cell based on the label.
Check the link :
http://dcraziee.wordpress.com/2013/05/22/calculate-size-of-uillabel-base-on-text-in/
There is a function named
-(CGFloat)getHeightForLabel:(NSString *)_str font:(UIFont *)fontOfObject
Use that function to calculate height as :
-(float)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
CGFloat _height = [self getHeightForLabel:self.label.text font:[self.label font]];
return _height;
}
and do the same while creating and adding label in the cell.
I hope this will help.

NSString *reuseIdentifier = #"EventTitleCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier];
cell=nil;
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier] ;
}

Try This code.
label.numberOfLines = 0; // allows label to have as many lines as needed
label.text = #"some long text";
[label sizeToFit];
NSLog(#"Label's frame is: %#", NSStringFromCGRect(label.frame));
For reference : click here

Related

custom label value is disappearing when scrolling table view

I am new to iphone. my cutomcell label value is disappearing when I scroll the table view.
Again it appears when I click on that cell.
Can anyone help me?
Thanks in Advance.
//table view in view controller created in xib
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = #"ListOfProductsCell";
ListOfProductsCell *cell = (ListOfProductsCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell==nil) {
NSArray *nib =[[NSBundle mainBundle] loadNibNamed:#"ListOfProductsCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
productItemDit=[productListArry objectAtIndex:indexPath.row];
NSString *offerStr= [NSString stringWithFormat:#"%.2f",[[productItemDit objectForKey:#"offer"] floatValue]];
NSString *fullCostStr=[[currencyCodeStr stringByAppendingString:#" "] stringByAppendingString:offerStr];
NSLog(#"%#",fullCostStr);
cell.itemCostLbl.text=fullCostStr;
} else {
cell.itemStepper = (UIStepper *) [cell viewWithTag:2];
cell.itemAddedLbl =(UILabel*)[cell viewWithTag:1];
}
if (tableView == self.searchDisplayProduct.searchResultsTableView) {
searchProductItemDit=[searchProductListArry objectAtIndex:indexPath.row];
NSLog(#"searchdit:%#",searchProductItemDit);
cell.itemNameLbl.text= [searchProductItemDit objectForKey:#"name"];
self.searchDisplayProduct.searchResultsTableView.separatorColor=[UIColor colorWithRed:200.0 green:0.0 blue:0.0 alpha:1.0];
} else {
productItemDit=[productListArry objectAtIndex:indexPath.row];
NSLog(#"dit:%#",productItemDit);
cell.itemNameLbl.text=[productItemDit objectForKey:#"name"];
}
cell.itemAddedLbl.text = [[NSString alloc] initWithFormat:#"%d",itemCount];
cell.itemImg.image = [UIImage imageNamed:#"profp.jpg"];
return cell;
}
Solved by doing like this
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = #"ListOfProductsCell";
ListOfProductsCell *cell = (ListOfProductsCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell==nil) {
NSArray *nib =[[NSBundle mainBundle] loadNibNamed:#"ListOfProductsCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
} else {
cell.itemStepper = (UIStepper *) [cell viewWithTag:2];
cell.itemAddedLbl =(UILabel*)[cell viewWithTag:1];
}
if (tableView == self.searchDisplayProduct.searchResultsTableView) {
cell.itemNameLbl.text= [[searchProductListArry objectAtIndex:indexPath.row] objectForKey:#"name"];
} else {
cell.itemNameLbl.text=[[productListArry objectAtIndex:indexPath.row] objectForKey:#"name"];
}
cell.itemCostLbl.text=[NSString stringWithFormat:#"%# %.2f", currencyCodeStr , [[[productListArry objectAtIndex:indexPath.row] objectForKey:#"offer"] floatValue]];
cell.itemAddedLbl.text = [[NSString alloc] initWithFormat:#"%d",itemCount];
cell.itemImg.image = [UIImage imageNamed:#"profp.jpg"];
return cell;
}
As you haven't post much of the information this is my guess.when you scroll table view it internally calls the reloadData method . You need to use reuse Identifier to preserve the state of the cell. You can initialize the cell in cellForRowAtIndexPath like :
static NSString *cellIdentifier = #"cellID";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
// or cell initializing logic here for the custom cell
}
in case of custom cell add reuse identifier in the xib and use it in your cellForRowAtIndexPath method

Checkmarks single selection

I'm currently developing a UITableView with items for selection with check marks.
The problem is I need to put a restriction on how many items are selected at a single time.
For Example:
NO onions, NO salt, YES milk, NO oranges.
As this example shows, I need a restriction so that the user can only select one item.
Current Code:
-(void)checkButtonPressed:(id)sender event:(id)event {
NSSet *touches = [event allTouches];
UITouch *touch = [touches anyObject];
CGPoint currentTouchPosition = [touch locationInView:self.myTableView];
indexP = [self.myTableView indexPathForRowAtPoint: currentTouchPosition];
NSMutableDictionary *item = [[NSMutableDictionary alloc] init];
//MasterCell *cell = [self.tableView dequeueReusableCellWithIdentifier:#"MasterCell"];
item = [arrayData objectAtIndex:indexP.row];
if (indexP != nil) {
[self tableView: self.myTableView accessoryButtonTappedForRowWithIndexPath:indexP];
}
[self.myTableView reloadData];
}
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
NSMutableDictionary *item = [arrayData objectAtIndex:indexPath.row];
BOOL checked = [[item objectForKey:#"checked"] boolValue];
[item setObject:[NSNumber numberWithBool:!checked] forKey:#"checked"];
UITableViewCell *cell = [item objectForKey:#"cell"];
UIButton *button = (UIButton *)cell.accessoryView;
UIImage *newImage = (checked) ? [UIImage imageNamed:#"unchecked.png"] : [UIImage imageNamed:#"checked.png"];
[button setBackgroundImage:newImage forState:UIControlStateNormal];
NSLog(#"accessoryButtonTappedForRowWithIndexPath____");
}
My cellForRowAtIndexPath:
- (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];
}
NSMutableDictionary *item = [arrayData objectAtIndex:indexPath.row];
UILabel *nomeLabel = (UILabel *)[cell viewWithTag:2];
UIButton *btnCheck = (UIButton *)[cell viewWithTag:3];
BOOL checked = [[item objectForKey:#"checked"] boolValue];
UIImage *image = (checked) ? [UIImage imageNamed:#"checked.png"] : [UIImage imageNamed:#"unchecked.png"];
[btnCheck setBackgroundImage:image forState:UIControlStateNormal];
nomeLabel.text = [item valueForKey:#"nome"];
nomeLabel.textColor = [UIColor blackColor];
[btnCheck addTarget:self action:#selector(checkButtonPressed:event:) forControlEvents:UIControlEventTouchUpInside];
return cell;
}
Thanks in advance and sorry for my bad English, please don't down vote, just ask if you have any doubt I'm always around to answer.
Try this ::
.h File,
#property(nonatomic, retain) NSIndexPath *lastIndexPath;
.m File,
int oldRow, newRow;
Table Methods:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CustomCellIdentifier = #"customCell";
customCell *cell = (customCell *)[tableView dequeueReusableCellWithIdentifier: CustomCellIdentifier];
if (cell == nil)
{
NSArray *nib;
nib= [[NSBundle mainBundle] loadNibNamed:#"customCell" owner:self options:nil];
for (id oneObject in nib)
if ([oneObject isKindOfClass:[customCell class]])
cell = (customCell *)oneObject;
newRow = [indexPath row];
oldRow = [[self lastIndexPath] row];
cell.accessibilityViewIsModal = (newRow == oldRow && lastIndexPath != nil) ? NO : YES;
if(cell.accessibilityViewIsModal == NO)
cell.imgCheck.image = [UIImage imageNamed:#"Checkbox_Checked_New.png"];
else
cell.imgCheck.image = [UIImage imageNamed:#"Checkbox_Unchecked_New.png"];
return cell;
}
}
DidSelect ::
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
newRow = [indexPath row];
oldRow = [[self lastIndexPath] row];
//Check Mark Feature
if (newRow != oldRow)
{
customCell *newCell = (customCell *)[tableView cellForRowAtIndexPath:indexPath];
newCell.imgCheck.image = [UIImage imageNamed:#"Checkbox_Checked_New.png"];
customCell *oldCell = (customCell *)[tableView cellForRowAtIndexPath:lastIndexPath];
oldCell.imgCheck.image = [UIImage imageNamed:#"Checkbox_Unchecked_New.png"];
[self setLastIndexPath:indexPath];
}
else
{
customCell *newCell = (customCell *)[tableView cellForRowAtIndexPath:indexPath];
newCell.imgCheck.image = [UIImage imageNamed:#"Checkbox_Checked_New.png"];
[self setLastIndexPath:indexPath];
}
}
Basically, for this kind of business logic, you're going to have to code it yourself. When using table views as what are basically radio buttons, the only way to enforce the requirement of single selection is to write code that handles the situation of the user trying to select the second item in the manner that your system will require:
Allow multiple selections (not the case here, but in some cases you might)
Remove all other checks that are incompatible with this, check the selected item, and tell the table view to refresh all of the rows you just changed
Present an error to the user in some fashion (blink, alert, sound) – almost never a good idea when you can allow direct manipulation.
try like this may be it helps you, here lastIndexPath is an NSIndexPath variable declared in .h file.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell* Cell = [tableView cellForRowAtIndexPath:indexPath];
int new = [indexPath row];
int old = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
if(new != old)
{
Cell.accessoryType = UITableViewCellAccessoryCheckmark;
UITableViewCell* oldCell = [tableView cellForRowAtIndexPath:lastIndexPath];
oldCell.accessoryType = UITableViewCellAccessoryNone;
lastIndexPath = indexPath;
}
}

UITableView layout not refreshing until scrolled

I have created a UISplitViewApplication as my new project. In the potrait mode I have a button that when clicked will drop down a UITableView. It looks something as the following:
When I clicked on one of the rows, this UITableView is dismissed. Then when I click again on the Groups button, the layout of the UITableView presented is now all messy:
However, when I scroll the TableView so that some of the rows are reloaded again, those that are reloaded are then formatted fine. Why is this and how do I fix this?
Here's my cell for row at index path:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = #"MyCell";
MyCell *cell = (ConvoreCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
//if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:#"MyCell" owner:nil options:nil];
for (id currentObject in topLevelObjects){
if ([currentObject isKindOfClass:[UITableViewCell class]]){
cell = (MyCell *) currentObject;
break;
}
}
cell.delegate = self;
// }
if ([posts count] > 0){
cell.star.hidden = YES;
[lazyImages addLazyImageForCell:cell withIndexPath:indexPath];
cell.title.text = [[posts objectAtIndex:indexPath.row] message];
cell.detailed.autoresizesSubviews = YES;
cell.detailed.text = [NSString stringWithFormat:#"%#", [[[posts objectAtIndex:indexPath.row] creator] username]];
if ([[[posts objectAtIndex:indexPath.row] embeds] count] != 0){
NSString * URL = [[[[posts objectAtIndex:indexPath.row] embeds] objectAtIndex:0] url];
float height = [[(Embed * )[[[posts objectAtIndex:indexPath.row] embeds] objectAtIndex:0] height] floatValue];
float width = [[(Embed * )[[[posts objectAtIndex:indexPath.row] embeds] objectAtIndex:0] width] floatValue];
[cell.embed setFrame:CGRectMake(cell.detailed.frame.origin.x, cell.detailed.frame.origin.y + 15, width, height)];
cell.embed.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:URL]]];
}
if ([[[posts objectAtIndex:indexPath.row] stars] count] != 0){
cell.star.hidden = NO;
cell.star_creator.text = [(Login *)[[[[posts objectAtIndex:indexPath.row] stars] objectAtIndex:0] user] username];
}
}
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
NSString *cellText =[[posts objectAtIndex:indexPath.row] message];
UIFont *cellFont = [UIFont fontWithName:#"Arial" size:14.0];
CGSize constraintSize = CGSizeMake(600.0f, MAXFLOAT);
CGSize labelSize = [cellText sizeWithFont:cellFont constrainedToSize:constraintSize lineBreakMode:UILineBreakModeWordWrap];
float height = 0.0;
if ([[[posts objectAtIndex:indexPath.row] embeds] count] != 0)
height = [[[[[posts objectAtIndex:indexPath.row] embeds] objectAtIndex:0] height] floatValue];
if (labelSize.height + 20 + height < 48)
return 55;
else
return labelSize.height + height + 48;
}
Reposted from a previous comment: reload the visible cells in viewWillAppear.
I have been through this before, In your CellForRowAtIndex delegate and don't check if the cell equals nil just keep going.
Update
NSString *sIdentifier = [NSString stringWithFormat:#"MyIdentifier %i", indexPath.row];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:sIdentifier];
// don't check if(cell == nil)
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:sIdentifier] autorelease];

heightForRowAtIndexPath crashes

I have the following code:
- (CGFloat)tableView:(UITableView *) tableView heightForRowAtIndexPath:(NSIndexPath *) indexPath{
TestCell* cell = (ConvoreCell *) [tableView cellForRowAtIndexPath:indexPath];
CGSize textSize = [[cell text] sizeWithFont:[UIFont systemFontOfSize:14] constrainedToSize:CGSizeMake([tableView frame].size.width - 20, 500)];
return 80;
}
It crashes on the cellForRowAtIndexPath, why is this? The log doesn't tell me anything. Here's my cellForRowAtIndexPath method:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = #"ConvoreCell";
AsyncImageView *asyncImageView = nil;
TestCell * cell = (TestCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:#"TestCell" owner:nil options:nil];
for (id currentObject in topLevelObjects){
if ([currentObject isKindOfClass:[UITableViewCell class]]){
cell = (ConvoreCell *) currentObject;
break;
}
}
asyncImageView = [[[AsyncImageView alloc] init] autorelease];
asyncImageView.imageview = cell.icon;
}
else {
asyncImageView = (AsyncImageView *) [cell.contentView viewWithTag:ASYNC_IMAGE_TAG];
}
NSMutableDictionary *cellValue = [results objectAtIndex:indexPath.row];
NSString *picURL = [[cellValue objectForKey:#"user"] objectForKey:#"img"];
if ([picURL isEqualToString:#"https://secure.gravatar.com/avatar/1f043010eb1652b3fab3678167dc0487/?default=https%3A%2F%2Fconvore.com%2Fmedia%2Fimages%2Feric.png&s=80"])
picURL = #"https://test.com/media/images/eric.png";
[asyncImageView loadImageFromURL:[NSURL URLWithString:picURL]];
cell.title.text = [cellValue objectForKey:#"message"];
cell.info.text = [NSString stringWithFormat:#"%# %# days ago", [[cellValue objectForKey:#"user"] objectForKey:#"username"], [cellValue objectForKey:#"date_created"] ];
return cell;
}
All I want to do is to resize the height of the cell according to the cell.title.text....
It's wrong to call cellForRowAtIndexPath: manually. You have to store those strings separately in array and obtain them from there.
A rule of thumb: don't call framework callbacks manually.

UITableViewCell not appearing/reusing correctly from NIB

I have created a custom UITableViewCell from a NIB. Everything appears when the rowHeight is not set (albeit, everything is squished). I am not sure if I am reusing and creating the cells properly:
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *MyIdentifier = #"ARCell";
ARObject *myARObject;
myARObject = [items objectAtIndex:indexPath.row];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil) {
[[NSBundle mainBundle] loadNibNamed:#"ARCell" owner:self options:nil];
cell = arCell;
self.arCell = nil;
}
UILabel *label;
label = (UILabel *)[cell viewWithTag:0];
label.text = [NSString stringWithFormat:#"%#", myARObject.username];
label = (UILabel *)[cell viewWithTag:1];
label.text = [NSString stringWithFormat:#"%#", myARObject.created_at];
label = (UILabel *)[cell viewWithTag:2];
label.text = [NSString stringWithFormat:#"%#", myARObject.articleTitle];
label = (UILabel *)[cell viewWithTag:3];
label.text = [NSString stringWithFormat:#"%#", myARObject.intro_text];
return cell;
}
- (CGFloat)tableView:(UITableView *)tblView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{ CGFloat rowHeight = 105;
return rowHeight;
}
Problems:
Not all labels appear when rowHeight is set. If rowHeight isn't set, labels are squished
When rowHeight is not set, selecting an item shows all of the labels
Remove the else clause
You call loadNibNamed, but don't store result anywhere! Can't understand why your code works at all... Anyway, writing blind I would try something like this:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *MyIdentifier = #"ARCell";
ARObject *myARObject = [items objectAtIndex:indexPath.row];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:#"ARCell" owner:self options:nil];
cell = (UITableViewCell *)[nib objectAtIndex:0];
}
UILabel *label;
label = (UILabel *)[cell viewWithTag:0];
label.text = [NSString stringWithFormat:#"%#", myARObject.username];
label = (UILabel *)[cell viewWithTag:1];
label.text = [NSString stringWithFormat:#"%#", myARObject.created_at];
label = (UILabel *)[cell viewWithTag:2];
label.text = [NSString stringWithFormat:#"%#", myARObject.articleTitle];
label = (UILabel *)[cell viewWithTag:3];
label.text = [NSString stringWithFormat:#"%#", myARObject.intro_text];
return cell;
}
- (CGFloat)tableView:(UITableView *)tblView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 105.0;
}