November 2013
Intermediate to advanced
576 pages
19h 3m
English
It is often useful to display the name of the peer you are connected to. Referring to Figure 10.1, the navigation bar contains a title that references the connected user; this is done using the following code snippet:
NSString *peerDisplayName = [self.currentSession displayNameForPeer: self.peerID];[[self navigationItem] setTitle: [NSString stringWithFormat:@"Chat with %@", peerDisplayName]];
Read now
Unlock full access