O'Reilly logo

Objective-C Programming: The Big Nerd Ranch Guide by Aaron Hillegass

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Edit BNRDocument.m

Now that you’ve got the user interface of your application created, configured, and connected, it’s time to get back to writing code. Click on BNRDocument.m in the project navigator to reopen it in the editor, and implement createNewItem:.

#​i​m​p​o​r​t​ ​"​B​N​R​D​o​c​u​m​e​n​t​.​h​"​

@​i​m​p​l​e​m​e​n​t​a​t​i​o​n​ ​B​N​R​D​o​c​u​m​e​n​t​

#​p​r​a​g​m​a​ ​m​a​r​k​ ​-​ ​N​S​D​o​c​u​m​e​n​t​ ​O​v​e​r​r​i​d​e​s​

-​ ​(​N​S​S​t​r​i​n​g​ ​*​)​w​i​n​d​o​w​N​i​b​N​a​m​e​
{​
 ​ ​ ​ ​r​e​t​u​r​n​ ​@​"​B​N​R​D​o​c​u​m​e​n​t​"​;​
}​

#​p​r​a​g​m​a​ ​m​a​r​k​ ​-​ ​A​c​t​i​o​n​s​ -​ ​(​I​B​A​c​t​i​o​n​)​c​r​e​a​t​e​N​e​w​I​t​e​m​:​(​i​d​)​s​e​n​d​e​r​ {​ ​ ​ ​ ​/​/​ ​I​f​ ​t​h​e​r​e​'​s​ ​n​o​ ​a​r​r​a​y​ ​y​e​t​,​ ​g​o​ ​a​h​e​a​d​ ​a​n​d​ ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required