Skip to content
Alfie Hanssen edited this page Nov 22, 2013 · 5 revisions

We're going to build a small App, optimized for 3.5" and 4" iPhones, that downloads, displays and allows users to browse "popular media" from Instagram. We'll use Objective-C and select Apple APIs. The UI will look something like this:

WorkshopApp

Main.m

int main(int argc, char * argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    }
}

AppDelegate.h

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@end

AppDelegate.m

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    
    // Override point for customization after application launch.
        
    self.window.backgroundColor = [UIColor magentaColor];
    [self.window makeKeyAndVisible];
    return YES;
}
Clone this wiki locally