Jumpstart to
iOS & Android Development
Development Environments
Model-View-Controller
Model-View-Controller (iOS)
Views in iOS
- Click on your Main.storyboard and use the interface builder to drag UI elements onto your iOS screen
Views in iOS
- Drag element to view you want them to go
- Use attribute inspector on the right-side of XCode to set properties for your UI element
Views in Android
- Create layouts in XML or w/ the GUI
- You should put your strings in values/strings.xml
Models (iOS)
- Contains the data your application interacts with
- Usually an Objective-C class w/ properties & methods
- .h is a header file and .m is an implementation file for method implementations and to synthesize any properties (if needed)
@interface CulpaProfessor : NSObject
// declare properties of the class (variables you can access with each
// object) here
@property NSString *firstName;
// declare the public methods here
-(BOOL) checkProfessorMatch:(NSString *)matchQuery;
@end
Models (Android)
- Basically a Java class that holds the properties for your data and contains helper methods to manipulate or give information about that data
Controller (iOS)
Responding to UI Events
- ctrl-drag from buttons (or other UI elements) to your ViewController class to create an action method
- ctrl-drag UI elements to your ViewController interface file to create a UI outlet that you can change
Controller (Android)
Responding to UI Events
- Rather than control-click drag as in iOS, you will use setOnClickListener();
- Rather than control-click drag to create an IBOutlet, you will use findViewById() to get access to change a UI element
Web Requests in iOS
NSString *requestString = @"https://s3.amazonaws.com/culpa/professors.json";
NSURL *url = [NSURL URLWithString:requestString];
NSURLRequest *req = [NSURLRequest requestWithURL:url];
NSURLSessionConfiguration *config =
[NSURLSessionConfiguration defaultSessionConfiguration];
NSURLSession *session = [NSURLSession sessionWithConfiguration:config
delegate:nil
delegateQueue:nil];
NSURLSessionDataTask *dataTask =
[session dataTaskWithRequest:req
completionHandler:
^(NSData *data, NSURLResponse *response, NSError *error) {
// do stuff with data}];
[dataTask resume];
Web Request in Android
- AsyncTask
Mobile Development Roadmap
- Animations
- Custom Views
- More detail into Web Requests
- More detail into Objective-C or Java
- Multi-threading
- Autolayouts and layout xmls for various sizes on Android
For updates on future mobile workshops and for an interactive roadmap for learning mobile development sign up for the ADI Listserv!
mobile
By Don Yu
mobile
- 1,177