Skip to content

Commit

Permalink
Initial source code commit, including example project
Browse files Browse the repository at this point in the history
  • Loading branch information
misterwell committed Dec 11, 2013
1 parent 58dbbce commit f713b4b
Show file tree
Hide file tree
Showing 33 changed files with 2,501 additions and 0 deletions.
540 changes: 540 additions & 0 deletions Demo/Demo.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions Demo/Demo/Base.lproj/Main_iPad.storyboard
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
</dependencies>
<scenes>
<!--Vector Graphic View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="VectorGraphicViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="ITL-Ge-8IZ"/>
<viewControllerLayoutGuide type="bottom" id="8gO-ud-8RR"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="20" width="768" height="1004"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackOpaque"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination"/>
</simulatedMetricsContainer>
</document>
399 changes: 399 additions & 0 deletions Demo/Demo/Base.lproj/Main_iPhone.storyboard

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions Demo/Demo/Demo-Info.plist
@@ -0,0 +1,49 @@
<?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>Max-Wellington.${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_iPhone</string>
<key>UIMainStoryboardFile~ipad</key>
<string>Main_iPad</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
16 changes: 16 additions & 0 deletions Demo/Demo/Demo-Prefix.pch
@@ -0,0 +1,16 @@
//
// 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
13 changes: 13 additions & 0 deletions Demo/Demo/ImageExampleViewController.h
@@ -0,0 +1,13 @@
//
// ImageExampleViewController.h
// Demo
//
// Created by Michael Maxwell on 12/9/13.
// Copyright (c) 2013 Michael Maxwell. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface ImageExampleViewController : UIViewController

@end
49 changes: 49 additions & 0 deletions Demo/Demo/ImageExampleViewController.m
@@ -0,0 +1,49 @@
//
// ImageExampleViewController.m
// Demo
//
// Created by Michael Maxwell on 12/9/13.
// Copyright (c) 2013 Michael Maxwell. All rights reserved.
//

#import "ImageExampleViewController.h"

#import "VectorTestClasses.h"

@interface ImageExampleViewController ()
@property (weak, nonatomic) IBOutlet UIImageView *smallerImageView;
@property (weak, nonatomic) IBOutlet UIImageView *mediumImageView;
@property (weak, nonatomic) IBOutlet UIImageView *largeImageView;
@property (weak, nonatomic) IBOutlet UIImageView *xtraLargeImageView;
@end

@implementation ImageExampleViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}

- (void)viewDidLoad
{
[super viewDidLoad];

ScalableTestVector *testVector = [[ScalableTestVector alloc] init];
testVector.contentMode = UIViewContentModeScaleAspectFit;
self.smallerImageView.image = [testVector getImageWithSize:self.smallerImageView.bounds.size];
self.mediumImageView.image = [testVector getImageWithSize:self.mediumImageView.bounds.size];
self.largeImageView.image = [testVector getImageWithSize:self.largeImageView.bounds.size];
self.xtraLargeImageView.image = [testVector getImageWithSize:self.xtraLargeImageView.bounds.size];
}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

@end
53 changes: 53 additions & 0 deletions Demo/Demo/Images.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,53 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
51 changes: 51 additions & 0 deletions Demo/Demo/Images.xcassets/LaunchImage.launchimage/Contents.json
@@ -0,0 +1,51 @@
{
"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"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
15 changes: 15 additions & 0 deletions Demo/Demo/MMAppDelegate.h
@@ -0,0 +1,15 @@
//
// MMAppDelegate.h
// VectorPlayground
//
// Created by Michael Maxwell on 12/6/13.
// Copyright (c) 2013 Michael Maxwell. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface MMAppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@end
46 changes: 46 additions & 0 deletions Demo/Demo/MMAppDelegate.m
@@ -0,0 +1,46 @@
//
// MMAppDelegate.m
// VectorPlayground
//
// Created by Michael Maxwell on 12/6/13.
// Copyright (c) 2013 Michael Maxwell. All rights reserved.
//

#import "MMAppDelegate.h"

@implementation MMAppDelegate

- (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
13 changes: 13 additions & 0 deletions Demo/Demo/TestSelectionViewController.h
@@ -0,0 +1,13 @@
//
// TestSelectionViewController.h
// VectorPlayground
//
// Created by Michael Maxwell on 12/7/13.
// Copyright (c) 2013 Michael Maxwell. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface TestSelectionViewController : UITableViewController

@end

0 comments on commit f713b4b

Please sign in to comment.