Commits

Abizer Nasir  committed 2fe4547

Initial commit

  • Participants

Comments (0)

Files changed (12)

File AutolayoutExample.xcodeproj/project.pbxproj

+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		EE93B9C8180400AD00DFE21B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE93B9C7180400AD00DFE21B /* Foundation.framework */; };
+		EE93B9CA180400AD00DFE21B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE93B9C9180400AD00DFE21B /* CoreGraphics.framework */; };
+		EE93B9CC180400AD00DFE21B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE93B9CB180400AD00DFE21B /* UIKit.framework */; };
+		EE93B9D2180400AD00DFE21B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = EE93B9D0180400AD00DFE21B /* InfoPlist.strings */; };
+		EE93B9D4180400AE00DFE21B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = EE93B9D3180400AD00DFE21B /* main.m */; };
+		EE93B9D8180400AE00DFE21B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = EE93B9D7180400AE00DFE21B /* AppDelegate.m */; };
+		EE93B9DB180400AE00DFE21B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EE93B9D9180400AE00DFE21B /* Main.storyboard */; };
+		EE93B9DE180400AE00DFE21B /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EE93B9DD180400AE00DFE21B /* ViewController.m */; };
+		EE93B9E0180400AE00DFE21B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EE93B9DF180400AE00DFE21B /* Images.xcassets */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		EE93B9C4180400AD00DFE21B /* AutolayoutExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AutolayoutExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		EE93B9C7180400AD00DFE21B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		EE93B9C9180400AD00DFE21B /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+		EE93B9CB180400AD00DFE21B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+		EE93B9CF180400AD00DFE21B /* AutolayoutExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "AutolayoutExample-Info.plist"; sourceTree = "<group>"; };
+		EE93B9D1180400AD00DFE21B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		EE93B9D3180400AD00DFE21B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		EE93B9D5180400AE00DFE21B /* AutolayoutExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AutolayoutExample-Prefix.pch"; sourceTree = "<group>"; };
+		EE93B9D6180400AE00DFE21B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+		EE93B9D7180400AE00DFE21B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+		EE93B9DA180400AE00DFE21B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+		EE93B9DC180400AE00DFE21B /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
+		EE93B9DD180400AE00DFE21B /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
+		EE93B9DF180400AE00DFE21B /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
+		EE93B9E6180400AE00DFE21B /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		EE93B9C1180400AD00DFE21B /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				EE93B9CA180400AD00DFE21B /* CoreGraphics.framework in Frameworks */,
+				EE93B9CC180400AD00DFE21B /* UIKit.framework in Frameworks */,
+				EE93B9C8180400AD00DFE21B /* Foundation.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		EE93B9BB180400AD00DFE21B = {
+			isa = PBXGroup;
+			children = (
+				EE93B9CD180400AD00DFE21B /* AutolayoutExample */,
+				EE93B9C6180400AD00DFE21B /* Frameworks */,
+				EE93B9C5180400AD00DFE21B /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		EE93B9C5180400AD00DFE21B /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				EE93B9C4180400AD00DFE21B /* AutolayoutExample.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		EE93B9C6180400AD00DFE21B /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				EE93B9C7180400AD00DFE21B /* Foundation.framework */,
+				EE93B9C9180400AD00DFE21B /* CoreGraphics.framework */,
+				EE93B9CB180400AD00DFE21B /* UIKit.framework */,
+				EE93B9E6180400AE00DFE21B /* XCTest.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		EE93B9CD180400AD00DFE21B /* AutolayoutExample */ = {
+			isa = PBXGroup;
+			children = (
+				EE93B9D6180400AE00DFE21B /* AppDelegate.h */,
+				EE93B9D7180400AE00DFE21B /* AppDelegate.m */,
+				EE93B9D9180400AE00DFE21B /* Main.storyboard */,
+				EE93B9DC180400AE00DFE21B /* ViewController.h */,
+				EE93B9DD180400AE00DFE21B /* ViewController.m */,
+				EE93B9DF180400AE00DFE21B /* Images.xcassets */,
+				EE93B9CE180400AD00DFE21B /* Supporting Files */,
+			);
+			path = AutolayoutExample;
+			sourceTree = "<group>";
+		};
+		EE93B9CE180400AD00DFE21B /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				EE93B9CF180400AD00DFE21B /* AutolayoutExample-Info.plist */,
+				EE93B9D0180400AD00DFE21B /* InfoPlist.strings */,
+				EE93B9D3180400AD00DFE21B /* main.m */,
+				EE93B9D5180400AE00DFE21B /* AutolayoutExample-Prefix.pch */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		EE93B9C3180400AD00DFE21B /* AutolayoutExample */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = EE93B9F6180400AE00DFE21B /* Build configuration list for PBXNativeTarget "AutolayoutExample" */;
+			buildPhases = (
+				EE93B9C0180400AD00DFE21B /* Sources */,
+				EE93B9C1180400AD00DFE21B /* Frameworks */,
+				EE93B9C2180400AD00DFE21B /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = AutolayoutExample;
+			productName = AutolayoutExample;
+			productReference = EE93B9C4180400AD00DFE21B /* AutolayoutExample.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		EE93B9BC180400AD00DFE21B /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0500;
+				ORGANIZATIONNAME = "Jungle Candy Software";
+			};
+			buildConfigurationList = EE93B9BF180400AD00DFE21B /* Build configuration list for PBXProject "AutolayoutExample" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = EE93B9BB180400AD00DFE21B;
+			productRefGroup = EE93B9C5180400AD00DFE21B /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				EE93B9C3180400AD00DFE21B /* AutolayoutExample */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		EE93B9C2180400AD00DFE21B /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				EE93B9E0180400AE00DFE21B /* Images.xcassets in Resources */,
+				EE93B9D2180400AD00DFE21B /* InfoPlist.strings in Resources */,
+				EE93B9DB180400AE00DFE21B /* Main.storyboard in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		EE93B9C0180400AD00DFE21B /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				EE93B9DE180400AE00DFE21B /* ViewController.m in Sources */,
+				EE93B9D8180400AE00DFE21B /* AppDelegate.m in Sources */,
+				EE93B9D4180400AE00DFE21B /* main.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		EE93B9D0180400AD00DFE21B /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				EE93B9D1180400AD00DFE21B /* en */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+		EE93B9D9180400AE00DFE21B /* Main.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				EE93B9DA180400AE00DFE21B /* Base */,
+			);
+			name = Main.storyboard;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		EE93B9F4180400AE00DFE21B /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = 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_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+			};
+			name = Debug;
+		};
+		EE93B9F5180400AE00DFE21B /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = YES;
+				ENABLE_NS_ASSERTIONS = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+				SDKROOT = iphoneos;
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		EE93B9F7180400AE00DFE21B /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "AutolayoutExample/AutolayoutExample-Prefix.pch";
+				INFOPLIST_FILE = "AutolayoutExample/AutolayoutExample-Info.plist";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug;
+		};
+		EE93B9F8180400AE00DFE21B /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "AutolayoutExample/AutolayoutExample-Prefix.pch";
+				INFOPLIST_FILE = "AutolayoutExample/AutolayoutExample-Info.plist";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		EE93B9BF180400AD00DFE21B /* Build configuration list for PBXProject "AutolayoutExample" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				EE93B9F4180400AE00DFE21B /* Debug */,
+				EE93B9F5180400AE00DFE21B /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		EE93B9F6180400AE00DFE21B /* Build configuration list for PBXNativeTarget "AutolayoutExample" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				EE93B9F7180400AE00DFE21B /* Debug */,
+				EE93B9F8180400AE00DFE21B /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = EE93B9BC180400AD00DFE21B /* Project object */;
+}

File AutolayoutExample/AppDelegate.h

+//
+//  AppDelegate.h
+//  AutolayoutExample
+//
+//  Created by Abizer Nasir on 08/10/2013.
+//  Copyright (c) 2013 Jungle Candy Software. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@end

File AutolayoutExample/AppDelegate.m

+//
+//  AppDelegate.m
+//  AutolayoutExample
+//
+//  Created by Abizer Nasir on 08/10/2013.
+//  Copyright (c) 2013 Jungle Candy Software. All rights reserved.
+//
+
+#import "AppDelegate.h"
+
+@implementation AppDelegate
+
+- (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

File AutolayoutExample/AutolayoutExample-Info.plist

+<?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.junglecandy.${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>Main</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>

File AutolayoutExample/AutolayoutExample-Prefix.pch

+//
+//  Prefix header
+//
+//  The contents of this file are implicitly included at the beginning of every source file.
+//
+
+#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

File AutolayoutExample/Base.lproj/Main.storyboard

+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4451" systemVersion="13A461" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
+    <dependencies>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3676"/>
+    </dependencies>
+    <scenes>
+        <!--class Prefix:identifier View Controller-->
+        <scene sceneID="ufC-wZ-h7g">
+            <objects>
+                <viewController id="vXZ-lx-hvc" customClass="ViewController" sceneMemberID="viewController">
+                    <view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
+                        <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
+            </objects>
+        </scene>
+    </scenes>
+    <simulatedMetricsContainer key="defaultSimulatedMetrics">
+        <simulatedStatusBarMetrics key="statusBar"/>
+        <simulatedOrientationMetrics key="orientation"/>
+        <simulatedScreenMetrics key="destination" type="retina4"/>
+    </simulatedMetricsContainer>
+</document>

File AutolayoutExample/Images.xcassets/AppIcon.appiconset/Contents.json

+{
+  "images" : [
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "40x40",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "60x60",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

File AutolayoutExample/Images.xcassets/LaunchImage.launchimage/Contents.json

+{
+  "images" : [
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "subtype" : "retina4",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

File AutolayoutExample/ViewController.h

+//
+//  ViewController.h
+//  AutolayoutExample
+//
+//  Created by Abizer Nasir on 08/10/2013.
+//  Copyright (c) 2013 Jungle Candy Software. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface ViewController : UIViewController
+
+@end

File AutolayoutExample/ViewController.m

+//
+//  ViewController.m
+//  AutolayoutExample
+//
+//  Created by Abizer Nasir on 08/10/2013.
+//  Copyright (c) 2013 Jungle Candy Software. All rights reserved.
+//
+
+#import "ViewController.h"
+
+@interface ViewController ()
+
+@end
+
+@implementation ViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+
+    // Create the containing view
+	UIView *greyView = [[UIView alloc] initWithFrame:CGRectZero];
+    greyView.backgroundColor = [UIColor grayColor];
+    greyView.translatesAutoresizingMaskIntoConstraints = NO;
+
+    [self.view addSubview:greyView];
+
+    // Create the label to go into the containing view
+    UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero];
+    label.translatesAutoresizingMaskIntoConstraints = NO;
+    label.text = @"Example Text";
+
+    label.backgroundColor = [UIColor yellowColor];
+
+    [greyView addSubview:label];
+    
+    NSDictionary *bindings = NSDictionaryOfVariableBindings(greyView, label);
+
+    // Set the constraints for the greyView relative to it's superview - to cover completely
+    [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[greyView]|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:nil views:bindings]];
+    [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[greyView]|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:nil views:bindings]];
+
+    // Set the constraints for the label to be pinned equally with padding
+    [greyView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(30)-[label]-(30)-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:nil views:bindings]];
+    [greyView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(30)-[label]-(30)-|" options:NSLayoutFormatDirectionLeadingToTrailing metrics:nil views:bindings]];
+
+}
+
+@end

File AutolayoutExample/en.lproj/InfoPlist.strings

+/* Localized versions of Info.plist keys */
+

File AutolayoutExample/main.m

+//
+//  main.m
+//  AutolayoutExample
+//
+//  Created by Abizer Nasir on 08/10/2013.
+//  Copyright (c) 2013 Jungle Candy Software. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+#import "AppDelegate.h"
+
+int main(int argc, char * argv[]) {
+    @autoreleasepool {
+        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+    }
+}