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.