I am working on a Master-view application on Swift. The app has to view controllers; detailView where user's input is accepted and Master view where cells containing the info are supposed to be. Like a contacts app.
I have done everything and the app works fine, however I have not been able to display my content on the Main Screen (master view). The data from user is safely stored in array in a different class. Here is a bit of code
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as UITableViewCell
let object = contact.entries[indexPath.row] as ContactListEntry
cell.textLabel!.text = object.firstName + " " + object.lastName
cell.detailTextLabel!.text = object.phoneNumber!
return cell
}
I need to be able to display the cell with its contents on the Master view. Please let me know if it doesn't make sense. I can clarify a bit more.
Thanks a lot
0 comments:
Post a Comment