Adding Tab Images

Finish out NerdTabViewController by adding individual images to the tab buttons for each view controller. The user will almost certainly enjoy being able to differentiate between the tabs.

To do this you need a way to tell the tab view controller what image to use for each tab. One approach would be to write methods for adding the child view controllers which take an image for the tab:

f​u​n​c​ ​a​d​d​C​h​i​l​d​V​i​e​w​C​o​n​t​r​o​l​l​e​r​(​c​h​i​l​d​V​i​e​w​C​o​n​t​r​o​l​l​e​r​:​ ​N​S​V​i​e​w​C​o​n​t​r​o​l​l​e​r​,​
 ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​ ​t​a​b​I​m​a​g​e​:​ ​N​S​I​m​a​g​e​)​

This would work, but it is not a great choice because it calls into question the ...

Get Cocoa Programming for OS X: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.