{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture 06_0 - CS193p Spring 2010 Wednesday Announcements...

Info icon This preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
CS193p Spring 2010 Wednesday, April 14, 2010
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Announcements Paul’s Office Hours E-mail is best way to get help Or in this room before and after Monday’s class Sonali’s Office Hours Changed Again Tuesday 10am to noon Thursday 10am to noon Andreas Taking Over Sonali’s Friday Time Monday 6pm to 8pm Friday 11am to 1pm Wednesday, April 14, 2010
Image of page 2
Homework Submission Problems Disk space was full, so half the class could not submit. Make sure you delete your build directory before submitting. Assignment 2 deadline moved to tonight at 11:59pm. If it still fails, you can submit by e-mail this week. Try to finish your Homework on Monday There is no “new information” for homework in Monday’s lectures In fact, Monday is “moving on to the next thing” day Lots of “last minute” help on Monday (and now Tuesday morning) Not so Tuesday night Don’t be afraid to use e-mail to get help as well (but don’t depend on getting a response to something sent Tuesday night on Tuesday). Wednesday, April 14, 2010
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Communication E-mail Questions are best sent to [email protected] Sending directly to instructor or TA’s risks slow response. Web Site Very Important! http://cs193p.stanford.edu All lectures, assignments, code, etc. will be there. This site will be your best friend when it comes to getting info. Wednesday, April 14, 2010
Image of page 4
Today’s Topics “Under the Hood” of “View-based Application” Application Lifecycle View Controller Lifecycle UINavigationController Demo Continuation Wednesday, April 14, 2010
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
main() Like any C application, your app starts here Here’s the code from main.m (found in Other Sources folder in Xcode window): #import <UIKit/UIKit.h> int main(int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int retVal = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retVal; } Wednesday, April 14, 2010
Image of page 6
#import <UIKit/UIKit.h> int main(int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int retVal = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retVal; } main() UIApplicationMain() creates a UIApplication object (despite return value, it never returns). The third argument is the name of the class of your UIApplication (nil is the same as @”UIApplication” ) The fourth argument is the name of the class which will be your UIApplication’ s delegate ( nil means “none,” but it’s going to get set via the application’s “MainWindow.xib” file--next slide). We’ll talk about NSAutoreleasePool later (the one above does nothing). Wednesday, April 14, 2010
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
UIApplication What is this “application object” you speak of? It is a shared object (singleton). There is only ever one instance of it. You can get ahold of it via ... UIApplication *app = [UIApplication sharedApplication]; Has a lot of stuff you’ll never use But here are a few of interest ...
Image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern