HOW TO SET TEXT IN TABLE CELL TO RIGHT AND LEFT IN IOS

Pooja Malohtra

Total Post:47

Points:331
Posted by  Pooja Malohtra
 583  View(s)
Ratings:
Rate this:
I have created an app using table view, now I have a problem,
I am not understanding how to display text in both alignment right and left into table cell.
can any one tell me, how to do it?
  1. Tarun Kumar

    Post:214

    Points:1642
    Re: How to set text in table cell to Right and Left in iOS

    I think you are not using appropriate table cell style,
    your table cell style is set by default this: UITableViewCellStyleDefault
    replace it with this: UITableViewCellStyleSubtitle in your code:
    Example:

    UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle
                                                     resuseIdentifier:CellIdentifer] autorelease];

     

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!