I am trying to building a to-do-list app. My StoryBoard consists of 2 view controller connected via push Segue. First ViewController is a table View Controller and second is a View Controller. Second View Controller consists a Title, description and date field, data is fetched from second View Controller and displayed in First View Controller. Data is received in form of an object say taskObject which has three attributes (Title, description and date) for three text fields.
I want to show have a cell Like Below:
Buy Notebook (Title Text)
2 with both side rule pages, 1 with single side ruled (Description Text)
27/07/2015 (Date Text)
I have already been through:
- Display multiple lines in a Table view's cell - IOS
- How to display multiple lines in a tableView cell
Just to be clear. Both are not my case.
I am trying to display like this :
cell.textLabel.text = [[self.allTask objectAtIndex:indexPath.row] titleText] ;
cell.detailTextLabel.numberOfLines = 0;
cell.detailTextLabel.Text = [self.allTask[indexPath.row] descriptionText];
cell.detailTextLabel.Text =[[self.allTask objectAtIndex:indexPath.row] dat
But it is not working, only last cell.textLabel.text's data is visible.
I did add:
cell.textLabel.numberOfLines = 0;
cell.textLabel.lineBreakMode = NSLineBreakByWordWrapping;
But it is helpful ONLY if U want to show multiple lines from a single data source (NOT my case). In My situation have have to show three data from three different data attributes in three different lines within a cell.
I know it is possible through custom cells. Is their any other way to it ? Any Help Is Appreciated.