1 / 18

iPhone/ iPad Programming

iPhone/ iPad Programming. Reuben Edwards. Contents. iPhone & iPad Layout Objective-C UIKit Other APIs Alternative Tools. What is an App?. http :// www.youtube.com/watch?v=EhkxDIr0y2U. iPhone. iPad GUI Kit http://www.teehanlax.com/blog/2010/02/01/ipad-gui-psd/. Objective-C.

orestes
Télécharger la présentation

iPhone/ iPad Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. iPhone/iPad Programming Reuben Edwards

  2. Contents • iPhone & iPad Layout • Objective-C • UIKit • Other APIs • Alternative Tools

  3. What is an App? • http://www.youtube.com/watch?v=EhkxDIr0y2U

  4. iPhone

  5. iPad GUI Kithttp://www.teehanlax.com/blog/2010/02/01/ipad-gui-psd/

  6. Objective-C • Superset of ANSI-C • Supports C and C++ code .h – header files .m – Objective C and/or C code .mm C/C++/Obj-C code

  7. Classes • Objective C is object-oriented • Classes specified using an interface and an implementation

  8. Methods • A class in Objective-C can declare two types of methods: instance methods and class methods. • An instance method is a method whose execution is scoped to a particular instance of the class. • Class methods, by comparison, do not require you to create an instance (i.e. static methods)

  9. Messaging • When you want to call a method, you do so by messaging an object. • A message is the method signature, along with the parameter information the method needs. • All messages you send to an object are dispatched dynamically. • Messages are enclosed by brackets ([ and ]). • Inside the brackets, the object receiving the message is on the left side and the message (along with any parameters required by the message) is on the right.

  10. Messaging Example • For example, to send the insertObject:atIndex: message to an object in the myArray variable, you would use the following syntax: [myArrayinsertObject:anObject atIndex:0]; • Objects can be nested: [[myAppObjecttheArray] insertObject:[myAppObjectobjectToInsert] atIndex:0]; • Obj-C also supports dot syntax: myAppObject.theArray = aNewArray;

  11. Class implementation

  12. NSString • The NSString class provides an object wrapper for strings that has all of the advantages you would expect, including built-in memory management for storing arbitrary-length strings, support for Unicode, printf-style formatting utilities, and more. • Because such strings are used commonly though, Objective-C provides a shorthand notation for creating NSString objects from constant values.

  13. NSString examples

  14. UIKit • UI Framework for iOS • Classes: • UIHardware, UIApplication • UIWindow, UIResponder, UIView, UIControl, UIImage, UIImageView • UINavigationBar, UIButtonBar, UITextView, UITextLabel, UITextField, UIKeyboard, UIFontChooser, UISegmentedControl, UISliderControl, UISwitchControl, UIPickerView, UIPushButton, UIAlertSheet, UITransitionView, UITable • UIAnimation

  15. Other APIs • GameKit • Game Center • Authentication, Friends, Leaderboards, Achievements, Auto-matching, Invitations • Peer-to-Peer • Bluetooth Gaming • In-Game Voice • Voice Chat

  16. Other APIs • iAd, StoreKit • AddressBook/AddressBookUI • AudioToolbox/AVFoundation • CoreAnimation, CoreGraphics, CoreLocation, CoreMedia, CoreMotion, CoreTelephony, CoreText • EventKit, ExternalAccessory • MapKit • OpenTK (OpenGLES support)

  17. Other Tools • MonoTouch • C#.NET • Unity • 3D Gaming • RhoMobile • Ruby On Rails • Appcelerator • Javascript • PhoneGap • Javascript • Whoop • Wysiwygwebeditor • MoSync • C/C++

  18. Final Thoughts

More Related