Add Picker project to repo

This commit is contained in:
Eryn Wells 2015-07-26 07:26:52 -07:00
parent 3cdef70c87
commit c77be6616e
12 changed files with 890 additions and 0 deletions

View file

@ -0,0 +1,410 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
C01989FE1B5FE65F00AA7A81 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01989FD1B5FE65F00AA7A81 /* AppDelegate.swift */; };
C0198A001B5FE65F00AA7A81 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C01989FF1B5FE65F00AA7A81 /* ViewController.swift */; };
C0198A031B5FE65F00AA7A81 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C0198A011B5FE65F00AA7A81 /* Main.storyboard */; };
C0198A051B5FE65F00AA7A81 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C0198A041B5FE65F00AA7A81 /* Assets.xcassets */; };
C0198A081B5FE65F00AA7A81 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C0198A061B5FE65F00AA7A81 /* LaunchScreen.storyboard */; };
C0198A131B5FE65F00AA7A81 /* PickerUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0198A121B5FE65F00AA7A81 /* PickerUITests.swift */; };
C0198A1F1B613D4600AA7A81 /* PickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0198A1D1B613D4600AA7A81 /* PickerViewController.swift */; };
C0198A201B613D4600AA7A81 /* PickerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C0198A1E1B613D4600AA7A81 /* PickerViewController.xib */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
C0198A0F1B5FE65F00AA7A81 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = C01989F21B5FE65F00AA7A81 /* Project object */;
proxyType = 1;
remoteGlobalIDString = C01989F91B5FE65F00AA7A81;
remoteInfo = Picker;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
C01989FA1B5FE65F00AA7A81 /* Picker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Picker.app; sourceTree = BUILT_PRODUCTS_DIR; };
C01989FD1B5FE65F00AA7A81 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
C01989FF1B5FE65F00AA7A81 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
C0198A021B5FE65F00AA7A81 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
C0198A041B5FE65F00AA7A81 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
C0198A071B5FE65F00AA7A81 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
C0198A091B5FE65F00AA7A81 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C0198A0E1B5FE65F00AA7A81 /* PickerUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PickerUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
C0198A121B5FE65F00AA7A81 /* PickerUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PickerUITests.swift; sourceTree = "<group>"; };
C0198A141B5FE65F00AA7A81 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C0198A1D1B613D4600AA7A81 /* PickerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PickerViewController.swift; sourceTree = "<group>"; };
C0198A1E1B613D4600AA7A81 /* PickerViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PickerViewController.xib; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
C01989F71B5FE65F00AA7A81 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
C0198A0B1B5FE65F00AA7A81 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
C01989F11B5FE65F00AA7A81 = {
isa = PBXGroup;
children = (
C01989FC1B5FE65F00AA7A81 /* Picker */,
C0198A111B5FE65F00AA7A81 /* PickerUITests */,
C01989FB1B5FE65F00AA7A81 /* Products */,
);
sourceTree = "<group>";
};
C01989FB1B5FE65F00AA7A81 /* Products */ = {
isa = PBXGroup;
children = (
C01989FA1B5FE65F00AA7A81 /* Picker.app */,
C0198A0E1B5FE65F00AA7A81 /* PickerUITests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
C01989FC1B5FE65F00AA7A81 /* Picker */ = {
isa = PBXGroup;
children = (
C01989FD1B5FE65F00AA7A81 /* AppDelegate.swift */,
C01989FF1B5FE65F00AA7A81 /* ViewController.swift */,
C0198A011B5FE65F00AA7A81 /* Main.storyboard */,
C0198A041B5FE65F00AA7A81 /* Assets.xcassets */,
C0198A061B5FE65F00AA7A81 /* LaunchScreen.storyboard */,
C0198A091B5FE65F00AA7A81 /* Info.plist */,
C0198A1D1B613D4600AA7A81 /* PickerViewController.swift */,
C0198A1E1B613D4600AA7A81 /* PickerViewController.xib */,
);
path = Picker;
sourceTree = "<group>";
};
C0198A111B5FE65F00AA7A81 /* PickerUITests */ = {
isa = PBXGroup;
children = (
C0198A121B5FE65F00AA7A81 /* PickerUITests.swift */,
C0198A141B5FE65F00AA7A81 /* Info.plist */,
);
path = PickerUITests;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
C01989F91B5FE65F00AA7A81 /* Picker */ = {
isa = PBXNativeTarget;
buildConfigurationList = C0198A171B5FE65F00AA7A81 /* Build configuration list for PBXNativeTarget "Picker" */;
buildPhases = (
C01989F61B5FE65F00AA7A81 /* Sources */,
C01989F71B5FE65F00AA7A81 /* Frameworks */,
C01989F81B5FE65F00AA7A81 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Picker;
productName = Picker;
productReference = C01989FA1B5FE65F00AA7A81 /* Picker.app */;
productType = "com.apple.product-type.application";
};
C0198A0D1B5FE65F00AA7A81 /* PickerUITests */ = {
isa = PBXNativeTarget;
buildConfigurationList = C0198A1A1B5FE65F00AA7A81 /* Build configuration list for PBXNativeTarget "PickerUITests" */;
buildPhases = (
C0198A0A1B5FE65F00AA7A81 /* Sources */,
C0198A0B1B5FE65F00AA7A81 /* Frameworks */,
C0198A0C1B5FE65F00AA7A81 /* Resources */,
);
buildRules = (
);
dependencies = (
C0198A101B5FE65F00AA7A81 /* PBXTargetDependency */,
);
name = PickerUITests;
productName = PickerUITests;
productReference = C0198A0E1B5FE65F00AA7A81 /* PickerUITests.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
C01989F21B5FE65F00AA7A81 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0700;
ORGANIZATIONNAME = "Eryn Wells";
TargetAttributes = {
C01989F91B5FE65F00AA7A81 = {
CreatedOnToolsVersion = 7.0;
};
C0198A0D1B5FE65F00AA7A81 = {
CreatedOnToolsVersion = 7.0;
TestTargetID = C01989F91B5FE65F00AA7A81;
};
};
};
buildConfigurationList = C01989F51B5FE65F00AA7A81 /* Build configuration list for PBXProject "Picker" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = C01989F11B5FE65F00AA7A81;
productRefGroup = C01989FB1B5FE65F00AA7A81 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
C01989F91B5FE65F00AA7A81 /* Picker */,
C0198A0D1B5FE65F00AA7A81 /* PickerUITests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
C01989F81B5FE65F00AA7A81 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C0198A081B5FE65F00AA7A81 /* LaunchScreen.storyboard in Resources */,
C0198A051B5FE65F00AA7A81 /* Assets.xcassets in Resources */,
C0198A201B613D4600AA7A81 /* PickerViewController.xib in Resources */,
C0198A031B5FE65F00AA7A81 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
C0198A0C1B5FE65F00AA7A81 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
C01989F61B5FE65F00AA7A81 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C0198A1F1B613D4600AA7A81 /* PickerViewController.swift in Sources */,
C0198A001B5FE65F00AA7A81 /* ViewController.swift in Sources */,
C01989FE1B5FE65F00AA7A81 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
C0198A0A1B5FE65F00AA7A81 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C0198A131B5FE65F00AA7A81 /* PickerUITests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
C0198A101B5FE65F00AA7A81 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = C01989F91B5FE65F00AA7A81 /* Picker */;
targetProxy = C0198A0F1B5FE65F00AA7A81 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
C0198A011B5FE65F00AA7A81 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
C0198A021B5FE65F00AA7A81 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
C0198A061B5FE65F00AA7A81 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
C0198A071B5FE65F00AA7A81 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
C0198A151B5FE65F00AA7A81 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
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_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
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_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
C0198A161B5FE65F00AA7A81 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
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_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
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_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
C0198A181B5FE65F00AA7A81 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Picker/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.erynwells.ios.Picker;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
C0198A191B5FE65F00AA7A81 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Picker/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.erynwells.ios.Picker;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
C0198A1B1B5FE65F00AA7A81 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = PickerUITests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.erynwells.ios.PickerUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_TARGET_NAME = Picker;
USES_XCTRUNNER = YES;
};
name = Debug;
};
C0198A1C1B5FE65F00AA7A81 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
INFOPLIST_FILE = PickerUITests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.erynwells.ios.PickerUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_TARGET_NAME = Picker;
USES_XCTRUNNER = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
C01989F51B5FE65F00AA7A81 /* Build configuration list for PBXProject "Picker" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C0198A151B5FE65F00AA7A81 /* Debug */,
C0198A161B5FE65F00AA7A81 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C0198A171B5FE65F00AA7A81 /* Build configuration list for PBXNativeTarget "Picker" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C0198A181B5FE65F00AA7A81 /* Debug */,
C0198A191B5FE65F00AA7A81 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
C0198A1A1B5FE65F00AA7A81 /* Build configuration list for PBXNativeTarget "PickerUITests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C0198A1B1B5FE65F00AA7A81 /* Debug */,
C0198A1C1B5FE65F00AA7A81 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = C01989F21B5FE65F00AA7A81 /* Project object */;
}

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Picker.xcodeproj">
</FileRef>
</Workspace>

46
Picker/AppDelegate.swift Normal file
View file

@ -0,0 +1,46 @@
//
// AppDelegate.swift
// Picker
//
// Created by Eryn Wells on 2015-07-22.
// Copyright © 2015 Eryn Wells. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
func applicationWillResignActive(application: UIApplication) {
// 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.
}
func applicationDidEnterBackground(application: UIApplication) {
// 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.
}
func applicationWillEnterForeground(application: UIApplication) {
// 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.
}
func applicationDidBecomeActive(application: UIApplication) {
// 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.
}
func applicationWillTerminate(application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
}

View file

@ -0,0 +1,68 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"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"
}
}

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8076" systemVersion="14D121" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8063"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright © 2015 Eryn Wells. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="obG-Y5-kRd">
<rect key="frame" x="20" y="559" width="560" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Picker" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
<rect key="frame" x="20" y="180" width="560" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="centerX" secondItem="obG-Y5-kRd" secondAttribute="centerX" id="5cz-MP-9tL"/>
<constraint firstAttribute="centerX" secondItem="GJd-Yh-RWb" secondAttribute="centerX" id="Q3B-4B-g5h"/>
<constraint firstItem="obG-Y5-kRd" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" constant="20" symbolic="YES" id="SfN-ll-jLj"/>
<constraint firstAttribute="bottom" secondItem="obG-Y5-kRd" secondAttribute="bottom" constant="20" id="Y44-ml-fuU"/>
<constraint firstItem="GJd-Yh-RWb" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="bottom" multiplier="1/3" constant="1" id="moa-c2-u7t"/>
<constraint firstItem="GJd-Yh-RWb" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" constant="20" symbolic="YES" id="x7j-FC-K8j"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>

View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8164.2" systemVersion="15A226f" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8135.1"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="Picker" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="37h-SS-3wU">
<rect key="frame" x="60" y="200" width="480" height="220"/>
<animations/>
</stackView>
</subviews>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="37h-SS-3wU" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" constant="40" id="mac-f5-dUT"/>
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="37h-SS-3wU" secondAttribute="bottom" constant="180" id="t37-bI-vjT"/>
<constraint firstItem="37h-SS-3wU" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="180" id="uEq-Nt-KH9"/>
<constraint firstAttribute="trailingMargin" secondItem="37h-SS-3wU" secondAttribute="trailing" constant="40" id="ugb-64-F8b"/>
</constraints>
</view>
<connections>
<outlet property="stackView" destination="37h-SS-3wU" id="JS5-50-mXc"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="443" y="538"/>
</scene>
</scenes>
</document>

47
Picker/Info.plist Normal file
View file

@ -0,0 +1,47 @@
<?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>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</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</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<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>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View file

@ -0,0 +1,63 @@
//
// PickerViewController.swift
// Picker
//
// Created by Eryn Wells on 2015-07-23.
// Copyright © 2015 Eryn Wells. All rights reserved.
//
import UIKit
class PickerViewController: UIViewController {
var alphabet: [Character] = [] {
didSet {
if let picker = picker {
picker.reloadComponent(0)
}
}
}
private let pickerMax = 10000
@IBOutlet private weak var picker: UIPickerView!
@IBOutlet private weak var pickerPositionLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
let middle = pickerMax / 2
picker.selectRow(middle - (middle % alphabet.count), inComponent: 0, animated: false)
updatePositionLabel()
}
private func updatePositionLabel() {
self.pickerPositionLabel.text = String(picker.selectedRowInComponent(0) % alphabet.count)
}
@IBAction func advance() {
picker.selectRow(picker.selectedRowInComponent(0) + 1, inComponent: 0, animated: true)
updatePositionLabel()
}
// MARK: - UIPickerViewDataSource
func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int {
return 1
}
func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
return pickerMax
}
// MARK: - UIPickerViewDelegate
func pickerView(pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
updatePositionLabel()
}
func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? {
if alphabet.count == 0 {
return nil
}
return String(alphabet[row % alphabet.count])
}
}

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8164.2" systemVersion="15A226f" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8135.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PickerViewController" customModule="Picker" customModuleProvider="target">
<connections>
<outlet property="picker" destination="P6T-KK-RJn" id="6su-yR-4CI"/>
<outlet property="pickerPositionLabel" destination="B3B-T6-NRJ" id="A7v-Bc-FKZ"/>
<outlet property="view" destination="i5M-Pr-FkT" id="gbJ-G9-cJh"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="266" height="652"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<pickerView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="P6T-KK-RJn">
<rect key="frame" x="0.0" y="0.0" width="266" height="585"/>
<animations/>
<connections>
<outlet property="dataSource" destination="-1" id="ucf-Uv-db0"/>
<outlet property="delegate" destination="-1" id="2KV-dZ-eKb"/>
</connections>
</pickerView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="751" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="B3B-T6-NRJ">
<rect key="frame" x="112" y="593" width="42" height="21"/>
<animations/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="252" verticalCompressionResistancePriority="751" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bfg-hP-tX1">
<rect key="frame" x="103" y="622" width="60" height="30"/>
<animations/>
<state key="normal" title="Advance"/>
<connections>
<action selector="advance" destination="-1" eventType="touchUpInside" id="S3f-58-jaM"/>
</connections>
</button>
</subviews>
<animations/>
<constraints>
<constraint firstAttribute="trailing" secondItem="P6T-KK-RJn" secondAttribute="trailing" id="Al9-pM-byh"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="bfg-hP-tX1" secondAttribute="trailing" id="EUb-IQ-yDt"/>
<constraint firstItem="B3B-T6-NRJ" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="PvB-DM-4th"/>
<constraint firstAttribute="bottom" secondItem="bfg-hP-tX1" secondAttribute="bottom" id="VXR-iz-41k"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="B3B-T6-NRJ" secondAttribute="trailing" id="Vyo-lo-2nq"/>
<constraint firstItem="P6T-KK-RJn" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="WXv-1Z-7B5"/>
<constraint firstItem="B3B-T6-NRJ" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="iLA-ZJ-ozY"/>
<constraint firstItem="bfg-hP-tX1" firstAttribute="top" secondItem="B3B-T6-NRJ" secondAttribute="bottom" constant="8" symbolic="YES" id="n0k-fl-zwA"/>
<constraint firstItem="P6T-KK-RJn" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="nSF-jC-4at"/>
<constraint firstItem="bfg-hP-tX1" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="p3i-v9-nmD"/>
<constraint firstItem="B3B-T6-NRJ" firstAttribute="top" secondItem="P6T-KK-RJn" secondAttribute="bottom" constant="8" symbolic="YES" id="sV5-hj-vgA"/>
<constraint firstItem="bfg-hP-tX1" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="sui-5T-qTx"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<nil key="simulatedTopBarMetrics"/>
<nil key="simulatedBottomBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="219" y="556"/>
</view>
</objects>
</document>

View file

@ -0,0 +1,33 @@
//
// ViewController.swift
// Picker
//
// Created by Eryn Wells on 2015-07-22.
// Copyright © 2015 Eryn Wells. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var stackView: UIStackView!
let alphabets: [String] = ["EKMFLGDQVZNTOWYHXUSPAIBRCJ",
"AJDKSIRUXBLHWTMCQGZNPYFVOE",
"BDFHJLCPRTXVZNYEIWGAKMUSQO"]
var pickerViewControllers: [PickerViewController] = []
override func viewDidLoad() {
super.viewDidLoad()
for al in alphabets {
let picker = PickerViewController()
picker.alphabet = Array(al.characters)
self.addChildViewController(picker)
pickerViewControllers.append(picker)
stackView.addArrangedSubview(picker.view)
picker.didMoveToParentViewController(self)
}
}
}

24
PickerUITests/Info.plist Normal file
View file

@ -0,0 +1,24 @@
<?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>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View file

@ -0,0 +1,35 @@
//
// PickerUITests.swift
// PickerUITests
//
// Created by Eryn Wells on 2015-07-22.
// Copyright © 2015 Eryn Wells. All rights reserved.
//
import Foundation
import XCTest
class PickerUITests: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
// In UI tests it is usually best to stop immediately when a failure occurs.
continueAfterFailure = false
// UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
XCUIApplication().launch()
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// Use recording to get started writing UI tests.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
}