how to use plist item as self.title of next view
I have a plist which has an array of items that I display in a UItableView. I want to pass the plist item that is selected to the self.t开发者_JAVA百科itle of the next view, but am unsure how to achieve this.
Setting the title
is shorter route for a view controller.
nextViewController.title = [myArray objectAtIndex:indexPath.row];
If it's in an array or dictionary, you can just assign it like any other string.
If this is from the tableView: didSelectRowAtIndexPath:
method, then you could do something like the following:
myNextView.navigationItem.title = [myArray objectAtIndex:indexPath.row];
精彩评论