Commit 9db71ae2 by Daniel Dahan

initial commit for MaterialSwitch

parent 30d06aeb
...@@ -75,6 +75,13 @@ ...@@ -75,6 +75,13 @@
</Group> </Group>
<Group <Group
location = "container:" location = "container:"
name = "MaterialSwitch">
<FileRef
location = "group:Programmatic/MaterialSwitch/MaterialSwitch.xcodeproj">
</FileRef>
</Group>
<Group
location = "container:"
name = "NavigationBarView"> name = "NavigationBarView">
<FileRef <FileRef
location = "group:Programmatic/NavigationBarView/NavigationBarView.xcodeproj"> location = "group:Programmatic/NavigationBarView/NavigationBarView.xcodeproj">
......
...@@ -57,7 +57,7 @@ class ViewController: UIViewController { ...@@ -57,7 +57,7 @@ class ViewController: UIViewController {
pulseView.image = UIImage(named: "Graph") pulseView.image = UIImage(named: "Graph")
pulseView.shape = .Square pulseView.shape = .Square
pulseView.depth = .Depth1 pulseView.depth = .Depth1
pulseView.cornerRadius = .Radius3 pulseView.cornerRadiusPreset = .Radius3
// Add pulseView to UIViewController. // Add pulseView to UIViewController.
view.addSubview(pulseView) view.addSubview(pulseView)
......
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
96A71ED51C6FFF7300C0C4AE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71ED41C6FFF7300C0C4AE /* AppDelegate.swift */; };
96A71ED71C6FFF7300C0C4AE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71ED61C6FFF7300C0C4AE /* ViewController.swift */; };
96A71EDC1C6FFF7300C0C4AE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96A71EDB1C6FFF7300C0C4AE /* Assets.xcassets */; };
96A71EDF1C6FFF7300C0C4AE /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 96A71EDD1C6FFF7300C0C4AE /* LaunchScreen.storyboard */; };
96A71EE71C70007600C0C4AE /* Material.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96A71EE61C70007600C0C4AE /* Material.framework */; };
96A71EE81C70007600C0C4AE /* Material.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 96A71EE61C70007600C0C4AE /* Material.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
96A71EE91C70007600C0C4AE /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
96A71EE81C70007600C0C4AE /* Material.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
96A71ED11C6FFF7300C0C4AE /* MaterialSwitch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MaterialSwitch.app; sourceTree = BUILT_PRODUCTS_DIR; };
96A71ED41C6FFF7300C0C4AE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
96A71ED61C6FFF7300C0C4AE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
96A71EDB1C6FFF7300C0C4AE /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
96A71EDE1C6FFF7300C0C4AE /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
96A71EE01C6FFF7300C0C4AE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
96A71EE61C70007600C0C4AE /* Material.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = Material.framework; path = "/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-hbpnflxhoouqxebjcyhbbhqyesjd/Build/Products/Debug-iphoneos/Material.framework"; sourceTree = "<absolute>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
96A71ECE1C6FFF7300C0C4AE /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
96A71EE71C70007600C0C4AE /* Material.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
96A71EC81C6FFF7300C0C4AE = {
isa = PBXGroup;
children = (
96A71EE61C70007600C0C4AE /* Material.framework */,
96A71ED31C6FFF7300C0C4AE /* MaterialSwitch */,
96A71ED21C6FFF7300C0C4AE /* Products */,
);
sourceTree = "<group>";
};
96A71ED21C6FFF7300C0C4AE /* Products */ = {
isa = PBXGroup;
children = (
96A71ED11C6FFF7300C0C4AE /* MaterialSwitch.app */,
);
name = Products;
sourceTree = "<group>";
};
96A71ED31C6FFF7300C0C4AE /* MaterialSwitch */ = {
isa = PBXGroup;
children = (
96A71ED41C6FFF7300C0C4AE /* AppDelegate.swift */,
96A71ED61C6FFF7300C0C4AE /* ViewController.swift */,
96A71EDB1C6FFF7300C0C4AE /* Assets.xcassets */,
96A71EDD1C6FFF7300C0C4AE /* LaunchScreen.storyboard */,
96A71EE01C6FFF7300C0C4AE /* Info.plist */,
);
path = MaterialSwitch;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
96A71ED01C6FFF7300C0C4AE /* MaterialSwitch */ = {
isa = PBXNativeTarget;
buildConfigurationList = 96A71EE31C6FFF7300C0C4AE /* Build configuration list for PBXNativeTarget "MaterialSwitch" */;
buildPhases = (
96A71ECD1C6FFF7300C0C4AE /* Sources */,
96A71ECE1C6FFF7300C0C4AE /* Frameworks */,
96A71ECF1C6FFF7300C0C4AE /* Resources */,
96A71EE91C70007600C0C4AE /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = MaterialSwitch;
productName = MaterialSwitch;
productReference = 96A71ED11C6FFF7300C0C4AE /* MaterialSwitch.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
96A71EC91C6FFF7300C0C4AE /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0720;
ORGANIZATIONNAME = "CosmicMind, Inc.";
TargetAttributes = {
96A71ED01C6FFF7300C0C4AE = {
CreatedOnToolsVersion = 7.2;
};
};
};
buildConfigurationList = 96A71ECC1C6FFF7300C0C4AE /* Build configuration list for PBXProject "MaterialSwitch" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 96A71EC81C6FFF7300C0C4AE;
productRefGroup = 96A71ED21C6FFF7300C0C4AE /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
96A71ED01C6FFF7300C0C4AE /* MaterialSwitch */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
96A71ECF1C6FFF7300C0C4AE /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
96A71EDF1C6FFF7300C0C4AE /* LaunchScreen.storyboard in Resources */,
96A71EDC1C6FFF7300C0C4AE /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
96A71ECD1C6FFF7300C0C4AE /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
96A71ED71C6FFF7300C0C4AE /* ViewController.swift in Sources */,
96A71ED51C6FFF7300C0C4AE /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
96A71EDD1C6FFF7300C0C4AE /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
96A71EDE1C6FFF7300C0C4AE /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
96A71EE11C6FFF7300C0C4AE /* 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;
};
96A71EE21C6FFF7300C0C4AE /* 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;
};
96A71EE41C6FFF7300C0C4AE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = MaterialSwitch/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.MaterialSwitch;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
96A71EE51C6FFF7300C0C4AE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = MaterialSwitch/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.MaterialSwitch;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
96A71ECC1C6FFF7300C0C4AE /* Build configuration list for PBXProject "MaterialSwitch" */ = {
isa = XCConfigurationList;
buildConfigurations = (
96A71EE11C6FFF7300C0C4AE /* Debug */,
96A71EE21C6FFF7300C0C4AE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
96A71EE31C6FFF7300C0C4AE /* Build configuration list for PBXNativeTarget "MaterialSwitch" */ = {
isa = XCConfigurationList;
buildConfigurations = (
96A71EE41C6FFF7300C0C4AE /* Debug */,
96A71EE51C6FFF7300C0C4AE /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 96A71EC91C6FFF7300C0C4AE /* Project object */;
}
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:MaterialSwitch.xcodeproj">
</FileRef>
</Workspace>
/*
* Copyright (C) 2015 - 2016, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.io>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of Material nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
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" : "Material-Icon-29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Material-Icon-29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Material-Icon-40@2x-1.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Material-Icon-40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Material-Icon-60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Material-Icon-60@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Material-Icon-29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Material-Icon-29@2x-1.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Material-Icon-40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Material-Icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Material-Icon-76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Material-Icon-76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Material-Icon-83.5@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"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>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
/*
* Copyright (C) 2015 - 2016, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.io>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of Material nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
The following is an example of MaterialSwitch.
*/
import UIKit
import Material
class ViewController: UIViewController, MaterialSwitchDelegate {
/// Reference for MaterialSwitch.
private var materialSwitch: MaterialSwitch!
override func viewDidLoad() {
super.viewDidLoad()
prepareView()
prepareSmallMaterialSwitch()
prepareNormalMaterialSwitch()
prepareLargeMaterialSwitch()
prepareLightDisabledMaterialSwitch()
prepareDarkDisabledMaterialSwitch()
}
/// General preparation statements.
private func prepareView() {
view.backgroundColor = MaterialColor.white
}
/// Prepares the Small MaterialSwitch.
private func prepareSmallMaterialSwitch() {
materialSwitch = MaterialSwitch(state: .Off, style: .Light, size: .Small)
materialSwitch.center = view.center
materialSwitch.y -= 100
materialSwitch.delegate = self
view.addSubview(materialSwitch)
}
/// Prepares the Normal MaterialSwitch.
private func prepareNormalMaterialSwitch() {
materialSwitch = MaterialSwitch(state: .On, style: .Dark, size: .Normal)
materialSwitch.center = view.center
materialSwitch.delegate = self
view.addSubview(materialSwitch)
}
/// Prepares the Large MaterialSwitch.
private func prepareLargeMaterialSwitch() {
materialSwitch = MaterialSwitch(state: .Off, style: .Light, size: .Large)
materialSwitch.center = view.center
materialSwitch.y += 100
materialSwitch.delegate = self
view.addSubview(materialSwitch)
}
/// Prepares the Light disabled MaterialSwitch.
private func prepareLightDisabledMaterialSwitch() {
materialSwitch = MaterialSwitch(state: .Off, style: .Light, size: .Normal)
materialSwitch.enabled = false
materialSwitch.center = view.center
materialSwitch.y += 200
materialSwitch.delegate = self
view.addSubview(materialSwitch)
}
/// Prepares the Dark disabled MaterialSwitch.
private func prepareDarkDisabledMaterialSwitch() {
materialSwitch = MaterialSwitch(state: .On, style: .Dark, size: .Normal)
materialSwitch.enabled = false
materialSwitch.center = view.center
materialSwitch.y += 300
materialSwitch.delegate = self
view.addSubview(materialSwitch)
}
internal func materialSwitchStateChanged(control: MaterialSwitch, state: MaterialSwitchState) {
print("MaterialSwitch - Size: \(control.switchSize) State: \(state)")
}
}
...@@ -85,11 +85,19 @@ class ViewController: UIViewController { ...@@ -85,11 +85,19 @@ class ViewController: UIViewController {
func prepareCardView() { func prepareCardView() {
let cardView: CardView = CardView() let cardView: CardView = CardView()
cardView.pulseColor = nil cardView.pulseColor = nil
cardView.backgroundColor = MaterialColor.grey.lighten5
cardView.cornerRadiusPreset = .Radius1
cardView.divider = false
cardView.contentInsetPreset = .None
cardView.leftButtonsInsetPreset = .Square2
cardView.rightButtonsInsetPreset = .Square2
cardView.detailViewInsetPreset = .None
let titleLabel: UILabel = UILabel() let titleLabel: UILabel = UILabel()
titleLabel.font = RobotoFont.mediumWithSize(20)
titleLabel.text = "Messages" titleLabel.text = "Messages"
titleLabel.textAlignment = .Center titleLabel.textAlignment = .Center
titleLabel.font = RobotoFont.mediumWithSize(24) titleLabel.textColor = MaterialColor.blueGrey.darken4
let v: UIView = UIView() let v: UIView = UIView()
v.backgroundColor = MaterialColor.blue.accent1 v.backgroundColor = MaterialColor.blue.accent1
...@@ -106,8 +114,6 @@ class ViewController: UIViewController { ...@@ -106,8 +114,6 @@ class ViewController: UIViewController {
// Use MaterialLayout to easily align the tableView. // Use MaterialLayout to easily align the tableView.
cardView.titleLabel = titleLabel cardView.titleLabel = titleLabel
cardView.detailView = tableView cardView.detailView = tableView
cardView.detailViewInsetPreset = .None
cardView.dividerInset.top = 0
cardView.leftButtons = [closeButton] cardView.leftButtons = [closeButton]
cardView.rightButtons = [settingButton] cardView.rightButtons = [settingButton]
......
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'Material' s.name = 'Material'
s.version = '1.32.2' s.version = '1.32.3'
s.license = 'BSD' s.license = 'BSD'
s.summary = 'Express your creativity with Material, an animation and graphics framework for Google\'s Material Design and Apple\'s Flat UI in Swift.' s.summary = 'Express your creativity with Material, an animation and graphics framework for Google\'s Material Design and Apple\'s Flat UI in Swift.'
s.homepage = 'http://cosmicmind.io' s.homepage = 'http://cosmicmind.io'
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
96A71EB91C6FCFA300C0C4AE /* Grid.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9656CD0B1C6BD33700EBCEF1 /* Grid.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96A71EB91C6FCFA300C0C4AE /* Grid.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9656CD0B1C6BD33700EBCEF1 /* Grid.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96A71EBA1C6FCFA300C0C4AE /* Menu.swift in Headers */ = {isa = PBXBuildFile; fileRef = 65FDC2EA1C66858A00103AC2 /* Menu.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96A71EBA1C6FCFA300C0C4AE /* Menu.swift in Headers */ = {isa = PBXBuildFile; fileRef = 65FDC2EA1C66858A00103AC2 /* Menu.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96A71EBB1C6FCFA300C0C4AE /* MenuView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96A71E901C6FBC2200C0C4AE /* MenuView.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96A71EBB1C6FCFA300C0C4AE /* MenuView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96A71E901C6FBC2200C0C4AE /* MenuView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96A71EC71C6FFF0500C0C4AE /* MaterialSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71EC61C6FFF0500C0C4AE /* MaterialSwitch.swift */; };
96D88C1E1C1328D800B91418 /* CaptureView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88BF51C1328D800B91418 /* CaptureView.swift */; }; 96D88C1E1C1328D800B91418 /* CaptureView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88BF51C1328D800B91418 /* CaptureView.swift */; };
96D88C1F1C1328D800B91418 /* CardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88BF61C1328D800B91418 /* CardView.swift */; }; 96D88C1F1C1328D800B91418 /* CardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88BF61C1328D800B91418 /* CardView.swift */; };
96D88C201C1328D800B91418 /* CapturePreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88BF71C1328D800B91418 /* CapturePreviewView.swift */; }; 96D88C201C1328D800B91418 /* CapturePreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88BF71C1328D800B91418 /* CapturePreviewView.swift */; };
...@@ -54,7 +55,7 @@ ...@@ -54,7 +55,7 @@
96D88C2D1C1328D800B91418 /* MaterialDepth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88C041C1328D800B91418 /* MaterialDepth.swift */; }; 96D88C2D1C1328D800B91418 /* MaterialDepth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88C041C1328D800B91418 /* MaterialDepth.swift */; };
96D88C2E1C1328D800B91418 /* MaterialFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88C051C1328D800B91418 /* MaterialFont.swift */; }; 96D88C2E1C1328D800B91418 /* MaterialFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88C051C1328D800B91418 /* MaterialFont.swift */; };
96D88C2F1C1328D800B91418 /* MaterialGravity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88C061C1328D800B91418 /* MaterialGravity.swift */; }; 96D88C2F1C1328D800B91418 /* MaterialGravity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88C061C1328D800B91418 /* MaterialGravity.swift */; };
96D88C301C1328D800B91418 /* MaterialEdgeInsetPreset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88C071C1328D800B91418 /* MaterialEdgeInsetPreset.swift */; }; 96D88C301C1328D800B91418 /* MaterialEdgeInset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88C071C1328D800B91418 /* MaterialEdgeInset.swift */; };
96D88C311C1328D800B91418 /* MaterialKeyframeAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88C081C1328D800B91418 /* MaterialKeyframeAnimation.swift */; }; 96D88C311C1328D800B91418 /* MaterialKeyframeAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88C081C1328D800B91418 /* MaterialKeyframeAnimation.swift */; };
96D88C321C1328D800B91418 /* Material.h in Headers */ = {isa = PBXBuildFile; fileRef = 96D88C091C1328D800B91418 /* Material.h */; settings = {ATTRIBUTES = (Public, ); }; }; 96D88C321C1328D800B91418 /* Material.h in Headers */ = {isa = PBXBuildFile; fileRef = 96D88C091C1328D800B91418 /* Material.h */; settings = {ATTRIBUTES = (Public, ); }; };
96D88C331C1328D800B91418 /* MaterialLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88C0A1C1328D800B91418 /* MaterialLabel.swift */; }; 96D88C331C1328D800B91418 /* MaterialLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96D88C0A1C1328D800B91418 /* MaterialLabel.swift */; };
...@@ -83,7 +84,7 @@ ...@@ -83,7 +84,7 @@
96D88C5D1C132ABF00B91418 /* MaterialColor.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96D88C031C1328D800B91418 /* MaterialColor.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96D88C5D1C132ABF00B91418 /* MaterialColor.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96D88C031C1328D800B91418 /* MaterialColor.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D88C5E1C132ABF00B91418 /* MaterialDepth.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96D88C041C1328D800B91418 /* MaterialDepth.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96D88C5E1C132ABF00B91418 /* MaterialDepth.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96D88C041C1328D800B91418 /* MaterialDepth.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D88C5F1C132ABF00B91418 /* MaterialGravity.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96D88C061C1328D800B91418 /* MaterialGravity.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96D88C5F1C132ABF00B91418 /* MaterialGravity.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96D88C061C1328D800B91418 /* MaterialGravity.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D88C601C132ABF00B91418 /* MaterialEdgeInsetPreset.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96D88C071C1328D800B91418 /* MaterialEdgeInsetPreset.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96D88C601C132ABF00B91418 /* MaterialEdgeInset.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96D88C071C1328D800B91418 /* MaterialEdgeInset.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D88C611C132ABF00B91418 /* CaptureView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96D88BF51C1328D800B91418 /* CaptureView.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96D88C611C132ABF00B91418 /* CaptureView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96D88BF51C1328D800B91418 /* CaptureView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D88C621C132ABF00B91418 /* CapturePreviewView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96D88BF71C1328D800B91418 /* CapturePreviewView.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96D88C621C132ABF00B91418 /* CapturePreviewView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96D88BF71C1328D800B91418 /* CapturePreviewView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D88C631C132ABF00B91418 /* CaptureSession.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96D88BF81C1328D800B91418 /* CaptureSession.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96D88C631C132ABF00B91418 /* CaptureSession.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96D88BF81C1328D800B91418 /* CaptureSession.swift */; settings = {ATTRIBUTES = (Public, ); }; };
...@@ -137,6 +138,7 @@ ...@@ -137,6 +138,7 @@
9656CD0B1C6BD33700EBCEF1 /* Grid.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Grid.swift; sourceTree = "<group>"; }; 9656CD0B1C6BD33700EBCEF1 /* Grid.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Grid.swift; sourceTree = "<group>"; };
966F57B71C226D75009185B7 /* TextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextField.swift; sourceTree = "<group>"; }; 966F57B71C226D75009185B7 /* TextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextField.swift; sourceTree = "<group>"; };
96A71E901C6FBC2200C0C4AE /* MenuView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MenuView.swift; sourceTree = "<group>"; }; 96A71E901C6FBC2200C0C4AE /* MenuView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MenuView.swift; sourceTree = "<group>"; };
96A71EC61C6FFF0500C0C4AE /* MaterialSwitch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialSwitch.swift; sourceTree = "<group>"; };
96D88BF51C1328D800B91418 /* CaptureView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CaptureView.swift; sourceTree = "<group>"; }; 96D88BF51C1328D800B91418 /* CaptureView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CaptureView.swift; sourceTree = "<group>"; };
96D88BF61C1328D800B91418 /* CardView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardView.swift; sourceTree = "<group>"; }; 96D88BF61C1328D800B91418 /* CardView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardView.swift; sourceTree = "<group>"; };
96D88BF71C1328D800B91418 /* CapturePreviewView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CapturePreviewView.swift; sourceTree = "<group>"; }; 96D88BF71C1328D800B91418 /* CapturePreviewView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CapturePreviewView.swift; sourceTree = "<group>"; };
...@@ -154,7 +156,7 @@ ...@@ -154,7 +156,7 @@
96D88C041C1328D800B91418 /* MaterialDepth.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialDepth.swift; sourceTree = "<group>"; }; 96D88C041C1328D800B91418 /* MaterialDepth.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialDepth.swift; sourceTree = "<group>"; };
96D88C051C1328D800B91418 /* MaterialFont.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialFont.swift; sourceTree = "<group>"; }; 96D88C051C1328D800B91418 /* MaterialFont.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialFont.swift; sourceTree = "<group>"; };
96D88C061C1328D800B91418 /* MaterialGravity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialGravity.swift; sourceTree = "<group>"; }; 96D88C061C1328D800B91418 /* MaterialGravity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialGravity.swift; sourceTree = "<group>"; };
96D88C071C1328D800B91418 /* MaterialEdgeInsetPreset.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialEdgeInsetPreset.swift; sourceTree = "<group>"; }; 96D88C071C1328D800B91418 /* MaterialEdgeInset.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialEdgeInset.swift; sourceTree = "<group>"; };
96D88C081C1328D800B91418 /* MaterialKeyframeAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialKeyframeAnimation.swift; sourceTree = "<group>"; }; 96D88C081C1328D800B91418 /* MaterialKeyframeAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialKeyframeAnimation.swift; sourceTree = "<group>"; };
96D88C091C1328D800B91418 /* Material.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Material.h; sourceTree = "<group>"; }; 96D88C091C1328D800B91418 /* Material.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Material.h; sourceTree = "<group>"; };
96D88C0A1C1328D800B91418 /* MaterialLabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialLabel.swift; sourceTree = "<group>"; }; 96D88C0A1C1328D800B91418 /* MaterialLabel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialLabel.swift; sourceTree = "<group>"; };
...@@ -259,6 +261,14 @@ ...@@ -259,6 +261,14 @@
name = Menu; name = Menu;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
96A71EC51C6FFEF300C0C4AE /* Switch */ = {
isa = PBXGroup;
children = (
96A71EC61C6FFF0500C0C4AE /* MaterialSwitch.swift */,
);
name = Switch;
sourceTree = "<group>";
};
96D88BF41C1328D800B91418 /* Sources */ = { 96D88BF41C1328D800B91418 /* Sources */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -282,6 +292,7 @@ ...@@ -282,6 +292,7 @@
96442ADC1C28EF1400C3C574 /* TableView */, 96442ADC1C28EF1400C3C574 /* TableView */,
965C58BD1C6B8D3300CFB4E1 /* Grid */, 965C58BD1C6B8D3300CFB4E1 /* Grid */,
96A71E921C6FBC2900C0C4AE /* Menu */, 96A71E921C6FBC2900C0C4AE /* Menu */,
96A71EC51C6FFEF300C0C4AE /* Switch */,
); );
path = Sources; path = Sources;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -325,7 +336,7 @@ ...@@ -325,7 +336,7 @@
96D88C0F1C1328D800B91418 /* MaterialShape.swift */, 96D88C0F1C1328D800B91418 /* MaterialShape.swift */,
96D88C041C1328D800B91418 /* MaterialDepth.swift */, 96D88C041C1328D800B91418 /* MaterialDepth.swift */,
96D88C061C1328D800B91418 /* MaterialGravity.swift */, 96D88C061C1328D800B91418 /* MaterialGravity.swift */,
96D88C071C1328D800B91418 /* MaterialEdgeInsetPreset.swift */, 96D88C071C1328D800B91418 /* MaterialEdgeInset.swift */,
); );
name = Type; name = Type;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -459,7 +470,7 @@ ...@@ -459,7 +470,7 @@
96D88C5D1C132ABF00B91418 /* MaterialColor.swift in Headers */, 96D88C5D1C132ABF00B91418 /* MaterialColor.swift in Headers */,
96D88C5E1C132ABF00B91418 /* MaterialDepth.swift in Headers */, 96D88C5E1C132ABF00B91418 /* MaterialDepth.swift in Headers */,
96D88C5F1C132ABF00B91418 /* MaterialGravity.swift in Headers */, 96D88C5F1C132ABF00B91418 /* MaterialGravity.swift in Headers */,
96D88C601C132ABF00B91418 /* MaterialEdgeInsetPreset.swift in Headers */, 96D88C601C132ABF00B91418 /* MaterialEdgeInset.swift in Headers */,
96D88C611C132ABF00B91418 /* CaptureView.swift in Headers */, 96D88C611C132ABF00B91418 /* CaptureView.swift in Headers */,
96D88C621C132ABF00B91418 /* CapturePreviewView.swift in Headers */, 96D88C621C132ABF00B91418 /* CapturePreviewView.swift in Headers */,
96D88C631C132ABF00B91418 /* CaptureSession.swift in Headers */, 96D88C631C132ABF00B91418 /* CaptureSession.swift in Headers */,
...@@ -606,6 +617,7 @@ ...@@ -606,6 +617,7 @@
966F57B81C226D75009185B7 /* TextField.swift in Sources */, 966F57B81C226D75009185B7 /* TextField.swift in Sources */,
96DBA7361C61198400844821 /* Material+UIImage+Color.swift in Sources */, 96DBA7361C61198400844821 /* Material+UIImage+Color.swift in Sources */,
96D88C201C1328D800B91418 /* CapturePreviewView.swift in Sources */, 96D88C201C1328D800B91418 /* CapturePreviewView.swift in Sources */,
96A71EC71C6FFF0500C0C4AE /* MaterialSwitch.swift in Sources */,
96D88C3E1C1328D800B91418 /* NavigationBarView.swift in Sources */, 96D88C3E1C1328D800B91418 /* NavigationBarView.swift in Sources */,
96D88C221C1328D800B91418 /* FabButton.swift in Sources */, 96D88C221C1328D800B91418 /* FabButton.swift in Sources */,
96D88C3F1C1328D800B91418 /* RaisedButton.swift in Sources */, 96D88C3F1C1328D800B91418 /* RaisedButton.swift in Sources */,
...@@ -623,7 +635,7 @@ ...@@ -623,7 +635,7 @@
96D88C451C1328D800B91418 /* RobotoFont.swift in Sources */, 96D88C451C1328D800B91418 /* RobotoFont.swift in Sources */,
96D88C1F1C1328D800B91418 /* CardView.swift in Sources */, 96D88C1F1C1328D800B91418 /* CardView.swift in Sources */,
96D88C2C1C1328D800B91418 /* MaterialColor.swift in Sources */, 96D88C2C1C1328D800B91418 /* MaterialColor.swift in Sources */,
96D88C301C1328D800B91418 /* MaterialEdgeInsetPreset.swift in Sources */, 96D88C301C1328D800B91418 /* MaterialEdgeInset.swift in Sources */,
96D88C211C1328D800B91418 /* CaptureSession.swift in Sources */, 96D88C211C1328D800B91418 /* CaptureSession.swift in Sources */,
96442ADE1C28EF3700C3C574 /* MaterialTableViewCell.swift in Sources */, 96442ADE1C28EF3700C3C574 /* MaterialTableViewCell.swift in Sources */,
960B23271C383E5500E96216 /* Material+String.swift in Sources */, 960B23271C383E5500E96216 /* Material+String.swift in Sources */,
......
...@@ -185,16 +185,16 @@ public class CaptureView : MaterialView, UIGestureRecognizerDelegate { ...@@ -185,16 +185,16 @@ public class CaptureView : MaterialView, UIGestureRecognizerDelegate {
/** /**
:name: contentInsets :name: contentInsets
*/ */
public var contentInsetPreset: MaterialEdgeInsetPreset = .None { public var contentInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
contentInset = MaterialEdgeInsetPresetToValue(contentInsetPreset) contentInset = MaterialEdgeInsetToValue(contentInsetPreset)
} }
} }
/** /**
:name: contentInset :name: contentInset
*/ */
public var contentInset: UIEdgeInsets = MaterialEdgeInsetPresetToValue(.Square4) { public var contentInset: UIEdgeInsets = MaterialEdgeInsetToValue(.Square4) {
didSet { didSet {
reloadView() reloadView()
} }
......
...@@ -57,9 +57,9 @@ public class CardView : MaterialPulseView { ...@@ -57,9 +57,9 @@ public class CardView : MaterialPulseView {
/** /**
:name: dividerInsets :name: dividerInsets
*/ */
public var dividerInsetPreset: MaterialEdgeInsetPreset = .None { public var dividerInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
dividerInset = MaterialEdgeInsetPresetToValue(dividerInsetPreset) dividerInset = MaterialEdgeInsetToValue(dividerInsetPreset)
} }
} }
...@@ -75,16 +75,16 @@ public class CardView : MaterialPulseView { ...@@ -75,16 +75,16 @@ public class CardView : MaterialPulseView {
/** /**
:name: contentInsets :name: contentInsets
*/ */
public var contentInsetPreset: MaterialEdgeInsetPreset = .None { public var contentInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
contentInset = MaterialEdgeInsetPresetToValue(contentInsetPreset) contentInset = MaterialEdgeInsetToValue(contentInsetPreset)
} }
} }
/** /**
:name: contentInset :name: contentInset
*/ */
public var contentInset: UIEdgeInsets = MaterialEdgeInsetPresetToValue(.Square2) { public var contentInset: UIEdgeInsets = MaterialEdgeInsetToValue(.Square2) {
didSet { didSet {
reloadView() reloadView()
} }
...@@ -93,16 +93,16 @@ public class CardView : MaterialPulseView { ...@@ -93,16 +93,16 @@ public class CardView : MaterialPulseView {
/** /**
:name: titleLabelInsets :name: titleLabelInsets
*/ */
public var titleLabelInsetPreset: MaterialEdgeInsetPreset = .None { public var titleLabelInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
titleLabelInset = MaterialEdgeInsetPresetToValue(titleLabelInsetPreset) titleLabelInset = MaterialEdgeInsetToValue(titleLabelInsetPreset)
} }
} }
/** /**
:name: titleLabelInset :name: titleLabelInset
*/ */
public var titleLabelInset: UIEdgeInsets = MaterialEdgeInsetPresetToValue(.Square2) { public var titleLabelInset: UIEdgeInsets = MaterialEdgeInsetToValue(.Square2) {
didSet { didSet {
reloadView() reloadView()
} }
...@@ -121,16 +121,16 @@ public class CardView : MaterialPulseView { ...@@ -121,16 +121,16 @@ public class CardView : MaterialPulseView {
/** /**
:name: detailViewInsets :name: detailViewInsets
*/ */
public var detailViewInsetPreset: MaterialEdgeInsetPreset = .None { public var detailViewInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
detailViewInset = MaterialEdgeInsetPresetToValue(detailViewInsetPreset) detailViewInset = MaterialEdgeInsetToValue(detailViewInsetPreset)
} }
} }
/** /**
:name: detailViewInset :name: detailViewInset
*/ */
public var detailViewInset: UIEdgeInsets = MaterialEdgeInsetPresetToValue(.Square2) { public var detailViewInset: UIEdgeInsets = MaterialEdgeInsetToValue(.Square2) {
didSet { didSet {
reloadView() reloadView()
} }
...@@ -149,16 +149,16 @@ public class CardView : MaterialPulseView { ...@@ -149,16 +149,16 @@ public class CardView : MaterialPulseView {
/** /**
:name: leftButtonsInsets :name: leftButtonsInsets
*/ */
public var leftButtonsInsetPreset: MaterialEdgeInsetPreset = .None { public var leftButtonsInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
leftButtonsInset = MaterialEdgeInsetPresetToValue(leftButtonsInsetPreset) leftButtonsInset = MaterialEdgeInsetToValue(leftButtonsInsetPreset)
} }
} }
/** /**
:name: leftButtonsInset :name: leftButtonsInset
*/ */
public var leftButtonsInset: UIEdgeInsets = MaterialEdgeInsetPresetToValue(.None) { public var leftButtonsInset: UIEdgeInsets = MaterialEdgeInsetToValue(.None) {
didSet { didSet {
reloadView() reloadView()
} }
...@@ -181,16 +181,16 @@ public class CardView : MaterialPulseView { ...@@ -181,16 +181,16 @@ public class CardView : MaterialPulseView {
/** /**
:name: rightButtonsInsets :name: rightButtonsInsets
*/ */
public var rightButtonsInsetPreset: MaterialEdgeInsetPreset = .None { public var rightButtonsInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
rightButtonsInset = MaterialEdgeInsetPresetToValue(rightButtonsInsetPreset) rightButtonsInset = MaterialEdgeInsetToValue(rightButtonsInsetPreset)
} }
} }
/** /**
:name: rightButtonsInset :name: rightButtonsInset
*/ */
public var rightButtonsInset: UIEdgeInsets = MaterialEdgeInsetPresetToValue(.None) { public var rightButtonsInset: UIEdgeInsets = MaterialEdgeInsetToValue(.None) {
didSet { didSet {
reloadView() reloadView()
} }
......
...@@ -42,7 +42,7 @@ public class FlatButton : MaterialButton { ...@@ -42,7 +42,7 @@ public class FlatButton : MaterialButton {
super.prepareView() super.prepareView()
setTitleColor(MaterialColor.blue.accent3, forState: .Normal) setTitleColor(MaterialColor.blue.accent3, forState: .Normal)
pulseColor = MaterialColor.blue.accent3 pulseColor = MaterialColor.blue.accent3
cornerRadius = .Radius1 cornerRadiusPreset = .Radius1
contentInsetPreset = .WideRectangle3 contentInsetPreset = .WideRectangle3
} }
} }
\ No newline at end of file
...@@ -126,14 +126,14 @@ public class Grid { ...@@ -126,14 +126,14 @@ public class Grid {
public private(set) var axis: GridAxis! public private(set) var axis: GridAxis!
/// Preset inset value for grid. /// Preset inset value for grid.
public var contentInsetPreset: MaterialEdgeInsetPreset = .None { public var contentInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
contentInset = MaterialEdgeInsetPresetToValue(contentInsetPreset) contentInset = MaterialEdgeInsetToValue(contentInsetPreset)
} }
} }
/// Insets value for grid. /// Insets value for grid.
public var contentInset: UIEdgeInsets = MaterialEdgeInsetPresetToValue(.None) { public var contentInset: UIEdgeInsets = MaterialEdgeInsetToValue(.None) {
didSet { didSet {
reloadLayout() reloadLayout()
} }
......
...@@ -57,9 +57,9 @@ public class ImageCardView : MaterialPulseView { ...@@ -57,9 +57,9 @@ public class ImageCardView : MaterialPulseView {
/** /**
:name: dividerInsets :name: dividerInsets
*/ */
public var dividerInsetPreset: MaterialEdgeInsetPreset = .None { public var dividerInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
dividerInset = MaterialEdgeInsetPresetToValue(dividerInsetPreset) dividerInset = MaterialEdgeInsetToValue(dividerInsetPreset)
} }
} }
...@@ -165,16 +165,16 @@ public class ImageCardView : MaterialPulseView { ...@@ -165,16 +165,16 @@ public class ImageCardView : MaterialPulseView {
/** /**
:name: contentInsets :name: contentInsets
*/ */
public var contentInsetPreset: MaterialEdgeInsetPreset = .None { public var contentInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
contentInset = MaterialEdgeInsetPresetToValue(contentInsetPreset) contentInset = MaterialEdgeInsetToValue(contentInsetPreset)
} }
} }
/** /**
:name: contentInset :name: contentInset
*/ */
public var contentInset: UIEdgeInsets = MaterialEdgeInsetPresetToValue(.Square2) { public var contentInset: UIEdgeInsets = MaterialEdgeInsetToValue(.Square2) {
didSet { didSet {
reloadView() reloadView()
} }
...@@ -183,16 +183,16 @@ public class ImageCardView : MaterialPulseView { ...@@ -183,16 +183,16 @@ public class ImageCardView : MaterialPulseView {
/** /**
:name: titleLabelInsets :name: titleLabelInsets
*/ */
public var titleLabelInsetPreset: MaterialEdgeInsetPreset = .None { public var titleLabelInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
titleLabelInset = MaterialEdgeInsetPresetToValue(titleLabelInsetPreset) titleLabelInset = MaterialEdgeInsetToValue(titleLabelInsetPreset)
} }
} }
/** /**
:name: titleLabelInset :name: titleLabelInset
*/ */
public var titleLabelInset: UIEdgeInsets = MaterialEdgeInsetPresetToValue(.Square2) { public var titleLabelInset: UIEdgeInsets = MaterialEdgeInsetToValue(.Square2) {
didSet { didSet {
reloadView() reloadView()
} }
...@@ -211,16 +211,16 @@ public class ImageCardView : MaterialPulseView { ...@@ -211,16 +211,16 @@ public class ImageCardView : MaterialPulseView {
/** /**
:name: detailViewInsets :name: detailViewInsets
*/ */
public var detailViewInsetPreset: MaterialEdgeInsetPreset = .None { public var detailViewInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
detailViewInset = MaterialEdgeInsetPresetToValue(detailViewInsetPreset) detailViewInset = MaterialEdgeInsetToValue(detailViewInsetPreset)
} }
} }
/** /**
:name: detailViewInset :name: detailViewInset
*/ */
public var detailViewInset: UIEdgeInsets = MaterialEdgeInsetPresetToValue(.Square2) { public var detailViewInset: UIEdgeInsets = MaterialEdgeInsetToValue(.Square2) {
didSet { didSet {
reloadView() reloadView()
} }
...@@ -239,16 +239,16 @@ public class ImageCardView : MaterialPulseView { ...@@ -239,16 +239,16 @@ public class ImageCardView : MaterialPulseView {
/** /**
:name: leftButtonsInsets :name: leftButtonsInsets
*/ */
public var leftButtonsInsetPreset: MaterialEdgeInsetPreset = .None { public var leftButtonsInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
leftButtonsInset = MaterialEdgeInsetPresetToValue(leftButtonsInsetPreset) leftButtonsInset = MaterialEdgeInsetToValue(leftButtonsInsetPreset)
} }
} }
/** /**
:name: leftButtonsInset :name: leftButtonsInset
*/ */
public var leftButtonsInset: UIEdgeInsets = MaterialEdgeInsetPresetToValue(.None) { public var leftButtonsInset: UIEdgeInsets = MaterialEdgeInsetToValue(.None) {
didSet { didSet {
reloadView() reloadView()
} }
...@@ -271,16 +271,16 @@ public class ImageCardView : MaterialPulseView { ...@@ -271,16 +271,16 @@ public class ImageCardView : MaterialPulseView {
/** /**
:name: rightButtonsInsets :name: rightButtonsInsets
*/ */
public var rightButtonsInsetPreset: MaterialEdgeInsetPreset = .None { public var rightButtonsInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
rightButtonsInset = MaterialEdgeInsetPresetToValue(rightButtonsInsetPreset) rightButtonsInset = MaterialEdgeInsetToValue(rightButtonsInsetPreset)
} }
} }
/** /**
:name: rightButtonsInset :name: rightButtonsInset
*/ */
public var rightButtonsInset: UIEdgeInsets = MaterialEdgeInsetPresetToValue(.None) { public var rightButtonsInset: UIEdgeInsets = MaterialEdgeInsetToValue(.None) {
didSet { didSet {
reloadView() reloadView()
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.32.2</string> <string>1.32.3</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -188,10 +188,10 @@ public class MaterialButton : UIButton { ...@@ -188,10 +188,10 @@ public class MaterialButton : UIButton {
property has a value of .Circle when the cornerRadius is set, it will property has a value of .Circle when the cornerRadius is set, it will
become .None, as it no longer maintains its circle shape. become .None, as it no longer maintains its circle shape.
*/ */
public var cornerRadius: MaterialRadius { public var cornerRadiusPreset: MaterialRadius {
didSet { didSet {
if let v: MaterialRadius = cornerRadius { if let v: MaterialRadius = cornerRadiusPreset {
layer.cornerRadius = MaterialRadiusToValue(v) cornerRadius = MaterialRadiusToValue(v)
if .Circle == shape { if .Circle == shape {
shape = .None shape = .None
} }
...@@ -199,6 +199,13 @@ public class MaterialButton : UIButton { ...@@ -199,6 +199,13 @@ public class MaterialButton : UIButton {
} }
} }
/// A property that accesses the layer.cornerRadius.
public var cornerRadius: CGFloat = 0 {
didSet {
layer.cornerRadius = cornerRadius
}
}
/** /**
A property that manages the overall shape for the object. If either the A property that manages the overall shape for the object. If either the
width or height property is set, the other will be automatically adjusted width or height property is set, the other will be automatically adjusted
...@@ -216,10 +223,8 @@ public class MaterialButton : UIButton { ...@@ -216,10 +223,8 @@ public class MaterialButton : UIButton {
} }
} }
/** /// A property that accesses the layer.borderWith.
A property that accesses the layer.borderWith. public var borderWidth: CGFloat {
*/
public var borderWidth: CGFloat = 0 {
didSet { didSet {
layer.borderWidth = borderWidth layer.borderWidth = borderWidth
} }
...@@ -255,9 +260,9 @@ public class MaterialButton : UIButton { ...@@ -255,9 +260,9 @@ public class MaterialButton : UIButton {
/** /**
:name: contentInsets :name: contentInsets
*/ */
public var contentInsetPreset: MaterialEdgeInsetPreset { public var contentInsetPreset: MaterialEdgeInset {
didSet { didSet {
let value: UIEdgeInsets = MaterialEdgeInsetPresetToValue(contentInsetPreset) let value: UIEdgeInsets = MaterialEdgeInsetToValue(contentInsetPreset)
contentEdgeInsets = UIEdgeInsetsMake(value.top, value.left, value.bottom, value.right) contentEdgeInsets = UIEdgeInsetsMake(value.top, value.left, value.bottom, value.right)
} }
} }
...@@ -268,8 +273,9 @@ public class MaterialButton : UIButton { ...@@ -268,8 +273,9 @@ public class MaterialButton : UIButton {
*/ */
public required init?(coder aDecoder: NSCoder) { public required init?(coder aDecoder: NSCoder) {
depth = .None depth = .None
cornerRadiusPreset = .None
shape = .None shape = .None
cornerRadius = .None borderWidth = 0
contentInsetPreset = .None contentInsetPreset = .None
super.init(coder: aDecoder) super.init(coder: aDecoder)
prepareView() prepareView()
...@@ -283,8 +289,9 @@ public class MaterialButton : UIButton { ...@@ -283,8 +289,9 @@ public class MaterialButton : UIButton {
*/ */
public override init(frame: CGRect) { public override init(frame: CGRect) {
depth = .None depth = .None
cornerRadiusPreset = .None
shape = .None shape = .None
cornerRadius = .None borderWidth = 0
contentInsetPreset = .None contentInsetPreset = .None
super.init(frame: frame) super.init(frame: frame)
prepareView() prepareView()
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
import UIKit import UIKit
public enum MaterialEdgeInsetPreset { public enum MaterialEdgeInset {
case None case None
// square // square
...@@ -68,9 +68,9 @@ public enum MaterialEdgeInsetPreset { ...@@ -68,9 +68,9 @@ public enum MaterialEdgeInsetPreset {
} }
/** /**
:name: MaterialEdgeInsetPresetToValue :name: MaterialEdgeInsetToValue
*/ */
public func MaterialEdgeInsetPresetToValue(inset: MaterialEdgeInsetPreset) -> UIEdgeInsets { public func MaterialEdgeInsetToValue(inset: MaterialEdgeInset) -> UIEdgeInsets {
switch inset { switch inset {
case .None: case .None:
return UIEdgeInsetsZero return UIEdgeInsetsZero
......
/*
* Copyright (C) 2015 - 2016, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.io>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of Material nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import UIKit
public enum MaterialSwitchStyle {
case Light
case Dark
}
public enum MaterialSwitchState {
case On
case Off
}
public enum MaterialSwitchSize {
case Small
case Normal
case Large
}
public protocol MaterialSwitchDelegate {
func materialSwitchStateChanged(control: MaterialSwitch, state: MaterialSwitchState)
}
public class MaterialSwitch: UIControl {
/// Track thickness.
private var trackThickness: CGFloat = 0
/// Button diameter.
private var buttonDiameter: CGFloat = 0
/// Position when in the .On state.
private var onPosition: CGFloat = 0
/// Position when in the .Off state.
private var offPosition: CGFloat = 0
/// The bounce offset when animating.
private var bounceOffset: CGFloat = 3
public override var enabled: Bool {
didSet {
}
}
/// A property that accesses the layer.frame.origin.x property.
public var x: CGFloat {
get {
return layer.frame.origin.x
}
set(value) {
layer.frame.origin.x = value
}
}
/// A property that accesses the layer.frame.origin.y property.
public var y: CGFloat {
get {
return layer.frame.origin.y
}
set(value) {
layer.frame.origin.y = value
}
}
/// A property that accesses the layer.frame.origin.width property.
public var width: CGFloat {
get {
return layer.frame.size.width
}
set(value) {
layer.frame.size.width = value
}
}
/// A property that accesses the layer.frame.origin.height property.
public var height: CGFloat {
get {
return layer.frame.size.height
}
set(value) {
layer.frame.size.height = value
}
}
/// An Optional delegation method.
public var delegate: MaterialSwitchDelegate?
/// Indicates if the animation should bounce.
public var bounceable: Bool = true {
didSet {
bounceOffset = bounceable ? 3 : 0
}
}
/// Button on color.
public var buttonOnColor: UIColor = MaterialColor.clear
/// Button off color.
public var buttonOffColor: UIColor = MaterialColor.clear
/// Track on color.
public var trackOnColor: UIColor = MaterialColor.clear
/// Track off color.
public var trackOffColor: UIColor = MaterialColor.clear
/// Button on disabled color.
public var buttonOnDisabledColor: UIColor = MaterialColor.clear
/// Track on disabled color.
public var trackOnDisabledColor: UIColor = MaterialColor.clear
/// Button off disabled color.
public var buttonOffDisabledColor: UIColor = MaterialColor.clear
/// Track off disabled color.
public var trackOffDisabledColor: UIColor = MaterialColor.clear
/// Track view reference.
public private(set) var track: MaterialView {
didSet {
prepareTrack()
}
}
/// Button view reference.
public private(set) var button: FabButton {
didSet {
prepareButton()
}
}
/// MaterialSwitch state.
public var switchState: MaterialSwitchState = .Off {
didSet {
setSwitchState(switchState, animated: false)
}
}
/// MaterialSwitch style.
public var switchStyle: MaterialSwitchStyle = .Light {
didSet {
switch switchStyle {
case .Light:
buttonOnColor = MaterialColor.blue.lighten3
buttonOffColor = MaterialColor.grey.lighten3
trackOnColor = MaterialColor.blue.lighten3
trackOffColor = MaterialColor.grey.lighten1
buttonOnDisabledColor = MaterialColor.blue.darken1
trackOnDisabledColor = MaterialColor.grey.darken4
buttonOffDisabledColor = MaterialColor.blue.darken1
trackOffDisabledColor = MaterialColor.grey.darken4
case .Dark:
buttonOnColor = MaterialColor.blueGrey.base
buttonOffColor = MaterialColor.grey.base
trackOnColor = MaterialColor.blueGrey.darken1
trackOffColor = MaterialColor.grey.darken3
buttonOnDisabledColor = MaterialColor.blueGrey.darken1
trackOnDisabledColor = MaterialColor.grey.darken4
buttonOffDisabledColor = MaterialColor.blueGrey.darken1
trackOffDisabledColor = MaterialColor.grey.darken4
}
}
}
/// MaterialSwitch size.
public var switchSize: MaterialSwitchSize = .Normal {
didSet {
switch switchSize {
case .Small:
frame = CGRectMake(0, 0, 30, 25)
trackThickness = 13
buttonDiameter = 18
case .Normal:
frame = CGRectMake(0, 0, 40, 30)
trackThickness = 17
buttonDiameter = 24
case .Large:
frame = CGRectMake(0, 0, 50, 40)
trackThickness = 23
buttonDiameter = 31
}
track.frame = CGRectMake(0, (height - trackThickness) / 2, width, trackThickness)
track.cornerRadius = min(track.height, track.width) / 2
button.frame = CGRectMake(0, (height - buttonDiameter) / 2, buttonDiameter, buttonDiameter)
onPosition = width - buttonDiameter
offPosition = 0
}
}
/**
An initializer that initializes the object with a NSCoder object.
- Parameter aDecoder: A NSCoder instance.
*/
public required init?(coder aDecoder: NSCoder) {
track = MaterialView(frame: CGRectZero)
button = FabButton(frame: CGRectZero)
super.init(coder: aDecoder)
prepareTrack()
prepareButton()
prepareSwitchSize(.Normal)
prepareSwitchStyle(.Light)
prepareSwitchState(.Off)
}
/**
An initializer that sets the state, style, and size of the MaterialSwitch instance.
- Parameter state: A MaterialSwitchState value.
- Parameter style: A MaterialSwitchStyle value.
- Parameter size: A MaterialSwitchSize value.
*/
public init(state: MaterialSwitchState = .On, style: MaterialSwitchStyle = .Light, size: MaterialSwitchSize = .Normal) {
track = MaterialView(frame: CGRectZero)
button = FabButton(frame: CGRectZero)
super.init(frame: CGRectZero)
prepareTrack()
prepareButton()
prepareSwitchSize(size)
prepareSwitchStyle(style)
prepareSwitchState(state)
}
public override func willMoveToSuperview(newSuperview: UIView?) {
super.willMoveToSuperview(newSuperview)
styleForState(switchState)
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
when subclassing.
*/
public func prepareView() {
addGestureRecognizer(UITapGestureRecognizer(target: self, action: "handleTapped"))
}
/**
Toggle the MaterialSwitch state, if On will be Off, and if Off will be On.
- Parameter completion: An Optional completion block.
*/
public func toggle(completion: ((control: MaterialSwitch) -> Void)? = nil) {
setSwitchState(.On == switchState ? .Off : .On, animated: true, completion: completion)
}
/**
Set the switchState property with an option to animate.
- Parameter state: The MaterialSwitchState to set.
- Parameter animated: A Boolean indicating to set the animation or not.
- Parameter completion: An Optional completion block.
*/
public func setSwitchState(state: MaterialSwitchState, animated: Bool = true, completion: ((control: MaterialSwitch) -> Void)? = nil) {
func t() {
button.x = .On == state ? onPosition + bounceOffset : offPosition - bounceOffset
styleForState(state)
}
func c() {
if switchState != state {
sendActionsForControlEvents(.ValueChanged)
switchState = state
delegate?.materialSwitchStateChanged(self, state: state)
}
}
if animated {
userInteractionEnabled = false
UIView.animateWithDuration(0.15,
delay: 0.05,
options: .CurveEaseInOut,
animations: {
t()
}) { [unowned self] _ in
c()
UIView.animateWithDuration(0.15,
animations: { [unowned self] in
self.button.x = .On == state ? self.onPosition : self.offPosition
}) { [unowned self] _ in
self.userInteractionEnabled = true
completion?(control: self)
}
}
} else {
t()
c()
completion?(control: self)
}
}
/// Handles the TouchUpInside event.
internal func handleTouchUpInside() {
toggle()
}
/**
Handle the TouchUpOutside and TouchCancel events.
- Parameter sender: A UIButton.
- Parameter event: A UIEvent.
*/
internal func handleTouchUpOutsideOrCanceled(sender: FabButton, event: UIEvent) {
if let v: UITouch = event.touchesForView(sender)?.first {
let t: CGPoint = v.previousLocationInView(sender)
let p: CGPoint = v.locationInView(sender)
let q: CGFloat = sender.x + p.x - t.x
setSwitchState(q > (width - button.width) / 2 ? .On : .Off, animated: true)
}
}
/**
Handle the TouchDragInside event.
- Parameter sender: A UIButton.
- Parameter event: A UIEvent.
*/
internal func handleTouchDragInside(sender: FabButton, event: UIEvent) {
if let v = event.touchesForView(sender)?.first {
let t: CGPoint = v.previousLocationInView(sender)
let p: CGPoint = v.locationInView(sender)
let q: CGFloat = max(min(sender.x + (p.x - t.x), onPosition), offPosition)
if q != sender.x {
sender.x = q
}
}
}
/**
Handle the TouchDown event.
- Parameter sender: A UIButton.
*/
internal func handleTouchDown(sender: UIButton) {
}
/// Prepares the track.
private func prepareTrack() {
addSubview(track)
}
/// Prepares the button.
private func prepareButton() {
button.pulseColor = nil
button.addTarget(self, action: "handleTouchDown:", forControlEvents: .TouchDown)
button.addTarget(self, action: "handleTouchUpOutsideOrCanceled:event:", forControlEvents: .TouchUpOutside)
button.addTarget(self, action: "handleTouchUpInside", forControlEvents: .TouchUpInside)
button.addTarget(self, action: "handleTouchDragInside:event:", forControlEvents: .TouchDragInside)
button.addTarget(self, action: "handleTouchUpOutsideOrCanceled:event:", forControlEvents: .TouchCancel)
addSubview(button)
}
/**
Prepares the switchState property. This is used mainly to allow
init to set the state value and have an effect.
- Parameter state: The MaterialSwitchState to set.
*/
private func prepareSwitchState(state: MaterialSwitchState) {
switchState = state
}
/**
Prepares the switchStyle property. This is used mainly to allow
init to set the state value and have an effect.
- Parameter style: The MaterialSwitchStyle to set.
*/
private func prepareSwitchStyle(style: MaterialSwitchStyle) {
switchStyle = style
}
/**
Prepares the switchSize property. This is used mainly to allow
init to set the size value and have an effect.
- Parameter size: The MaterialSwitchSize to set.
*/
private func prepareSwitchSize(size: MaterialSwitchSize) {
switchSize = size
}
/**
Updates the style based on the state.
- Parameter state: The MaterialSwitchState to set the style to.
*/
private func styleForState(state: MaterialSwitchState) {
if enabled {
updateColorForEnabledState(state)
} else {
updateColorForDisabledState(state)
}
}
/**
Updates the coloring for the enabled state.
- Parameter state: MaterialSwitchState.
*/
private func updateColorForEnabledState(state: MaterialSwitchState) {
if .On == state {
button.backgroundColor = buttonOnColor
track.backgroundColor = trackOnColor
} else {
button.backgroundColor = buttonOffColor
track.backgroundColor = trackOffColor
}
}
/**
Updates the coloring for the disabled state.
- Parameter state: MaterialSwitchState.
*/
private func updateColorForDisabledState(state: MaterialSwitchState) {
if .On == state {
button.backgroundColor = buttonOnDisabledColor
track.backgroundColor = buttonOnDisabledColor
} else {
button.backgroundColor = buttonOffDisabledColor
track.backgroundColor = buttonOffDisabledColor
}
}
}
...@@ -231,10 +231,10 @@ public class MaterialView : UIView { ...@@ -231,10 +231,10 @@ public class MaterialView : UIView {
property has a value of .Circle when the cornerRadius is set, it will property has a value of .Circle when the cornerRadius is set, it will
become .None, as it no longer maintains its circle shape. become .None, as it no longer maintains its circle shape.
*/ */
public var cornerRadius: MaterialRadius { public var cornerRadiusPreset: MaterialRadius {
didSet { didSet {
if let v: MaterialRadius = cornerRadius { if let v: MaterialRadius = cornerRadiusPreset {
layer.cornerRadius = MaterialRadiusToValue(v) cornerRadius = MaterialRadiusToValue(v)
if .Circle == shape { if .Circle == shape {
shape = .None shape = .None
} }
...@@ -242,6 +242,13 @@ public class MaterialView : UIView { ...@@ -242,6 +242,13 @@ public class MaterialView : UIView {
} }
} }
/// A property that accesses the layer.cornerRadius.
public var cornerRadius: CGFloat = 0 {
didSet {
layer.cornerRadius = cornerRadius
}
}
/** /**
A property that manages the overall shape for the object. If either the A property that manages the overall shape for the object. If either the
width or height property is set, the other will be automatically adjusted width or height property is set, the other will be automatically adjusted
...@@ -259,10 +266,8 @@ public class MaterialView : UIView { ...@@ -259,10 +266,8 @@ public class MaterialView : UIView {
} }
} }
/** /// A property that accesses the layer.borderWith.
A property that accesses the layer.borderWith. public var borderWidth: CGFloat {
*/
public var borderWidth: CGFloat = 0 {
didSet { didSet {
layer.borderWidth = borderWidth layer.borderWidth = borderWidth
} }
...@@ -305,8 +310,9 @@ public class MaterialView : UIView { ...@@ -305,8 +310,9 @@ public class MaterialView : UIView {
contentsScale = UIScreen.mainScreen().scale contentsScale = UIScreen.mainScreen().scale
contentsGravity = .ResizeAspectFill contentsGravity = .ResizeAspectFill
depth = .None depth = .None
cornerRadiusPreset = .None
shape = .None shape = .None
cornerRadius = .None borderWidth = 0
super.init(coder: aDecoder) super.init(coder: aDecoder)
prepareView() prepareView()
} }
...@@ -323,8 +329,9 @@ public class MaterialView : UIView { ...@@ -323,8 +329,9 @@ public class MaterialView : UIView {
contentsScale = UIScreen.mainScreen().scale contentsScale = UIScreen.mainScreen().scale
contentsGravity = .ResizeAspectFill contentsGravity = .ResizeAspectFill
depth = .None depth = .None
cornerRadiusPreset = .None
shape = .None shape = .None
cornerRadius = .None borderWidth = 0
super.init(frame: frame) super.init(frame: frame)
prepareView() prepareView()
} }
......
...@@ -43,16 +43,16 @@ public class NavigationBarView : MaterialView { ...@@ -43,16 +43,16 @@ public class NavigationBarView : MaterialView {
/** /**
:name: contentInsets :name: contentInsets
*/ */
public var contentInsetPreset: MaterialEdgeInsetPreset = .None { public var contentInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
contentInset = MaterialEdgeInsetPresetToValue(contentInsetPreset) contentInset = MaterialEdgeInsetToValue(contentInsetPreset)
} }
} }
/** /**
:name: contentInset :name: contentInset
*/ */
public var contentInset: UIEdgeInsets = MaterialEdgeInsetPresetToValue(.Square2) { public var contentInset: UIEdgeInsets = MaterialEdgeInsetToValue(.Square2) {
didSet { didSet {
reloadView() reloadView()
} }
...@@ -61,9 +61,9 @@ public class NavigationBarView : MaterialView { ...@@ -61,9 +61,9 @@ public class NavigationBarView : MaterialView {
/** /**
:name: titleLabelInsets :name: titleLabelInsets
*/ */
public var titleLabelInsetPreset: MaterialEdgeInsetPreset = .None { public var titleLabelInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
titleLabelInset = MaterialEdgeInsetPresetToValue(titleLabelInsetPreset) titleLabelInset = MaterialEdgeInsetToValue(titleLabelInsetPreset)
} }
} }
...@@ -89,16 +89,16 @@ public class NavigationBarView : MaterialView { ...@@ -89,16 +89,16 @@ public class NavigationBarView : MaterialView {
/** /**
:name: detailLabelInsets :name: detailLabelInsets
*/ */
public var detailLabelInsetPreset: MaterialEdgeInsetPreset = .None { public var detailLabelInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
detailLabelInset = MaterialEdgeInsetPresetToValue(detailLabelInsetPreset) detailLabelInset = MaterialEdgeInsetToValue(detailLabelInsetPreset)
} }
} }
/** /**
:name: detailLabelInset :name: detailLabelInset
*/ */
public var detailLabelInset: UIEdgeInsets = MaterialEdgeInsetPresetToValue(.None) { public var detailLabelInset: UIEdgeInsets = MaterialEdgeInsetToValue(.None) {
didSet { didSet {
reloadView() reloadView()
} }
...@@ -117,9 +117,9 @@ public class NavigationBarView : MaterialView { ...@@ -117,9 +117,9 @@ public class NavigationBarView : MaterialView {
/** /**
:name: leftButtonsInsets :name: leftButtonsInsets
*/ */
public var leftButtonsInsetPreset: MaterialEdgeInsetPreset = .None { public var leftButtonsInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
leftButtonsInset = MaterialEdgeInsetPresetToValue(leftButtonsInsetPreset) leftButtonsInset = MaterialEdgeInsetToValue(leftButtonsInsetPreset)
} }
} }
...@@ -149,9 +149,9 @@ public class NavigationBarView : MaterialView { ...@@ -149,9 +149,9 @@ public class NavigationBarView : MaterialView {
/** /**
:name: rightButtonsInsets :name: rightButtonsInsets
*/ */
public var rightButtonsInsetPreset: MaterialEdgeInsetPreset = .None { public var rightButtonsInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
rightButtonsInset = MaterialEdgeInsetPresetToValue(rightButtonsInsetPreset) rightButtonsInset = MaterialEdgeInsetToValue(rightButtonsInsetPreset)
} }
} }
......
...@@ -43,7 +43,7 @@ public class RaisedButton : MaterialButton { ...@@ -43,7 +43,7 @@ public class RaisedButton : MaterialButton {
setTitleColor(MaterialColor.white, forState: .Normal) setTitleColor(MaterialColor.white, forState: .Normal)
backgroundColor = MaterialColor.blue.accent3 backgroundColor = MaterialColor.blue.accent3
depth = .Depth1 depth = .Depth1
cornerRadius = .Radius1 cornerRadiusPreset = .Radius1
contentInsetPreset = .WideRectangle3 contentInsetPreset = .WideRectangle3
} }
} }
\ No newline at end of file
...@@ -167,10 +167,10 @@ public class TextField : UITextField { ...@@ -167,10 +167,10 @@ public class TextField : UITextField {
property has a value of .Circle when the cornerRadius is set, it will property has a value of .Circle when the cornerRadius is set, it will
become .None, as it no longer maintains its circle shape. become .None, as it no longer maintains its circle shape.
*/ */
public var cornerRadius: MaterialRadius { public var cornerRadiusPreset: MaterialRadius {
didSet { didSet {
if let v: MaterialRadius = cornerRadius { if let v: MaterialRadius = cornerRadiusPreset {
layer.cornerRadius = MaterialRadiusToValue(v) cornerRadius = MaterialRadiusToValue(v)
if .Circle == shape { if .Circle == shape {
shape = .None shape = .None
} }
...@@ -178,6 +178,13 @@ public class TextField : UITextField { ...@@ -178,6 +178,13 @@ public class TextField : UITextField {
} }
} }
/// A property that accesses the layer.cornerRadius.
public var cornerRadius: CGFloat = 0 {
didSet {
layer.cornerRadius = cornerRadius
}
}
/** /**
A property that manages the overall shape for the object. If either the A property that manages the overall shape for the object. If either the
width or height property is set, the other will be automatically adjusted width or height property is set, the other will be automatically adjusted
...@@ -195,10 +202,8 @@ public class TextField : UITextField { ...@@ -195,10 +202,8 @@ public class TextField : UITextField {
} }
} }
/** /// A property that accesses the layer.borderWith.
A property that accesses the layer.borderWith. public var borderWidth: CGFloat {
*/
public var borderWidth: CGFloat = 0 {
didSet { didSet {
layer.borderWidth = borderWidth layer.borderWidth = borderWidth
} }
...@@ -335,8 +340,9 @@ public class TextField : UITextField { ...@@ -335,8 +340,9 @@ public class TextField : UITextField {
*/ */
public required init?(coder aDecoder: NSCoder) { public required init?(coder aDecoder: NSCoder) {
depth = .None depth = .None
cornerRadiusPreset = .None
shape = .None shape = .None
cornerRadius = .None borderWidth = 0
super.init(coder: aDecoder) super.init(coder: aDecoder)
prepareView() prepareView()
} }
...@@ -349,8 +355,9 @@ public class TextField : UITextField { ...@@ -349,8 +355,9 @@ public class TextField : UITextField {
*/ */
public override init(frame: CGRect) { public override init(frame: CGRect) {
depth = .None depth = .None
cornerRadiusPreset = .None
shape = .None shape = .None
cornerRadius = .None borderWidth = 0
super.init(frame: frame) super.init(frame: frame)
prepareView() prepareView()
} }
......
...@@ -169,10 +169,10 @@ public class TextView: UITextView { ...@@ -169,10 +169,10 @@ public class TextView: UITextView {
property has a value of .Circle when the cornerRadius is set, it will property has a value of .Circle when the cornerRadius is set, it will
become .None, as it no longer maintains its circle shape. become .None, as it no longer maintains its circle shape.
*/ */
public var cornerRadius: MaterialRadius { public var cornerRadiusPreset: MaterialRadius {
didSet { didSet {
if let v: MaterialRadius = cornerRadius { if let v: MaterialRadius = cornerRadiusPreset {
layer.cornerRadius = MaterialRadiusToValue(v) cornerRadius = MaterialRadiusToValue(v)
if .Circle == shape { if .Circle == shape {
shape = .None shape = .None
} }
...@@ -180,6 +180,13 @@ public class TextView: UITextView { ...@@ -180,6 +180,13 @@ public class TextView: UITextView {
} }
} }
/// A property that accesses the layer.cornerRadius.
public var cornerRadius: CGFloat = 0 {
didSet {
layer.cornerRadius = cornerRadius
}
}
/** /**
A property that manages the overall shape for the object. If either the A property that manages the overall shape for the object. If either the
width or height property is set, the other will be automatically adjusted width or height property is set, the other will be automatically adjusted
...@@ -197,10 +204,8 @@ public class TextView: UITextView { ...@@ -197,10 +204,8 @@ public class TextView: UITextView {
} }
} }
/** /// A property that accesses the layer.borderWith.
A property that accesses the layer.borderWith. public var borderWidth: CGFloat {
*/
public var borderWidth: CGFloat = 0 {
didSet { didSet {
layer.borderWidth = borderWidth layer.borderWidth = borderWidth
} }
...@@ -285,9 +290,9 @@ public class TextView: UITextView { ...@@ -285,9 +290,9 @@ public class TextView: UITextView {
Text container UIEdgeInset preset property. This updates the Text container UIEdgeInset preset property. This updates the
textContainerInset property with a preset value. textContainerInset property with a preset value.
*/ */
public var textContainerInsetPreset: MaterialEdgeInsetPreset = .None { public var textContainerInsetPreset: MaterialEdgeInset = .None {
didSet { didSet {
textContainerInset = MaterialEdgeInsetPresetToValue(textContainerInsetPreset) textContainerInset = MaterialEdgeInsetToValue(textContainerInsetPreset)
} }
} }
...@@ -304,8 +309,9 @@ public class TextView: UITextView { ...@@ -304,8 +309,9 @@ public class TextView: UITextView {
*/ */
public required init?(coder aDecoder: NSCoder) { public required init?(coder aDecoder: NSCoder) {
depth = .None depth = .None
cornerRadiusPreset = .None
shape = .None shape = .None
cornerRadius = .None borderWidth = 0
super.init(coder: aDecoder) super.init(coder: aDecoder)
prepareView() prepareView()
} }
...@@ -319,8 +325,9 @@ public class TextView: UITextView { ...@@ -319,8 +325,9 @@ public class TextView: UITextView {
*/ */
public override init(frame: CGRect, textContainer: NSTextContainer?) { public override init(frame: CGRect, textContainer: NSTextContainer?) {
depth = .None depth = .None
cornerRadiusPreset = .None
shape = .None shape = .None
cornerRadius = .None borderWidth = 0
super.init(frame: frame, textContainer: textContainer) super.init(frame: frame, textContainer: textContainer)
prepareView() prepareView()
} }
...@@ -461,7 +468,7 @@ public class TextView: UITextView { ...@@ -461,7 +468,7 @@ public class TextView: UITextView {
when subclassing. when subclassing.
*/ */
private func prepareView() { private func prepareView() {
textContainerInset = MaterialEdgeInsetPresetToValue(.None) textContainerInset = MaterialEdgeInsetToValue(.None)
backgroundColor = MaterialColor.white backgroundColor = MaterialColor.white
masksToBounds = false masksToBounds = false
removeNotificationHandlers() removeNotificationHandlers()
......
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