Commit 87dd84ed by Daniel Dahan

adding StackView with examples

parent 7d7f9c8f
......@@ -63,6 +63,13 @@
location = "group:Programmatic/ImageCardView/ImageCardView.xcodeproj">
</FileRef>
</Group>
<Group
location = "container:"
name = "StackView">
<FileRef
location = "group:Programmatic/StackView/StackView.xcodeproj">
</FileRef>
</Group>
</Group>
<Group
location = "container:"
......
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
9608ABB61C1908DD0000BB93 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9608ABB51C1908DD0000BB93 /* AppDelegate.swift */; };
9608ABB81C1908DD0000BB93 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9608ABB71C1908DD0000BB93 /* ViewController.swift */; };
9608ABBD1C1908DD0000BB93 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9608ABBC1C1908DD0000BB93 /* Assets.xcassets */; };
9608ABC01C1908DD0000BB93 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9608ABBE1C1908DD0000BB93 /* LaunchScreen.storyboard */; };
9608ABC81C190B2B0000BB93 /* MaterialKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9608ABC71C190B2B0000BB93 /* MaterialKit.framework */; };
9608ABC91C190B2B0000BB93 /* MaterialKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9608ABC71C190B2B0000BB93 /* MaterialKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
9608ABCA1C190B2B0000BB93 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
9608ABC91C190B2B0000BB93 /* MaterialKit.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
9608ABB21C1908DD0000BB93 /* StackView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StackView.app; sourceTree = BUILT_PRODUCTS_DIR; };
9608ABB51C1908DD0000BB93 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
9608ABB71C1908DD0000BB93 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
9608ABBC1C1908DD0000BB93 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
9608ABBF1C1908DD0000BB93 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
9608ABC11C1908DD0000BB93 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9608ABC71C190B2B0000BB93 /* MaterialKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = MaterialKit.framework; path = "/Users/danieldahan/Library/Developer/Xcode/DerivedData/MaterialKit-anypxbsecgdqqxevbavirvnffqxd/Build/Products/Debug-iphoneos/MaterialKit.framework"; sourceTree = "<absolute>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
9608ABAF1C1908DD0000BB93 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9608ABC81C190B2B0000BB93 /* MaterialKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
9608ABA91C1908DD0000BB93 = {
isa = PBXGroup;
children = (
9608ABC71C190B2B0000BB93 /* MaterialKit.framework */,
9608ABB41C1908DD0000BB93 /* StackView */,
9608ABB31C1908DD0000BB93 /* Products */,
);
sourceTree = "<group>";
};
9608ABB31C1908DD0000BB93 /* Products */ = {
isa = PBXGroup;
children = (
9608ABB21C1908DD0000BB93 /* StackView.app */,
);
name = Products;
sourceTree = "<group>";
};
9608ABB41C1908DD0000BB93 /* StackView */ = {
isa = PBXGroup;
children = (
9608ABB51C1908DD0000BB93 /* AppDelegate.swift */,
9608ABB71C1908DD0000BB93 /* ViewController.swift */,
9608ABBC1C1908DD0000BB93 /* Assets.xcassets */,
9608ABBE1C1908DD0000BB93 /* LaunchScreen.storyboard */,
9608ABC11C1908DD0000BB93 /* Info.plist */,
);
path = StackView;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
9608ABB11C1908DD0000BB93 /* StackView */ = {
isa = PBXNativeTarget;
buildConfigurationList = 9608ABC41C1908DD0000BB93 /* Build configuration list for PBXNativeTarget "StackView" */;
buildPhases = (
9608ABAE1C1908DD0000BB93 /* Sources */,
9608ABAF1C1908DD0000BB93 /* Frameworks */,
9608ABB01C1908DD0000BB93 /* Resources */,
9608ABCA1C190B2B0000BB93 /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = StackView;
productName = StackView;
productReference = 9608ABB21C1908DD0000BB93 /* StackView.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
9608ABAA1C1908DD0000BB93 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0710;
LastUpgradeCheck = 0710;
ORGANIZATIONNAME = "CosmicMind, Inc.";
TargetAttributes = {
9608ABB11C1908DD0000BB93 = {
CreatedOnToolsVersion = 7.1.1;
};
};
};
buildConfigurationList = 9608ABAD1C1908DD0000BB93 /* Build configuration list for PBXProject "StackView" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 9608ABA91C1908DD0000BB93;
productRefGroup = 9608ABB31C1908DD0000BB93 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
9608ABB11C1908DD0000BB93 /* StackView */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
9608ABB01C1908DD0000BB93 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9608ABC01C1908DD0000BB93 /* LaunchScreen.storyboard in Resources */,
9608ABBD1C1908DD0000BB93 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
9608ABAE1C1908DD0000BB93 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9608ABB81C1908DD0000BB93 /* ViewController.swift in Sources */,
9608ABB61C1908DD0000BB93 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
9608ABBE1C1908DD0000BB93 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
9608ABBF1C1908DD0000BB93 /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
9608ABC21C1908DD0000BB93 /* 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 = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
9608ABC31C1908DD0000BB93 /* 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 = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
9608ABC51C1908DD0000BB93 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = StackView/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.StackView;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
9608ABC61C1908DD0000BB93 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = StackView/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.StackView;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
9608ABAD1C1908DD0000BB93 /* Build configuration list for PBXProject "StackView" */ = {
isa = XCConfigurationList;
buildConfigurations = (
9608ABC21C1908DD0000BB93 /* Debug */,
9608ABC31C1908DD0000BB93 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
9608ABC41C1908DD0000BB93 /* Build configuration list for PBXNativeTarget "StackView" */ = {
isa = XCConfigurationList;
buildConfigurations = (
9608ABC51C1908DD0000BB93 /* Debug */,
9608ABC61C1908DD0000BB93 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 9608ABAA1C1908DD0000BB93 /* Project object */;
}
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:StackView.xcodeproj">
</FileRef>
</Workspace>
//
// Copyright (C) 2015 CosmicMind, Inc. <http://cosmicmind.io> and other CosmicMind contributors
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program located at the root of the software package
// in a file called LICENSE. If not, see <http://www.gnu.org/licenses/>.
//
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.
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = ViewController()
window!.makeKeyAndVisible()
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:.
}
}
{
"images" : [
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-29@2x-1.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-60@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-40@2x-1.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-76@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
</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"/>
<animations/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</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>
<?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>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
//
// Copyright (C) 2015 CosmicMind, Inc. <http://cosmicmind.io> and other CosmicMind contributors
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program located at the root of the software package
// in a file called LICENSE. If not, see <http://www.gnu.org/licenses/>.
//
import UIKit
import MaterialKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
prepareView()
// Examples of using StackView.
// Uncomment different examples and read
// the comments below.
prepareGeneralStackViewExample()
}
/**
:name: prepareView
:description: General preparation statements.
*/
private func prepareView() {
view.backgroundColor = MaterialColor.white
}
/**
:name: prepareGeneralImageCardViewExample
:description: General usage example.
*/
private func prepareGeneralStackViewExample() {
}
}
......@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
9608ABCD1C190B8B0000BB93 /* StackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9608ABCC1C190B8B0000BB93 /* StackView.swift */; };
963832421B88DFD80015F710 /* MaterialKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 963832361B88DFD80015F710 /* MaterialKit.framework */; };
9638325A1B88E31A0015F710 /* MaterialKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832581B88E31A0015F710 /* MaterialKitTests.swift */; };
96D88C1E1C1328D800B91418 /* CaptureView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88BF51C1328D800B91418 /* CaptureView.swift */; };
......@@ -92,6 +93,7 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
9608ABCC1C190B8B0000BB93 /* StackView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StackView.swift; sourceTree = "<group>"; };
963832361B88DFD80015F710 /* MaterialKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MaterialKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
963832411B88DFD80015F710 /* MaterialKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MaterialKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
963832581B88E31A0015F710 /* MaterialKitTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialKitTests.swift; sourceTree = "<group>"; };
......@@ -157,6 +159,14 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
9608ABCB1C190B7C0000BB93 /* Stack */ = {
isa = PBXGroup;
children = (
9608ABCC1C190B8B0000BB93 /* StackView.swift */,
);
name = Stack;
sourceTree = "<group>";
};
9638322C1B88DFD80015F710 = {
isa = PBXGroup;
children = (
......@@ -204,6 +214,7 @@
96D88C4A1C13294200B91418 /* Type */,
96D88C491C13292700B91418 /* Capture */,
96D88C471C1328F500B91418 /* Font */,
9608ABCB1C190B7C0000BB93 /* Stack */,
);
path = Sources;
sourceTree = "<group>";
......@@ -520,6 +531,7 @@
96D88C331C1328D800B91418 /* MaterialLabel.swift in Sources */,
96D88C281C1328D800B91418 /* MaterialAnimation.swift in Sources */,
96D88C451C1328D800B91418 /* RobotoFont.swift in Sources */,
9608ABCD1C190B8B0000BB93 /* StackView.swift in Sources */,
96D88C1F1C1328D800B91418 /* CardView.swift in Sources */,
96D88C2C1C1328D800B91418 /* MaterialColor.swift in Sources */,
96D88C301C1328D800B91418 /* MaterialEdgeInsets.swift in Sources */,
......
......@@ -121,16 +121,6 @@ public class CapturePreviewView : MaterialView, UIGestureRecognizerDelegate {
}
/**
:name: prepareView
*/
public override func prepareView() {
super.prepareView()
preparePreviewLayer()
tapToFocusEnabled = true
tapToExposeEnabled = true
}
/**
:name: captureDevicePointOfInterestForPoint
*/
public func captureDevicePointOfInterestForPoint(point: CGPoint) -> CGPoint {
......@@ -145,6 +135,16 @@ public class CapturePreviewView : MaterialView, UIGestureRecognizerDelegate {
}
//
// :name: prepareView
//
internal override func prepareView() {
super.prepareView()
preparePreviewLayer()
tapToFocusEnabled = true
tapToExposeEnabled = true
}
//
// :name: handleTapToFocusGesture
//
internal func handleTapToFocusGesture(recognizer: UITapGestureRecognizer) {
......
......@@ -91,17 +91,6 @@ public class CaptureView : MaterialView, CaptureSessionDelegate, CapturePreviewV
}
/**
:name: prepareView
*/
public override func prepareView() {
super.prepareView()
preparePreviewView()
prepareFocusLayer()
prepareExposureLayer()
reloadView()
}
/**
:name: reloadView
*/
public func reloadView() {
......@@ -175,6 +164,17 @@ public class CaptureView : MaterialView, CaptureSessionDelegate, CapturePreviewV
}
//
// :name: prepareView
//
internal override func prepareView() {
super.prepareView()
preparePreviewView()
prepareFocusLayer()
prepareExposureLayer()
reloadView()
}
//
// :name: handleSwitchCameras
//
internal func handleSwitchCameras() {
......
......@@ -251,27 +251,6 @@ public class CardView : MaterialPulseView {
}
/**
:name: prepareView
*/
public override func prepareView() {
super.prepareView()
userInteractionEnabled = MaterialTheme.basicCardView.userInteractionEnabled
backgroundColor = MaterialTheme.basicCardView.backgroundColor
pulseColor = MaterialTheme.basicCardView.pulseColor
contentsRect = MaterialTheme.basicCardView.contentsRect
contentsCenter = MaterialTheme.basicCardView.contentsCenter
contentsScale = MaterialTheme.basicCardView.contentsScale
contentsGravity = MaterialTheme.basicCardView.contentsGravity
shadowDepth = MaterialTheme.basicCardView.shadowDepth
shadowColor = MaterialTheme.basicCardView.shadowColor
zPosition = MaterialTheme.basicCardView.zPosition
borderWidth = MaterialTheme.basicCardView.borderWidth
borderColor = MaterialTheme.basicCardView.bordercolor
dividerColor = MaterialTheme.basicCardView.dividerColor
}
/**
:name: reloadView
*/
public func reloadView() {
......@@ -411,6 +390,27 @@ public class CardView : MaterialPulseView {
}
//
// :name: prepareView
//
internal override func prepareView() {
super.prepareView()
userInteractionEnabled = MaterialTheme.basicCardView.userInteractionEnabled
backgroundColor = MaterialTheme.basicCardView.backgroundColor
pulseColor = MaterialTheme.basicCardView.pulseColor
contentsRect = MaterialTheme.basicCardView.contentsRect
contentsCenter = MaterialTheme.basicCardView.contentsCenter
contentsScale = MaterialTheme.basicCardView.contentsScale
contentsGravity = MaterialTheme.basicCardView.contentsGravity
shadowDepth = MaterialTheme.basicCardView.shadowDepth
shadowColor = MaterialTheme.basicCardView.shadowColor
zPosition = MaterialTheme.basicCardView.zPosition
borderWidth = MaterialTheme.basicCardView.borderWidth
borderColor = MaterialTheme.basicCardView.bordercolor
dividerColor = MaterialTheme.basicCardView.dividerColor
}
//
// :name: prepareDivider
//
internal func prepareDivider(y: CGFloat, width: CGFloat) {
......
......@@ -19,10 +19,10 @@
import UIKit
public class FabButton : MaterialButton {
/**
:name: prepareView
*/
public override func prepareView() {
//
// :name: prepareView
//
internal override func prepareView() {
super.prepareView()
setTitleColor(MaterialTheme.fabButton.titleLabelColorForNormalState, forState: .Normal)
titleLabel?.font = MaterialTheme.fabButton.titleLabelFont
......
......@@ -19,10 +19,10 @@
import UIKit
public class FlatButton : MaterialButton {
/**
:name: prepareView
*/
public override func prepareView() {
//
// :name: prepareView
//
internal override func prepareView() {
super.prepareView()
setTitleColor(MaterialTheme.flatButton.titleLabelColorForNormalState, forState: .Normal)
titleLabel?.font = MaterialTheme.flatButton.titleLabelFont
......
......@@ -345,27 +345,6 @@ public class ImageCardView : MaterialPulseView {
}
/**
:name: prepareView
*/
public override func prepareView() {
super.prepareView()
userInteractionEnabled = MaterialTheme.imageCardView.userInteractionEnabled
backgroundColor = MaterialTheme.imageCardView.backgroundColor
pulseColor = MaterialTheme.imageCardView.pulseColor
contentsRect = MaterialTheme.imageCardView.contentsRect
contentsCenter = MaterialTheme.imageCardView.contentsCenter
contentsScale = MaterialTheme.imageCardView.contentsScale
contentsGravity = MaterialTheme.imageCardView.contentsGravity
shadowDepth = MaterialTheme.imageCardView.shadowDepth
shadowColor = MaterialTheme.imageCardView.shadowColor
zPosition = MaterialTheme.imageCardView.zPosition
borderWidth = MaterialTheme.imageCardView.borderWidth
borderColor = MaterialTheme.imageCardView.bordercolor
dividerColor = MaterialTheme.imageCardView.dividerColor
}
/**
:name: reloadView
*/
public func reloadView() {
......@@ -548,6 +527,27 @@ public class ImageCardView : MaterialPulseView {
}
//
// :name: prepareView
//
internal override func prepareView() {
super.prepareView()
userInteractionEnabled = MaterialTheme.imageCardView.userInteractionEnabled
backgroundColor = MaterialTheme.imageCardView.backgroundColor
pulseColor = MaterialTheme.imageCardView.pulseColor
contentsRect = MaterialTheme.imageCardView.contentsRect
contentsCenter = MaterialTheme.imageCardView.contentsCenter
contentsScale = MaterialTheme.imageCardView.contentsScale
contentsGravity = MaterialTheme.imageCardView.contentsGravity
shadowDepth = MaterialTheme.imageCardView.shadowDepth
shadowColor = MaterialTheme.imageCardView.shadowColor
zPosition = MaterialTheme.imageCardView.zPosition
borderWidth = MaterialTheme.imageCardView.borderWidth
borderColor = MaterialTheme.imageCardView.bordercolor
dividerColor = MaterialTheme.imageCardView.dividerColor
}
//
// :name: prepareImageLayer
//
internal func prepareImageLayer() {
......
......@@ -446,10 +446,10 @@ public class MaterialButton : UIButton {
return nil // returning nil enables the animations for the layer property that are normally disabled.
}
/**
:name: prepareView
*/
public func prepareView() {
//
// :name: prepareView
//
internal func prepareView() {
prepareVisualLayer()
preparePulseLayer()
}
......
......@@ -126,10 +126,10 @@ public class MaterialLabel : UILabel {
return textLayer.stringSize(constrainedToWidth: width)
}
/**
:name: prepareView
*/
public func prepareView() {
//
// :name: prepareView
//
internal func prepareView() {
textAlignment = MaterialTheme.label.textAlignment
wrapped = MaterialTheme.label.wrapped
contentsScale = MaterialTheme.label.contentsScale
......
......@@ -130,10 +130,10 @@ public class MaterialPulseView : MaterialView {
shrink()
}
/**
:name: prepareView
*/
public override func prepareView() {
//
// :name: prepareView
//
internal override func prepareView() {
super.prepareView()
userInteractionEnabled = MaterialTheme.pulseView.userInteractionEnabled
backgroundColor = MaterialTheme.pulseView.backgroundColor
......
......@@ -382,7 +382,7 @@ public class MaterialView : UIView {
//
// :name: prepareView
//
public func prepareView() {
internal func prepareView() {
userInteractionEnabled = MaterialTheme.view.userInteractionEnabled
backgroundColor = MaterialTheme.view.backgroundColor
......
......@@ -196,25 +196,6 @@ public class NavigationBarView : MaterialView {
}
/**
:name: prepareView
*/
public override func prepareView() {
super.prepareView()
userInteractionEnabled = MaterialTheme.navigationBarView.userInteractionEnabled
backgroundColor = MaterialTheme.navigationBarView.backgroundColor
contentsRect = MaterialTheme.navigationBarView.contentsRect
contentsCenter = MaterialTheme.navigationBarView.contentsCenter
contentsScale = MaterialTheme.navigationBarView.contentsScale
contentsGravity = MaterialTheme.navigationBarView.contentsGravity
shadowDepth = MaterialTheme.navigationBarView.shadowDepth
shadowColor = MaterialTheme.navigationBarView.shadowColor
zPosition = MaterialTheme.navigationBarView.zPosition
borderWidth = MaterialTheme.navigationBarView.borderWidth
borderColor = MaterialTheme.navigationBarView.bordercolor
}
/**
:name: reloadView
*/
public func reloadView() {
......@@ -335,6 +316,25 @@ public class NavigationBarView : MaterialView {
}
//
// :name: prepareView
//
internal override func prepareView() {
super.prepareView()
userInteractionEnabled = MaterialTheme.navigationBarView.userInteractionEnabled
backgroundColor = MaterialTheme.navigationBarView.backgroundColor
contentsRect = MaterialTheme.navigationBarView.contentsRect
contentsCenter = MaterialTheme.navigationBarView.contentsCenter
contentsScale = MaterialTheme.navigationBarView.contentsScale
contentsGravity = MaterialTheme.navigationBarView.contentsGravity
shadowDepth = MaterialTheme.navigationBarView.shadowDepth
shadowColor = MaterialTheme.navigationBarView.shadowColor
zPosition = MaterialTheme.navigationBarView.zPosition
borderWidth = MaterialTheme.navigationBarView.borderWidth
borderColor = MaterialTheme.navigationBarView.bordercolor
}
//
// :name: prepareProperties
//
internal func prepareProperties(titleLabel: UILabel?, detailLabel: UILabel?, leftButtons: Array<UIButton>?, rightButtons: Array<UIButton>?) {
......
......@@ -19,10 +19,10 @@
import UIKit
public class RaisedButton : MaterialButton {
/**
:name: prepareView
*/
public override func prepareView() {
//
// :name: prepareView
//
internal override func prepareView() {
super.prepareView()
setTitleColor(MaterialTheme.raisedButton.titleLabelColorForNormalState, forState: .Normal)
titleLabel!.font = MaterialTheme.raisedButton.titleLabelFont
......
//
// Copyright (C) 2015 CosmicMind, Inc. <http://cosmicmind.io> and other CosmicMind contributors
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program located at the root of the software package
// in a file called LICENSE. If not, see <http://www.gnu.org/licenses/>.
//
import UIKit
@available(iOS 9.0, *)
public class StackView : UIStackView {
/**
:name: init
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
}
/**
:name: init
*/
public override init(frame: CGRect) {
super.init(frame: frame)
prepareView()
}
/**
:name: init
*/
public convenience init() {
self.init(frame: CGRectNull)
}
//
// :name: prepareView
//
private func prepareView() {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment