Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
stuck following cocoa / xcode tutorial
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="xstep" data-source="post: 683647" data-attributes="member: 11647"><p>It looks like that tutorial is for an older version of Interface Builder. Look for an update or separate tutorial for IB 3. In the Learn Cocoa II on the <a href="http://cocoadevcentral.com/" target="_blank">Cocoadevcentral</a> site, see how it is done now on page 9 where they are creating a subclass. Two lines down from the 'Objective-C class' highlight you would choose 'Objective-C NSView subclass'.</p><p></p><p>This is what I think I've figured out. Note I haven't used the new XCode and new Interface builder yet to any extent. I'll be looking for updated tutorials.</p><p></p><p>You seem to need to effectively do step 'e' first.</p><p></p><p>In XCode, right click Classes and choos Add--> New File...</p><p>In the list that pops up, under Cocoa, choose Objective-C NSView subclass.</p><p>Click Next on the bottom right.</p><p>Change the untitled.m file to HelloView.m and make sure the check box is checked where it says 'Also create HelloView.h".</p><p>Click Finish on the bottom right.</p><p></p><p>You then drag a Custom Siew onto the main window.</p><p>Library->Cocoa->Views & Cells->Layout Views</p><p></p><p>Finally in the Inspector window in the Identity tab (i) you chose your new HelloView class and that is it.</p><p></p><p>Given all of the above, you might find all of that confusing. I did copy the drawrect code from the tutorial into the HelloView.m file and the program did compile and run properly.</p></blockquote><p></p>
[QUOTE="xstep, post: 683647, member: 11647"] It looks like that tutorial is for an older version of Interface Builder. Look for an update or separate tutorial for IB 3. In the Learn Cocoa II on the [URL="http://cocoadevcentral.com/"]Cocoadevcentral[/URL] site, see how it is done now on page 9 where they are creating a subclass. Two lines down from the 'Objective-C class' highlight you would choose 'Objective-C NSView subclass'. This is what I think I've figured out. Note I haven't used the new XCode and new Interface builder yet to any extent. I'll be looking for updated tutorials. You seem to need to effectively do step 'e' first. In XCode, right click Classes and choos Add--> New File... In the list that pops up, under Cocoa, choose Objective-C NSView subclass. Click Next on the bottom right. Change the untitled.m file to HelloView.m and make sure the check box is checked where it says 'Also create HelloView.h". Click Finish on the bottom right. You then drag a Custom Siew onto the main window. Library->Cocoa->Views & Cells->Layout Views Finally in the Inspector window in the Identity tab (i) you chose your new HelloView class and that is it. Given all of the above, you might find all of that confusing. I did copy the drawrect code from the tutorial into the HelloView.m file and the program did compile and run properly. [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
stuck following cocoa / xcode tutorial
Top