I currently have an app which reads a line from a webpage which looks like:
1/2/3/4/5/
And then it outputs each number in a table in five cells.
However, I would like to output some extra info along with the numbers, so that my table cells have a title and a subtile.
Title: 1
Subtitle: Number one
Title: 2
Subtile: Number two
etc.
But I don’t quite know where to store the subtitle text – do I need to read a new line from the webpage, or is it possible to store both title and subtitle in the same line, like say:
1, Number one/2, Number two/3, Number three/
And then tell the app to use the first item as title and the second as subtitle?
In
cellForRowAtIndexPath, when you create a new cell, define the detailText of that cell asSubtitle: Number oneand also make changes to the cell Style as below:Whenever you create a cell for Title:1 you just need to define the
detailText.textproperty for the cell value. IfUITableViewCellStyleSubtitlethis does not works then try using different style of theUITableViewCell.