cs50 seminar introduction to iosd2o9nyf4hwsci4.cloudfront.net/.../intro_to_ios.pdfcs50...
TRANSCRIPT
![Page 1: CS50 Seminar Introduction to iOSd2o9nyf4hwsci4.cloudfront.net/.../intro_to_ios.pdfCS50 Seminar_Introduction to iOS.key Created Date 11/4/2013 3:33:14 AM](https://reader036.vdocuments.site/reader036/viewer/2022070814/5f0d32557e708231d439259c/html5/thumbnails/1.jpg)
CS50 SeminarIntroduction to iOS
![Page 2: CS50 Seminar Introduction to iOSd2o9nyf4hwsci4.cloudfront.net/.../intro_to_ios.pdfCS50 Seminar_Introduction to iOS.key Created Date 11/4/2013 3:33:14 AM](https://reader036.vdocuments.site/reader036/viewer/2022070814/5f0d32557e708231d439259c/html5/thumbnails/2.jpg)
Design.Code.Build.Innovate
![Page 3: CS50 Seminar Introduction to iOSd2o9nyf4hwsci4.cloudfront.net/.../intro_to_ios.pdfCS50 Seminar_Introduction to iOS.key Created Date 11/4/2013 3:33:14 AM](https://reader036.vdocuments.site/reader036/viewer/2022070814/5f0d32557e708231d439259c/html5/thumbnails/3.jpg)
Objective-C
• Just the same as C/C++
• Except it’s object-oriented
• And much more…
![Page 4: CS50 Seminar Introduction to iOSd2o9nyf4hwsci4.cloudfront.net/.../intro_to_ios.pdfCS50 Seminar_Introduction to iOS.key Created Date 11/4/2013 3:33:14 AM](https://reader036.vdocuments.site/reader036/viewer/2022070814/5f0d32557e708231d439259c/html5/thumbnails/4.jpg)
Library vs. Framework!
• C/C++ ! #include <stdio.h> ! !!
• Objective-C !! #import <UIKit/UIKit.h> !!!!
![Page 5: CS50 Seminar Introduction to iOSd2o9nyf4hwsci4.cloudfront.net/.../intro_to_ios.pdfCS50 Seminar_Introduction to iOS.key Created Date 11/4/2013 3:33:14 AM](https://reader036.vdocuments.site/reader036/viewer/2022070814/5f0d32557e708231d439259c/html5/thumbnails/5.jpg)
Print vs. NSLog!
• C/C++ ! printf(“hello, world”); !!!!
• Objective-C !! NSLog(@“hello, world”); !!!!
NSLog(@“%d”, 42);
NSLog(@“%f”, 1.0);
NSLog(@“%@”, apple);{
![Page 6: CS50 Seminar Introduction to iOSd2o9nyf4hwsci4.cloudfront.net/.../intro_to_ios.pdfCS50 Seminar_Introduction to iOS.key Created Date 11/4/2013 3:33:14 AM](https://reader036.vdocuments.site/reader036/viewer/2022070814/5f0d32557e708231d439259c/html5/thumbnails/6.jpg)
Function vs. Method (Declaring)
!
• C/C++ ! bool function(int n, char *array) { !!! }
• Objective-C ! -(NSArray *)methodWithNumber:(NSUInteger)number andArray:(NSArray *)array { !!! }
* http://stackoverflow.com/questions/7626412/difference-between-int-nsinteger-and-nsuinteger
![Page 7: CS50 Seminar Introduction to iOSd2o9nyf4hwsci4.cloudfront.net/.../intro_to_ios.pdfCS50 Seminar_Introduction to iOS.key Created Date 11/4/2013 3:33:14 AM](https://reader036.vdocuments.site/reader036/viewer/2022070814/5f0d32557e708231d439259c/html5/thumbnails/7.jpg)
Function vs. Method (Calling)
!
• C/C++ ! bool b = function(0, {a, b, c, d}); ! !!
• Objective-C !! NSArray *my_array = [object methodWithNumber:0 andArray:@[a, b, c, d]]; !!!!
![Page 8: CS50 Seminar Introduction to iOSd2o9nyf4hwsci4.cloudfront.net/.../intro_to_ios.pdfCS50 Seminar_Introduction to iOS.key Created Date 11/4/2013 3:33:14 AM](https://reader036.vdocuments.site/reader036/viewer/2022070814/5f0d32557e708231d439259c/html5/thumbnails/8.jpg)
Xcode 5Integrated Development Environment (IDE)
![Page 9: CS50 Seminar Introduction to iOSd2o9nyf4hwsci4.cloudfront.net/.../intro_to_ios.pdfCS50 Seminar_Introduction to iOS.key Created Date 11/4/2013 3:33:14 AM](https://reader036.vdocuments.site/reader036/viewer/2022070814/5f0d32557e708231d439259c/html5/thumbnails/9.jpg)
WorkspaceSingle-Window Interface
![Page 10: CS50 Seminar Introduction to iOSd2o9nyf4hwsci4.cloudfront.net/.../intro_to_ios.pdfCS50 Seminar_Introduction to iOS.key Created Date 11/4/2013 3:33:14 AM](https://reader036.vdocuments.site/reader036/viewer/2022070814/5f0d32557e708231d439259c/html5/thumbnails/10.jpg)
If Statement!
• C/C++ ! if (0 != 1 || a == ‘A’) { !!! }
• Objective-C ! if (0 != 1 || [word isEqualToString:@“hello, world”]) { !!! }
* http://stackoverflow.com/questions/7626412/difference-between-int-nsinteger-and-nsuinteger
![Page 11: CS50 Seminar Introduction to iOSd2o9nyf4hwsci4.cloudfront.net/.../intro_to_ios.pdfCS50 Seminar_Introduction to iOS.key Created Date 11/4/2013 3:33:14 AM](https://reader036.vdocuments.site/reader036/viewer/2022070814/5f0d32557e708231d439259c/html5/thumbnails/11.jpg)
For Statement!
• C/C++ ! for (int i = 0, n = strlen(s); i < n; i++) { !!! }
• Objective-C ! for (NSUInteger i = 0, n = array.count; i < n; i++) { !!! }
* http://stackoverflow.com/questions/7626412/difference-between-int-nsinteger-and-nsuinteger
![Page 12: CS50 Seminar Introduction to iOSd2o9nyf4hwsci4.cloudfront.net/.../intro_to_ios.pdfCS50 Seminar_Introduction to iOS.key Created Date 11/4/2013 3:33:14 AM](https://reader036.vdocuments.site/reader036/viewer/2022070814/5f0d32557e708231d439259c/html5/thumbnails/12.jpg)
http://blog.teamtreehouse.com/an-introduction-to-objective-c
![Page 13: CS50 Seminar Introduction to iOSd2o9nyf4hwsci4.cloudfront.net/.../intro_to_ios.pdfCS50 Seminar_Introduction to iOS.key Created Date 11/4/2013 3:33:14 AM](https://reader036.vdocuments.site/reader036/viewer/2022070814/5f0d32557e708231d439259c/html5/thumbnails/13.jpg)
http://mobile.tutsplus.com/tutorials/iphone/learn-ios-game-development-by-example-10-projects-to-get-you-started/
![Page 14: CS50 Seminar Introduction to iOSd2o9nyf4hwsci4.cloudfront.net/.../intro_to_ios.pdfCS50 Seminar_Introduction to iOS.key Created Date 11/4/2013 3:33:14 AM](https://reader036.vdocuments.site/reader036/viewer/2022070814/5f0d32557e708231d439259c/html5/thumbnails/14.jpg)
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/
Google search “NSArray”