Paul,

Here is some sample code.  I'm new to iPhone (reformed VB hack).  I've
been at it since the WWDC announcement, so still very new.

Here's what I've learned (hopefully it will save you time).

-All the apps are variations of the UITableView.  Learn it.  Live it.
-The nav stuff is dense, but learn it too.  It's elegance is only
revealed after reading the docs 3 dozen times
-Get the SimpleDrillDown example and step through it a bunch.
TheElements is really complicated but a great one to review.
-Interface Builder sucks, avoid it until you learn what it's trying to
hide or you'll never get it

Regarding this sample, keep in mind the Window is just a stack of
Views.  The UIView doc will show you the methods for manipulating
them.

Hope this helps (I enjoyed putting it together).

John


---

Steps:

1. Create a new project with Xcode (choose the "windows based
application" template).

2. Find line comment "// Override point for customization after app
launch" in the ____AppDelegate.m

3. Paste this after it:

        //create an new view make it as big as the screen
        UIView *newView=[[[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0,
320.0, 500.0)] autorelease];

        //make it blue
        newView.backgroundColor=[UIColor blueColor];


        //create a label
        UILabel *newLabel=[[[UILabel alloc] initWithFrame:CGRectMake(0.0,
0.0, 300.0, 200.0)] autorelease];
        //give it words and make it white with a blue background
        newLabel.text = @"Do Androids dream of electric iPhones";
        newLabel.textColor=[UIColor whiteColor];
        newLabel.backgroundColor=[UIColor blueColor];

        //add it to your view
        [newView addSubview:newLabel ];

        //add the view with the label to the window (which is just a subclass
of view)
        [window addSubview:newView];


4. Build and Go

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to