Skip to content
Browse files

Add basics

  • Loading branch information...
1 parent b8e5f2c commit 06e346343cf5b53339bea922a948db65f42c2904 @mudphone committed Mar 27, 2012
View
70 Dynamic Languages - Not just for Rubyists and Pythonistas.txt
@@ -0,0 +1,70 @@
+Dynamic Languages - They're not just for Rubyists (and Pythonistas)
+
+All credit to:
+- iOS 5 Programming Pushing the Limits, by Rob Napier, Mugunth Kumar
+
+Assumptions:
+- Not covering Core Foundation
+-
+
+What should we cover?
+- Creating new methods and classes at runtime
+- introspection
+- message passing
+- KVO
+- at runtime
+ - inspect and modify class hierarchy
+ - create new classes and methods
+ - change class and superclass (ISA Swizzling)
+
+
+Basics / Intro:
+- Like C++, no multiple inheritance, no operator overloading
+- It all comes from libobjc, a collection of C functions
+ objc_msgSend --> [object message]
+
+- Objective-C runtime is open source (opensource.apple.com)
+ - got objc4-493.11 here: http://opensource.apple.com/release/mac-os-x-1073/
+
+The Objective-C Object:
+- All Objective-C objects are C structs
+ typedef struct objc_object {
+ Class isa;
+ } *id;
+
+ - ISA pointer
+ - Root class' ivars
+ - penultimate superclass' ivars
+ - ...
+ - superclass' ivars
+ - Class' ivars
+
+- Class structure contains a metaclass pointer(?), superclass pointer, data about the class
+ - data: name, ivars, methods, properties, protocols
+
+- Superclass pointer createes the hierarchy of classes
+( Categories )
+- Methods, properties, and protocols define what the class can do
+ - stored in writable section of class definition, which can be changed at runtime
+ - this is how categories work (Ruby: Monkey-Patching)
+ - Ivars are stored in the read-only section, unmodifiable as this would impact existing instances
+ - thus, categories cannot change add ivars
+- objc_object isa pointer is not const --> change class at runtime
+- Class superclass pointer also not const --> change class hierarcy at runtime
+
+
+A Quick Intro to C Structs
+- http://heather.cs.ucdavis.edu/~matloff/UnixAndC/CLanguage/PointersI.html
+
+
+Classes and Metaclasses
+- A class is like an object, you can pass it messages
+ - [MyClass alloc]
+ - Class methods are stored in the metaclass, which is where the Class isa pointer goes
+
+
+
+
+
+WHAT ABOUT...?
+- Class structure metaclass pointer
View
283 ObjcPlayground/ObjcPlayground.xcodeproj/project.pbxproj
@@ -0,0 +1,283 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ CFA73E631522385300625A31 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CFA73E621522385300625A31 /* UIKit.framework */; };
+ CFA73E651522385300625A31 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CFA73E641522385300625A31 /* Foundation.framework */; };
+ CFA73E671522385300625A31 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CFA73E661522385300625A31 /* CoreGraphics.framework */; };
+ CFA73E6D1522385300625A31 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = CFA73E6B1522385300625A31 /* InfoPlist.strings */; };
+ CFA73E6F1522385300625A31 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CFA73E6E1522385300625A31 /* main.m */; };
+ CFA73E731522385300625A31 /* PDCAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CFA73E721522385300625A31 /* PDCAppDelegate.m */; };
+ CFA73E761522385300625A31 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CFA73E741522385300625A31 /* MainStoryboard.storyboard */; };
+ CFA73E791522385300625A31 /* PDCViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CFA73E781522385300625A31 /* PDCViewController.m */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ CFA73E5E1522385300625A31 /* ObjcPlayground.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ObjcPlayground.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ CFA73E621522385300625A31 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ CFA73E641522385300625A31 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ CFA73E661522385300625A31 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ CFA73E6A1522385300625A31 /* ObjcPlayground-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ObjcPlayground-Info.plist"; sourceTree = "<group>"; };
+ CFA73E6C1522385300625A31 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ CFA73E6E1522385300625A31 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ CFA73E701522385300625A31 /* ObjcPlayground-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ObjcPlayground-Prefix.pch"; sourceTree = "<group>"; };
+ CFA73E711522385300625A31 /* PDCAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PDCAppDelegate.h; sourceTree = "<group>"; };
+ CFA73E721522385300625A31 /* PDCAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PDCAppDelegate.m; sourceTree = "<group>"; };
+ CFA73E751522385300625A31 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = "<group>"; };
+ CFA73E771522385300625A31 /* PDCViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PDCViewController.h; sourceTree = "<group>"; };
+ CFA73E781522385300625A31 /* PDCViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PDCViewController.m; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ CFA73E5B1522385300625A31 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ CFA73E631522385300625A31 /* UIKit.framework in Frameworks */,
+ CFA73E651522385300625A31 /* Foundation.framework in Frameworks */,
+ CFA73E671522385300625A31 /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ CFA73E531522385300625A31 = {
+ isa = PBXGroup;
+ children = (
+ CFA73E681522385300625A31 /* ObjcPlayground */,
+ CFA73E611522385300625A31 /* Frameworks */,
+ CFA73E5F1522385300625A31 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ CFA73E5F1522385300625A31 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ CFA73E5E1522385300625A31 /* ObjcPlayground.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ CFA73E611522385300625A31 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ CFA73E621522385300625A31 /* UIKit.framework */,
+ CFA73E641522385300625A31 /* Foundation.framework */,
+ CFA73E661522385300625A31 /* CoreGraphics.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ CFA73E681522385300625A31 /* ObjcPlayground */ = {
+ isa = PBXGroup;
+ children = (
+ CFA73E711522385300625A31 /* PDCAppDelegate.h */,
+ CFA73E721522385300625A31 /* PDCAppDelegate.m */,
+ CFA73E741522385300625A31 /* MainStoryboard.storyboard */,
+ CFA73E771522385300625A31 /* PDCViewController.h */,
+ CFA73E781522385300625A31 /* PDCViewController.m */,
+ CFA73E691522385300625A31 /* Supporting Files */,
+ );
+ path = ObjcPlayground;
+ sourceTree = "<group>";
+ };
+ CFA73E691522385300625A31 /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ CFA73E6A1522385300625A31 /* ObjcPlayground-Info.plist */,
+ CFA73E6B1522385300625A31 /* InfoPlist.strings */,
+ CFA73E6E1522385300625A31 /* main.m */,
+ CFA73E701522385300625A31 /* ObjcPlayground-Prefix.pch */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ CFA73E5D1522385300625A31 /* ObjcPlayground */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = CFA73E7C1522385300625A31 /* Build configuration list for PBXNativeTarget "ObjcPlayground" */;
+ buildPhases = (
+ CFA73E5A1522385300625A31 /* Sources */,
+ CFA73E5B1522385300625A31 /* Frameworks */,
+ CFA73E5C1522385300625A31 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = ObjcPlayground;
+ productName = ObjcPlayground;
+ productReference = CFA73E5E1522385300625A31 /* ObjcPlayground.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ CFA73E551522385300625A31 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ CLASSPREFIX = PDC;
+ LastUpgradeCheck = 0430;
+ ORGANIZATIONNAME = "Pas de Chocolat, LLC";
+ };
+ buildConfigurationList = CFA73E581522385300625A31 /* Build configuration list for PBXProject "ObjcPlayground" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = CFA73E531522385300625A31;
+ productRefGroup = CFA73E5F1522385300625A31 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ CFA73E5D1522385300625A31 /* ObjcPlayground */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ CFA73E5C1522385300625A31 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ CFA73E6D1522385300625A31 /* InfoPlist.strings in Resources */,
+ CFA73E761522385300625A31 /* MainStoryboard.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ CFA73E5A1522385300625A31 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ CFA73E6F1522385300625A31 /* main.m in Sources */,
+ CFA73E731522385300625A31 /* PDCAppDelegate.m in Sources */,
+ CFA73E791522385300625A31 /* PDCViewController.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ CFA73E6B1522385300625A31 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ CFA73E6C1522385300625A31 /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ CFA73E741522385300625A31 /* MainStoryboard.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ CFA73E751522385300625A31 /* en */,
+ );
+ name = MainStoryboard.storyboard;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ CFA73E7A1522385300625A31 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ CFA73E7B1522385300625A31 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 5.1;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ CFA73E7D1522385300625A31 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "ObjcPlayground/ObjcPlayground-Prefix.pch";
+ INFOPLIST_FILE = "ObjcPlayground/ObjcPlayground-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ CFA73E7E1522385300625A31 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "ObjcPlayground/ObjcPlayground-Prefix.pch";
+ INFOPLIST_FILE = "ObjcPlayground/ObjcPlayground-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ CFA73E581522385300625A31 /* Build configuration list for PBXProject "ObjcPlayground" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ CFA73E7A1522385300625A31 /* Debug */,
+ CFA73E7B1522385300625A31 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ CFA73E7C1522385300625A31 /* Build configuration list for PBXNativeTarget "ObjcPlayground" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ CFA73E7D1522385300625A31 /* Debug */,
+ CFA73E7E1522385300625A31 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = CFA73E551522385300625A31 /* Project object */;
+}
View
7 ObjcPlayground/ObjcPlayground.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:ObjcPlayground.xcodeproj">
+ </FileRef>
+</Workspace>
View
40 ObjcPlayground/ObjcPlayground/ObjcPlayground-Info.plist
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.pasdechocolat.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIMainStoryboardFile</key>
+ <string>MainStoryboard</string>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
View
14 ObjcPlayground/ObjcPlayground/ObjcPlayground-Prefix.pch
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'ObjcPlayground' target in the 'ObjcPlayground' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_5_0
+#warning "This project uses features only available in iOS SDK 5.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
View
15 ObjcPlayground/ObjcPlayground/PDCAppDelegate.h
@@ -0,0 +1,15 @@
+//
+// PDCAppDelegate.h
+// ObjcPlayground
+//
+// Created by Kyle Oba on 3/27/12.
+// Copyright (c) 2012 Pas de Chocolat, LLC. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface PDCAppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@end
View
48 ObjcPlayground/ObjcPlayground/PDCAppDelegate.m
@@ -0,0 +1,48 @@
+//
+// PDCAppDelegate.m
+// ObjcPlayground
+//
+// Created by Kyle Oba on 3/27/12.
+// Copyright (c) 2012 Pas de Chocolat, LLC. All rights reserved.
+//
+
+#import "PDCAppDelegate.h"
+
+@implementation PDCAppDelegate
+
+@synthesize window = _window;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ // Override point for customization after application launch.
+ return YES;
+}
+
+- (void)applicationWillResignActive:(UIApplication *)application
+{
+ // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+ // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application
+{
+ // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application
+{
+ // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
+}
+
+@end
View
13 ObjcPlayground/ObjcPlayground/PDCViewController.h
@@ -0,0 +1,13 @@
+//
+// PDCViewController.h
+// ObjcPlayground
+//
+// Created by Kyle Oba on 3/27/12.
+// Copyright (c) 2012 Pas de Chocolat, LLC. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface PDCViewController : UIViewController
+
+@end
View
34 ObjcPlayground/ObjcPlayground/PDCViewController.m
@@ -0,0 +1,34 @@
+//
+// PDCViewController.m
+// ObjcPlayground
+//
+// Created by Kyle Oba on 3/27/12.
+// Copyright (c) 2012 Pas de Chocolat, LLC. All rights reserved.
+//
+
+#import "PDCViewController.h"
+
+@interface PDCViewController ()
+
+@end
+
+@implementation PDCViewController
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view, typically from a nib.
+}
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
+}
+
+@end
View
2 ObjcPlayground/ObjcPlayground/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
View
27 ObjcPlayground/ObjcPlayground/en.lproj/MainStoryboard.storyboard
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.0" toolsVersion="1906" systemVersion="11A511" targetRuntime="iOS.CocoaTouch" nextObjectID="6" propertyAccessControl="none" initialViewController="2">
+ <dependencies>
+ <development defaultVersion="4200" identifier="xcode"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="902"/>
+ </dependencies>
+ <scenes>
+ <scene sceneID="5">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/>
+ <viewController id="2" customClass="PDCViewController" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="3">
+ <rect key="frame" x="0.0" y="20" width="320" height="460"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
+ </viewController>
+ </objects>
+ </scene>
+ </scenes>
+ <simulatedMetricsContainer key="defaultSimulatedMetrics">
+ <simulatedStatusBarMetrics key="statusBar"/>
+ <simulatedOrientationMetrics key="orientation"/>
+ <simulatedScreenMetrics key="destination"/>
+ </simulatedMetricsContainer>
+</document>
View
18 ObjcPlayground/ObjcPlayground/main.m
@@ -0,0 +1,18 @@
+//
+// main.m
+// ObjcPlayground
+//
+// Created by Kyle Oba on 3/27/12.
+// Copyright (c) 2012 Pas de Chocolat, LLC. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import "PDCAppDelegate.h"
+
+int main(int argc, char *argv[])
+{
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([PDCAppDelegate class]));
+ }
+}
View
BIN objc4-493.11.tar.gz
Binary file not shown.

0 comments on commit 06e3463

Please sign in to comment.
Something went wrong with that request. Please try again.