Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > iPhone SDK/Obj-C... addSubview: among other things

iPhone SDK/Obj-C... addSubview: among other things
Thread Tools
cla
Mac Enthusiast
Join Date: Mar 2000
Status: Offline
Reply With Quote
Aug 29, 2008, 07:31 PM
 
MacNN users - Long time no see!

Couple of questions on the iPhone SDK - I'd be really happy if anyone could help me out:

1)
Code:
[window addSubview:[navController view]];
The line above attaches the view of navController to the application's window object. Now, how does window know where to find the view's navigation controller? A UIView doesn't contain any pointers to view controllers...

2) I'm having trouble deciding how to organize my classes. How would an experienced programmer implement the following theoretical tree of pages/views,
Code:
a-b | b-c-d / \ e f-g
where a is the root node (the application window's default view)? As for me, I would have the app delegate class contain ptr's to view controllers for b and c, and in the same manner let c contain ptr's to b, d, e and f (and so on). Sounds pretty straight-forward, but how do I navigate back from c to a, i.e. let c know it is a child of a? I know the UIViewController object has a parentViewController ptr, but apparently it's read only, so it would seem I'm missing a piece to the puzzle...

I must say the SDK is daunting to a person not used to class hierarchies. Well, I'm happy as long as I won't have to struggle with Mac OS 9's handles...

That's it for now :>
Again, thanks for helping me out.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:50 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2