Commit 38ba6de9 by Daniel Dahan

updated README

parent 1781bc34
......@@ -62,9 +62,6 @@
location = "group:Programmatic/TabBar/TabBar.xcodeproj">
</FileRef>
<FileRef
location = "group:Programmatic/NavigationBar/NavigationBar.xcodeproj">
</FileRef>
<FileRef
location = "group:Programmatic/Toolbar/Toolbar.xcodeproj">
</FileRef>
<FileRef
......
......@@ -43,9 +43,9 @@ class ViewController: UIViewController {
// prepareHorizontalGridViewExample()
// prepareVerticalGridViewExample()
// prepareGridDirectionNoneExample()
prepareSmallCardViewExample()
// prepareSmallCardViewExample()
// prepareMediumCardViewExample()
// prepareLargeCardViewExample()
prepareLargeCardViewExample()
}
......
......@@ -90,6 +90,7 @@ class ViewController: UIViewController {
private func prepareImageCardViewWithoutDetailLabelAndDividerExample() {
let imageCardView: ImageCardView = ImageCardView()
imageCardView.pulseColor = MaterialColor.purple.base
imageCardView.divider = false
imageCardView.maxImageHeight = 130
......
......@@ -43,6 +43,7 @@ class ViewController: UIViewController {
prepareFlatButtonExample()
prepareRaisedButtonExample()
prepareFabButtonExample()
prepareIconButtonExample()
}
override func viewDidAppear(animated: Bool) {
......@@ -84,7 +85,19 @@ class ViewController: UIViewController {
private func prepareFabButtonExample() {
let w: CGFloat = 64
let img: UIImage? = MaterialIcon.cm.pen
let button: FabButton = FabButton(frame: CGRectMake((view.bounds.width - w) / 2, 300, w, 64))
let button: FabButton = FabButton(frame: CGRectMake((view.bounds.width - w) / 2, 300, w, w))
button.setImage(img, forState: .Normal)
button.setImage(img, forState: .Highlighted)
// Add button to UIViewController.
view.addSubview(button)
}
/// Prepares the IconButton.
private func prepareIconButtonExample() {
let w: CGFloat = 64
let img: UIImage? = MaterialIcon.cm.search
let button: IconButton = IconButton(frame: CGRectMake((view.bounds.width - w) / 2, 400, w, w))
button.setImage(img, forState: .Normal)
button.setImage(img, forState: .Highlighted)
......
......@@ -7,6 +7,8 @@
objects = {
/* Begin PBXBuildFile section */
966ECEBE1CEBBC3A00BB0BDF /* Material.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 966ECEBD1CEBBC3A00BB0BDF /* Material.framework */; };
966ECEBF1CEBBC3A00BB0BDF /* Material.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 966ECEBD1CEBBC3A00BB0BDF /* Material.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
96A71EA01C6FC12000C0C4AE /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71E9F1C6FC12000C0C4AE /* AppDelegate.swift */; };
96A71EA21C6FC12000C0C4AE /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71EA11C6FC12000C0C4AE /* ViewController.swift */; };
96A71EA71C6FC12000C0C4AE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96A71EA61C6FC12000C0C4AE /* Assets.xcassets */; };
......@@ -20,6 +22,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
966ECEBF1CEBBC3A00BB0BDF /* Material.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
......@@ -27,6 +30,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
966ECEBD1CEBBC3A00BB0BDF /* Material.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = Material.framework; path = "/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-bshwisidfobstlbomegqyybbrygh/Build/Products/Debug-iphonesimulator/Material.framework"; sourceTree = "<absolute>"; };
96A71E9C1C6FC12000C0C4AE /* MenuView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MenuView.app; sourceTree = BUILT_PRODUCTS_DIR; };
96A71E9F1C6FC12000C0C4AE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
96A71EA11C6FC12000C0C4AE /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
......@@ -40,6 +44,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
966ECEBE1CEBBC3A00BB0BDF /* Material.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -49,6 +54,7 @@
96A71E931C6FC12000C0C4AE = {
isa = PBXGroup;
children = (
966ECEBD1CEBBC3A00BB0BDF /* Material.framework */,
96A71E9E1C6FC12000C0C4AE /* MenuView */,
96A71E9D1C6FC12000C0C4AE /* Products */,
);
......
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:NavigationBar.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 {
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" : "MaterialColorsAppIcon_Icon-29@2x-1.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "MaterialColorsAppIcon_Icon-29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "MaterialColorsAppIcon_Icon-40@2x-1.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "MaterialColorsAppIcon_Icon-40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "MaterialColorsAppIcon_Icon-60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "MaterialColorsAppIcon_Icon-60@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "MaterialColorsAppIcon_Icon-29.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "MaterialColorsAppIcon_Icon-29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "MaterialColorsAppIcon_Icon-40.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "MaterialColorsAppIcon_Icon-40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "MaterialColorsAppIcon_Icon-76.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "MaterialColorsAppIcon_Icon-76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "MaterialColorsAppIcon_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>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</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.
*/
import UIKit
import Material
class ViewController: UIViewController {
/// NavigationBar item.
private var item: UINavigationItem!
/// NavigationBar menu button.
private var menuButton: FlatButton!
/// NavigationBar switch control.
private var switchControl: MaterialSwitch!
/// NavigationBar search button.
private var searchButton: FlatButton!
/// Reference for NavigationBar.
private var navigationBar: NavigationBar!
override func viewDidLoad() {
super.viewDidLoad()
prepareView()
prepareItem()
prepareMenuButton()
prepareSwitchControl()
prepareSearchButton()
prepareNavigationBar()
}
override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
item.contentView?.frame.origin.y = 20
}
/// General preparation statements.
private func prepareView() {
view.backgroundColor = MaterialColor.white
}
/// Prepares the menuButton.
private func prepareMenuButton() {
let image: UIImage? = MaterialIcon.cm.menu
menuButton = FlatButton()
menuButton.pulseColor = MaterialColor.white
menuButton.setImage(image, forState: .Normal)
menuButton.setImage(image, forState: .Highlighted)
}
/// Prepares the switchControl.
private func prepareSwitchControl() {
switchControl = MaterialSwitch(state: .Off, style: .LightContent, size: .Small)
}
/// Prepares the searchButton.
private func prepareSearchButton() {
let image: UIImage? = MaterialIcon.cm.search
searchButton = FlatButton()
searchButton.pulseColor = MaterialColor.white
searchButton.setImage(image, forState: .Normal)
searchButton.setImage(image, forState: .Highlighted)
}
/// Prepare navigationBar.
private func prepareNavigationBar() {
navigationBar = NavigationBar()
navigationBar.statusBarStyle = .LightContent
navigationBar.tintColor = MaterialColor.white
navigationBar.backgroundColor = MaterialColor.blue.base
navigationBar.barStyle = .Default
view.addSubview(navigationBar)
MaterialLayout.alignFromTop(view, child: navigationBar)
MaterialLayout.alignToParentHorizontally(view, child: navigationBar)
MaterialLayout.height(view, child: navigationBar, height: 64)
}
/// Prepares the item.
private func prepareItem() {
item.titleLabel.text = "Recipes"
item.titleLabel.textColor = MaterialColor.white
item.detailLabel.text = "8 Items"
item.detailLabel.textColor = MaterialColor.white
item.leftControls = [menuButton]
item.rightControls = [switchControl, searchButton]
navigationBar.pushNavigationItem(item, animated: true)
}
}
......@@ -103,6 +103,7 @@ class ViewController: UIViewController {
let closeButton: FlatButton = FlatButton()
closeButton.setTitle("Close", forState: .Normal)
closeButton.setTitleColor(MaterialColor.blue.accent3, forState: .Normal)
let image: UIImage? = MaterialIcon.cm.settings
let settingButton: IconButton = IconButton()
......
......@@ -4,7 +4,7 @@
An animation and graphics framework for Material Design in Swift.
![MaterialApp](http://www.cosmicmind.io/MK/MaterialApp.gif)
![App](http://www.cosmicmind.io/gifs/App.gif)
## Features
......@@ -55,122 +55,30 @@ Material is a growing project and will encounter changes throughout its developm
## Sticker Sheet
To help template your project, checkout our latest addition, Material Sticker Sheet.
To help template your project, checkout Material Sticker Sheet.
![MaterialStickerSheet](http://www.cosmicmind.io/MK/material_iso_1.png)
[Get the Sticker Sheet](http://www.materialup.com/posts/material-design-sticker-sheets)
[StickerSheet](http://www.materialup.com/posts/material-design-sticker-sheets)
## Quick Access
## Material Colors
#### Colors
Try the Material Colors app to see the wonderful colors available in Material, or use the online version at [MaterialColors.io](http://materialcolors.io)
* [MaterialColor](#materialcolor)
![MaterialColors](http://www.cosmicmind.io/gifs/MaterialColors.gif)
#### Icons
[Get Material Colors on the AppStore](https://itunes.apple.com/app/x/id1111994400?mt=8)
* [MaterialIcon](#materialicon)
## A Quick Tour
#### Base Layers & Views
* [MaterialLayer](#materiallayer)
* [MaterialView](#materialview)
* [MaterialPulseView](#materialpulseview)
#### Text
* [TextField](#textfield)
* ErrorTextField
* [TextView](#textview)
#### Buttons
* MaterialButton
* [FlatButton](#flatbutton)
* [RaisedButton](#raisedbutton)
* [FabButton](#fabbutton)
#### Control
* [MaterialSwitch](#materialswitch)
#### Collection Management
* [Menu](#menu)
#### Layout
* [Grid](#grid)
* MaterialLayout
#### Collections
* [MaterialTableViewCell](#materialtableviewcell)
* MaterialCollectionViewCell
#### Cards
* [CardView](#cardview)
* [ImageCardView](#imagecardview)
#### Navigation Controls
* [MenuView](#menuview)
* [MenuViewController](#menuviewcontroller)
* NavigationBar
* NavigationController
* [Toolbar](#toolbar)
* [ToolbarController](#toolbarcontroller)
* [SearchBar](#searchbar)
* [SearchBarController](#searchbarcontroller)
* BottomTabBar
* BottomNavigationController
* [SideNavigationController](#sidenavigationcontroller)
#### Photo / Video Camera
* [CaptureView](#captureview)
#### Filters
* [Blur](#filterblur)
## Explore
<a name="materialcolor"></a>
#### MaterialColor
MaterialColor is a complete Material Design color library available within Material. To help with color choices, visit [MaterialColor.io](http://www.materialcolor.io).
![MaterialMaterialColorPalette](http://www.cosmicmind.io/MK/MaterialMaterialColorPalette.png)
Take a look at some components in Material.
<a name="materialicon"></a>
#### MaterialIcon
#### Material Icons
MaterialIcon is a library of Google and CosmicMind icons that are available for use within your iOS applications. To help with icon choices, visit [MaterialIcon.io](http://www.materialicon.io).
![MaterialMaterialIcon](http://www.cosmicmind.io/MK/MaterialMaterialIcon.png)
<a name="materiallayer"></a>
#### MaterialLayer
MaterialLayer is a lightweight CAShapeLayer used throughout Material. It is designed to easily take shape, depth, and animations.
![MaterialMaterialLayer](http://www.cosmicmind.io/MK/MaterialMaterialLayer.gif)
<a name="materialview"></a>
#### MaterialView
MaterialView is the base UIView class used throughout Material. Like MaterialLayer, it is designed to easily take shape, depth, and animations. The major difference is that MaterialView has all the added features of the UIView class.
![MaterialMaterialView](http://www.cosmicmind.io/MK/MaterialMaterialView.gif)
<a name="materialpulseview"></a>
#### MaterialPulseView
MaterialPulseView is at the heart of all pulse animations. Any view that subclasses MaterialPulseView instantly inherits the pulse animation with full customizability.
![MaterialMaterialPulseView](http://www.cosmicmind.io/MK/MaterialMaterialPulseView.gif)
![MaterialIcon](http://www.cosmicmind.io/MK/MaterialMaterialIcon.png)
<a name="textfield"></a>
#### TextField
......
......@@ -31,9 +31,6 @@
import UIKit
public class MaterialPulseView : MaterialView {
/// To use a single pulse and have it focused when held.
@IBInspectable public var pulseFocus: Bool = false
/// An Array of pulse layers.
public private(set) lazy var pulseLayers: Array<CAShapeLayer> = Array<CAShapeLayer>()
......
......@@ -125,6 +125,7 @@ public class SearchBar : BarView {
/// Prepares the textField.
private func prepareTextField() {
textField = UITextField()
textField.contentScaleFactor = MaterialDevice.scale
textField.font = RobotoFont.regularWithSize(17)
textField.backgroundColor = MaterialColor.clear
textField.clearButtonMode = .WhileEditing
......
......@@ -72,6 +72,7 @@ public class Toolbar : BarView {
/// Prepares the titleLabel.
private func prepareTitleLabel() {
titleLabel = UILabel()
titleLabel.contentScaleFactor = MaterialDevice.scale
titleLabel.font = RobotoFont.mediumWithSize(17)
titleLabel.textAlignment = .Left
contentView.addSubview(titleLabel)
......@@ -80,6 +81,7 @@ public class Toolbar : BarView {
/// Prepares the detailLabel.
private func prepareDetailLabel() {
detailLabel = UILabel()
detailLabel.contentScaleFactor = MaterialDevice.scale
detailLabel.font = RobotoFont.regularWithSize(12)
detailLabel.textAlignment = .Left
contentView.addSubview(detailLabel)
......
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