Commit 2709465c by Ramon Vicente

Merge branch 'master' of https://github.com/CosmicMind/Material

# Conflicts:
#	Sources/Assets.xcassets/cm_add_white.imageset/Contents.json
#	Sources/Assets.xcassets/cm_audio_white.imageset/cm_audio_white.png
#	Sources/Assets.xcassets/cm_audio_white.imageset/cm_audio_white_2x.png
#	Sources/Assets.xcassets/cm_audio_white.imageset/cm_audio_white_3x.png
#	Sources/Assets.xcassets/cm_pen_white.imageset/cm_pen_white.png
#	Sources/Assets.xcassets/cm_pen_white.imageset/cm_pen_white_2x.png
#	Sources/Assets.xcassets/cm_pen_white.imageset/cm_pen_white_3x.png
#	Sources/Assets.xcassets/cm_share_white.imageset/Contents.json
#	Sources/Assets.xcassets/cm_star_white.imageset/Contents.json
#	Sources/Assets.xcassets/cm_video_white.imageset/cm_video_white.png
#	Sources/Assets.xcassets/cm_video_white.imageset/cm_video_white_2x.png
#	Sources/Assets.xcassets/cm_video_white.imageset/cm_video_white_3x.png
#	Sources/Assets.xcassets/ic_photo_camera_white.imageset/Contents.json
#	Sources/Assets.xcassets/ic_photo_library_white.imageset/Contents.json
#	Sources/Assets.xcassets/ic_settings_white.imageset/Contents.json
#	Sources/iOS/MaterialIcon.swift
parents f0540f54 356e4fab
......@@ -50,7 +50,10 @@
location = "group:Programmatic/MenuViewController/MenuViewController.xcodeproj">
</FileRef>
<FileRef
location = "group:/Users/danieldahan/Dropbox/CosmicMind/Technology/Repositories/Material/Examples/Programmatic/NavigationBar/NavigationBar.xcodeproj">
location = "group:Programmatic/TabBar/TabBar.xcodeproj">
</FileRef>
<FileRef
location = "group:Programmatic/NavigationBar/NavigationBar.xcodeproj">
</FileRef>
<FileRef
location = "group:Programmatic/Toolbar/Toolbar.xcodeproj">
......
......@@ -51,7 +51,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
let sideNavigationController: SideNavigationController = SideNavigationController(rootViewController: bottomNavigationController, leftViewController: AppLeftViewController())
// Override point for customization after application launch.
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = sideNavigationController
window!.makeKeyAndVisible()
......
......@@ -110,7 +110,7 @@ class AppMenuViewController: MenuViewController {
/// Prepares the add button.
private func prepareMenuView() {
var image: UIImage? = MaterialIcon.add
var image: UIImage? = MaterialIcon.cm.add
let menuButton: FabButton = FabButton()
menuButton.tintColor = MaterialColor.white
menuButton.setImage(image, forState: .Normal)
......@@ -118,7 +118,7 @@ class AppMenuViewController: MenuViewController {
menuButton.addTarget(self, action: #selector(handleMenu), forControlEvents: .TouchUpInside)
menuView.addSubview(menuButton)
image = MaterialIcon.pen
image = MaterialIcon.cm.pen
let blueButton: FabButton = FabButton()
blueButton.tintColor = MaterialColor.white
blueButton.backgroundColor = MaterialColor.blue.base
......@@ -127,7 +127,7 @@ class AppMenuViewController: MenuViewController {
menuView.addSubview(blueButton)
blueButton.addTarget(self, action: #selector(handleBlueButton), forControlEvents: .TouchUpInside)
image = MaterialIcon.photoCamera
image = MaterialIcon.cm.photoCamera
let greenButton: FabButton = FabButton()
greenButton.tintColor = MaterialColor.white
greenButton.backgroundColor = MaterialColor.green.base
......@@ -136,7 +136,7 @@ class AppMenuViewController: MenuViewController {
menuView.addSubview(greenButton)
greenButton.addTarget(self, action: #selector(handleGreenButton), forControlEvents: .TouchUpInside)
image = MaterialIcon.star
image = MaterialIcon.cm.star
let yellowButton: FabButton = FabButton()
yellowButton.tintColor = MaterialColor.white
yellowButton.backgroundColor = MaterialColor.yellow.base
......@@ -157,7 +157,7 @@ class AppMenuViewController: MenuViewController {
/// Prepare tabBarItem.
private func prepareTabBarItem() {
tabBarItem.image = MaterialIcon.photoLibrary
tabBarItem.image = MaterialIcon.cm.photoLibrary
tabBarItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
tabBarItem.setTitleColor(MaterialColor.white, forState: .Selected)
}
......
......@@ -74,42 +74,27 @@ class AppSearchBarController: SearchBarController {
/// Prepares the searchBar.
private func prepareSearchBar() {
var image: UIImage? = MaterialIcon.close
let clearButton: FlatButton = FlatButton()
clearButton.pulseScale = false
clearButton.pulseColor = MaterialColor.grey.darken4
clearButton.tintColor = MaterialColor.grey.darken4
clearButton.setImage(image, forState: .Normal)
clearButton.setImage(image, forState: .Highlighted)
var image: UIImage? = MaterialIcon.cm.arrowBack
// Back button.
image = MaterialIcon.arrowBack
let backButton: FlatButton = FlatButton()
backButton.pulseScale = false
backButton.pulseColor = MaterialColor.grey.darken4
backButton.pulseColor = MaterialColor.grey.base
backButton.tintColor = MaterialColor.grey.darken4
backButton.setImage(image, forState: .Normal)
backButton.setImage(image, forState: .Highlighted)
backButton.addTarget(self, action: #selector(handleBackButton), forControlEvents: .TouchUpInside)
// More button.
image = MaterialIcon.moreHorizontal
image = MaterialIcon.cm.moreHorizontal
let moreButton: FlatButton = FlatButton()
moreButton.pulseScale = false
moreButton.pulseColor = MaterialColor.grey.darken4
moreButton.pulseColor = MaterialColor.grey.base
moreButton.tintColor = MaterialColor.grey.darken4
moreButton.setImage(image, forState: .Normal)
moreButton.setImage(image, forState: .Highlighted)
searchBar.placeholder = "Search"
searchBar.tintColor = MaterialColor.grey.darken4
searchBar.textColor = MaterialColor.grey.darken4
searchBar.placeholderTextColor = MaterialColor.grey.darken4
searchBar.textField.font = RobotoFont.regular
searchBar.textField.delegate = self
searchBar.clearButton = clearButton
searchBar.leftControls = [backButton]
searchBar.rightControls = [moreButton]
}
......
......@@ -68,7 +68,7 @@ class ItemViewController: UIViewController {
prepareView()
prepareTitleLabel()
prepareShareButton()
prepareNavigationBar()
prepareNavigationItem()
prepareScrollView()
prepareImageCardView()
}
......@@ -114,7 +114,7 @@ class ItemViewController: UIViewController {
/// Prepares the shareButton.
private func prepareShareButton() {
let image: UIImage? = MaterialIcon.share
let image: UIImage? = MaterialIcon.cm.share
shareButton = FlatButton()
shareButton.pulseScale = false
shareButton.pulseColor = MaterialColor.white
......@@ -123,7 +123,7 @@ class ItemViewController: UIViewController {
}
/// Prepares the navigationItem.
private func prepareNavigationBar() {
private func prepareNavigationItem() {
navigationItem.titleLabel = titleLabel
navigationItem.detailLabel = detailLabel
navigationItem.rightControls = [shareButton]
......
......@@ -57,7 +57,7 @@ class PhotoViewController: UIViewController {
/// Prepare tabBarItem.
private func prepareTabBarItem() {
tabBarItem.image = MaterialIcon.photoCamera
tabBarItem.image = MaterialIcon.cm.photoCamera
tabBarItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
tabBarItem.setTitleColor(MaterialColor.white, forState: .Selected)
}
......
......@@ -58,7 +58,7 @@ class RecipesViewController: UIViewController {
prepareMenuButton()
prepareSwitchControl()
prepareSearchButton()
prepareNavigationBar()
prepareNavigationItem()
prepareTableView()
}
......@@ -229,7 +229,7 @@ class RecipesViewController: UIViewController {
/// Prepares the menuButton.
private func prepareMenuButton() {
let image: UIImage? = MaterialIcon.menu
let image: UIImage? = MaterialIcon.cm.menu
menuButton = FlatButton()
menuButton.pulseScale = false
menuButton.pulseColor = MaterialColor.white
......@@ -245,7 +245,7 @@ class RecipesViewController: UIViewController {
/// Prepares the searchButton.
private func prepareSearchButton() {
let image: UIImage? = MaterialIcon.search
let image: UIImage? = MaterialIcon.cm.search
searchButton = FlatButton()
searchButton.pulseScale = false
searchButton.pulseColor = MaterialColor.white
......@@ -255,7 +255,7 @@ class RecipesViewController: UIViewController {
}
/// Prepares the navigationItem.
private func prepareNavigationBar() {
private func prepareNavigationItem() {
navigationItem.titleLabel = titleLabel
navigationItem.leftControls = [menuButton]
navigationItem.rightControls = [switchControl, searchButton]
......
......@@ -57,7 +57,7 @@ class VideoViewController: UIViewController {
/// Prepare tabBarItem.
private func prepareTabBarItem() {
tabBarItem.image = MaterialIcon.videocam
tabBarItem.image = MaterialIcon.cm.videocam
tabBarItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
tabBarItem.setTitleColor(MaterialColor.white, forState: .Selected)
}
......
......@@ -43,7 +43,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UITabBarControllerDelegat
bottomNavigationController.tabBar.tintColor = MaterialColor.teal.base
bottomNavigationController.tabBar.backgroundColor = MaterialColor.grey.darken4
// Override point for customization after application launch.
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window!.rootViewController = bottomNavigationController
window!.makeKeyAndVisible()
......
......@@ -58,7 +58,7 @@ class LibraryViewController: UIViewController {
/// Prepare tabBarItem.
private func prepareTabBarItem() {
tabBarItem.title = "Library"
tabBarItem.image = MaterialIcon.photoLibrary
tabBarItem.image = MaterialIcon.cm.photoLibrary
tabBarItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
tabBarItem.setTitleColor(MaterialColor.teal.base, forState: .Selected)
}
......
......@@ -58,7 +58,7 @@ class PhotoViewController: UIViewController {
/// Prepare tabBarItem.
private func prepareTabBarItem() {
tabBarItem.title = "Photo"
tabBarItem.image = MaterialIcon.photoCamera
tabBarItem.image = MaterialIcon.cm.photoCamera
tabBarItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
tabBarItem.setTitleColor(MaterialColor.teal.base, forState: .Selected)
}
......
......@@ -58,7 +58,7 @@ class VideoViewController: UIViewController {
/// Prepare tabBarItem.
private func prepareTabBarItem() {
tabBarItem.title = "Video"
tabBarItem.image = MaterialIcon.videocam
tabBarItem.image = MaterialIcon.cm.videocam
tabBarItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
tabBarItem.setTitleColor(MaterialColor.teal.base, forState: .Selected)
}
......
......@@ -36,7 +36,6 @@ 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()
......
......@@ -53,15 +53,15 @@ class ViewController: UIViewController {
bottomTabBar.backgroundColor = MaterialColor.grey.darken4
view.addSubview(bottomTabBar)
let videoItem: UITabBarItem = UITabBarItem(title: "Video", image: MaterialIcon.videocam, selectedImage: nil)
let videoItem: UITabBarItem = UITabBarItem(title: "Video", image: MaterialIcon.cm.videocam, selectedImage: nil)
videoItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
videoItem.setTitleColor(MaterialColor.teal.base, forState: .Selected)
let photoItem: UITabBarItem = UITabBarItem(title: "Photo", image: MaterialIcon.photoCamera, selectedImage: nil)
let photoItem: UITabBarItem = UITabBarItem(title: "Photo", image: MaterialIcon.cm.photoCamera, selectedImage: nil)
photoItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
photoItem.setTitleColor(MaterialColor.teal.base, forState: .Selected)
let libraryItem: UITabBarItem = UITabBarItem(title: "Library", image: MaterialIcon.photoLibrary, selectedImage: nil)
let libraryItem: UITabBarItem = UITabBarItem(title: "Library", image: MaterialIcon.cm.photoLibrary, selectedImage: nil)
libraryItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
libraryItem.setTitleColor(MaterialColor.teal.base, forState: .Selected)
......
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -36,7 +36,6 @@ 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()
......
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -202,7 +202,7 @@ class ViewController: UIViewController {
titleLabel.backgroundColor = MaterialColor.clear
contentView.addSubview(titleLabel)
image = MaterialIcon.moreVertical
image = MaterialIcon.cm.moreVertical
let moreButton: FlatButton = FlatButton()
moreButton.contentEdgeInsetsPreset = .None
moreButton.pulseColor = MaterialColor.blueGrey.darken4
......@@ -299,7 +299,7 @@ class ViewController: UIViewController {
titleLabel.backgroundColor = MaterialColor.clear
contentView.addSubview(titleLabel)
image = MaterialIcon.moreVertical
image = MaterialIcon.cm.moreVertical
let moreButton: FlatButton = FlatButton()
moreButton.contentEdgeInsetsPreset = .None
moreButton.pulseColor = MaterialColor.blueGrey.darken4
......@@ -408,7 +408,7 @@ class ViewController: UIViewController {
titleLabel.backgroundColor = MaterialColor.clear
contentView.addSubview(titleLabel)
image = MaterialIcon.moreHorizontal
image = MaterialIcon.cm.moreHorizontal
let moreButton: FlatButton = FlatButton()
moreButton.contentEdgeInsetsPreset = .None
moreButton.pulseColor = MaterialColor.blueGrey.darken4
......
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -80,12 +80,12 @@ class ViewController: UIViewController {
if fabMenu.opened {
fabMenu.close()
image = MaterialIcon.add
image = MaterialIcon.cm.add
} else {
fabMenu.open() { (v: UIView) in
(v as? MaterialButton)?.pulse()
}
image = MaterialIcon.close
image = MaterialIcon.cm.close
}
// Add a nice rotation animation to the base button.
......
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -37,7 +37,6 @@ 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 = AppMenuViewController(rootViewController: YellowViewController())
window!.makeKeyAndVisible()
......
......@@ -36,7 +36,6 @@ 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()
......
......@@ -89,7 +89,7 @@ class ViewController: UIViewController {
/// Prepares the menuButton.
private func prepareMenuButton() {
let image: UIImage? = MaterialIcon.menu
let image: UIImage? = MaterialIcon.cm.menu
menuButton = FlatButton()
menuButton.pulseScale = false
menuButton.pulseColor = MaterialColor.white
......@@ -104,7 +104,7 @@ class ViewController: UIViewController {
/// Prepares the searchButton.
private func prepareSearchButton() {
let image: UIImage? = MaterialIcon.search
let image: UIImage? = MaterialIcon.cm.search
searchButton = FlatButton()
searchButton.pulseScale = false
searchButton.pulseColor = MaterialColor.white
......
......@@ -36,7 +36,6 @@ 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()
......
......@@ -54,21 +54,13 @@ class ViewController: UIViewController {
/// Prepare toolbar.
private func prepareSearchBar() {
var image: UIImage? = MaterialIcon.close
let clearButton: FlatButton = FlatButton()
clearButton.pulseScale = false
clearButton.pulseColor = MaterialColor.blueGrey.darken4
clearButton.tintColor = MaterialColor.blueGrey.darken4
clearButton.setImage(image, forState: .Normal)
clearButton.setImage(image, forState: .Highlighted)
var image: UIImage? = MaterialIcon.cm.arrowBack
// Back button.
image = MaterialIcon.arrowBack
let backButton: FlatButton = FlatButton()
backButton.pulseScale = false
backButton.pulseColor = MaterialColor.blueGrey.darken4
backButton.tintColor = MaterialColor.blueGrey.darken4
backButton.pulseColor = MaterialColor.grey.base
backButton.tintColor = MaterialColor.grey.darken4
backButton.setImage(image, forState: .Normal)
backButton.setImage(image, forState: .Highlighted)
......@@ -76,11 +68,11 @@ class ViewController: UIViewController {
let switchControl: MaterialSwitch = MaterialSwitch(state: .Off, style: .Default, size: .Small)
// More button.
image = MaterialIcon.moreHorizontal
image = MaterialIcon.cm.moreHorizontal
let moreButton: FlatButton = FlatButton()
moreButton.pulseScale = false
moreButton.pulseColor = MaterialColor.blueGrey.darken4
moreButton.tintColor = MaterialColor.blueGrey.darken4
moreButton.pulseColor = MaterialColor.grey.base
moreButton.tintColor = MaterialColor.grey.darken4
moreButton.setImage(image, forState: .Normal)
moreButton.setImage(image, forState: .Highlighted)
......@@ -90,14 +82,6 @@ class ViewController: UIViewController {
to your info.plist file and set the following property.
*/
searchBar.statusBarStyle = .Default
searchBar.placeholder = "Search"
searchBar.tintColor = MaterialColor.blueGrey.darken4
searchBar.textColor = MaterialColor.blueGrey.darken4
searchBar.placeholderTextColor = MaterialColor.blueGrey.darken4
searchBar.textField.font = RobotoFont.regular
searchBar.clearButton = clearButton
searchBar.leftControls = [backButton]
searchBar.rightControls = [switchControl, moreButton]
......
......@@ -37,7 +37,6 @@ 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 = AppSearchBarController(rootViewController: YellowViewController())
window!.makeKeyAndVisible()
......
......@@ -76,18 +76,9 @@ class AppSearchBarController: SearchBarController {
/// Prepares the searchBar.
private func prepareSearchBar() {
var image: UIImage? = MaterialIcon.close
let clearButton: FlatButton = FlatButton()
clearButton.pulseColor = nil
clearButton.pulseScale = false
clearButton.tintColor = MaterialColor.blueGrey.darken4
clearButton.setImage(image, forState: .Normal)
clearButton.setImage(image, forState: .Highlighted)
clearButton.addTarget(self, action: #selector(handleYellowButton), forControlEvents: .TouchUpInside)
var image: UIImage? = MaterialIcon.cm.arrowBack
// Back button.
image = MaterialIcon.arrowBack
let backButton: FlatButton = FlatButton()
backButton.pulseColor = nil
backButton.pulseScale = false
......@@ -97,7 +88,7 @@ class AppSearchBarController: SearchBarController {
backButton.addTarget(self, action: #selector(handleBlueButton), forControlEvents: .TouchUpInside)
// More button.
image = MaterialIcon.moreHorizontal
image = MaterialIcon.cm.moreHorizontal
let moreButton: FlatButton = FlatButton()
moreButton.pulseColor = nil
moreButton.pulseScale = false
......@@ -112,15 +103,7 @@ class AppSearchBarController: SearchBarController {
to your info.plist file and set the following property.
*/
searchBar.statusBarStyle = .Default
searchBar.placeholder = "Search"
searchBar.tintColor = MaterialColor.blueGrey.darken4
searchBar.textColor = MaterialColor.blueGrey.darken4
searchBar.placeholderTextColor = MaterialColor.blueGrey.darken4
searchBar.textField.font = RobotoFont.regular
searchBar.textField.delegate = self
searchBar.clearButton = clearButton
searchBar.leftControls = [backButton]
searchBar.rightControls = [moreButton]
}
......
......@@ -37,7 +37,6 @@ 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 = SideNavigationController(rootViewController: YellowViewController(), leftViewController: GreenViewController(), rightViewController: BlueViewController())
window!.makeKeyAndVisible()
......
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:TabBar.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
import Material
@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" : "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>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
/*
* Copyright (C) 2015 - 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 {
override func viewDidLoad() {
super.viewDidLoad()
prepareView()
let tabBar: TabBar = TabBar(frame: CGRectMake(0, 100, view.bounds.width, 44))
tabBar.backgroundColor = MaterialColor.blue.base
view.addSubview(tabBar)
let btn1: FlatButton = FlatButton()
btn1.pulseColor = MaterialColor.white
btn1.pulseScale = false
btn1.setTitle("ONE", forState: .Normal)
btn1.setTitleColor(MaterialColor.white, forState: .Normal)
let btn2: FlatButton = FlatButton()
btn2.pulseColor = MaterialColor.white
btn2.pulseScale = false
btn2.setTitle("TWO", forState: .Normal)
btn2.setTitleColor(MaterialColor.white, forState: .Normal)
let btn3: FlatButton = FlatButton()
btn3.pulseColor = MaterialColor.white
btn3.pulseScale = false
btn3.setTitle("THREE", forState: .Normal)
btn3.setTitleColor(MaterialColor.white, forState: .Normal)
let btn4: FlatButton = FlatButton()
btn4.pulseColor = MaterialColor.white
btn4.pulseScale = false
btn4.setTitle("FOUR", forState: .Normal)
btn4.setTitleColor(MaterialColor.white, forState: .Normal)
tabBar.buttons = [btn1, btn2, btn3, btn4]
}
/// Prepares view.
private func prepareView() {
view.backgroundColor = MaterialColor.white
}
}
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -14,7 +14,7 @@
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
966F57B51C226CA3009185B7 /* Embed Frameworks */ = {
966015DB1CB2B0BA00AAB661 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
......@@ -84,7 +84,7 @@
966F57991C226BAA009185B7 /* Sources */,
966F579A1C226BAA009185B7 /* Frameworks */,
966F579B1C226BAA009185B7 /* Resources */,
966F57B51C226CA3009185B7 /* Embed Frameworks */,
966015DB1CB2B0BA00AAB661 /* Embed Frameworks */,
);
buildRules = (
);
......
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -53,44 +53,20 @@ class ViewController: UIViewController, TextFieldDelegate {
/// Prepares the name TextField.
private func prepareNameField() {
let textField: TextField = TextField(frame: CGRectMake(57, 100, 300, 24))
let w: CGFloat = 300
let x: CGFloat = (MaterialDevice.width - w) / 2
let textField: TextField = TextField(frame: CGRectMake(x, 100, w, 24))
textField.placeholder = "First Name"
textField.placeholderTextColor = MaterialColor.grey.base
textField.font = RobotoFont.regularWithSize(20)
textField.textColor = MaterialColor.black
textField.titleLabel = UILabel()
textField.titleLabel!.font = RobotoFont.mediumWithSize(12)
textField.titleLabelColor = MaterialColor.grey.base
textField.titleLabelActiveColor = MaterialColor.blue.accent3
let image: UIImage? = MaterialIcon.close
let clearButton: FlatButton = FlatButton()
clearButton.pulseColor = MaterialColor.grey.base
clearButton.pulseScale = false
clearButton.tintColor = MaterialColor.grey.base
clearButton.setImage(image, forState: .Normal)
clearButton.setImage(image, forState: .Highlighted)
textField.clearButton = clearButton
view.addSubview(textField)
}
/// Prepares the email TextField.
private func prepareEmailField() {
let textField: TextField = TextField(frame: CGRectMake(57, 200, 300, 24))
let w: CGFloat = 300
let x: CGFloat = (MaterialDevice.width - w) / 2
let textField: TextField = TextField(frame: CGRectMake(x, 200, w, 24))
textField.delegate = self
textField.placeholder = "Email"
textField.placeholderTextColor = MaterialColor.grey.base
textField.font = RobotoFont.regularWithSize(20)
textField.textColor = MaterialColor.black
textField.titleLabel = UILabel()
textField.titleLabel!.font = RobotoFont.mediumWithSize(12)
textField.titleLabelColor = MaterialColor.grey.base
textField.titleLabelActiveColor = MaterialColor.blue.accent3
/*
Used to display the error message, which is displayed when
......@@ -98,21 +74,10 @@ class ViewController: UIViewController, TextFieldDelegate {
*/
textField.detailLabel = UILabel()
textField.detailLabel!.text = "Email is incorrect."
textField.detailLabel!.font = RobotoFont.mediumWithSize(12)
textField.detailLabel!.font = RobotoFont.regularWithSize(12)
textField.detailLabelActiveColor = MaterialColor.red.accent3
// textField.detailLabelAutoHideEnabled = false // Uncomment this line to have manual hiding.
let image: UIImage? = MaterialIcon.close
let clearButton: FlatButton = FlatButton()
clearButton.pulseColor = MaterialColor.grey.base
clearButton.pulseScale = false
clearButton.tintColor = MaterialColor.grey.base
clearButton.setImage(image, forState: .Normal)
clearButton.setImage(image, forState: .Highlighted)
textField.clearButton = clearButton
view.addSubview(textField)
}
......
......@@ -37,7 +37,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
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()
......
......@@ -36,7 +36,6 @@ 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()
......
......@@ -68,7 +68,7 @@ class ViewController: UIViewController {
detailLabel.textColor = MaterialColor.white
detailLabel.font = RobotoFont.regular
var image: UIImage? = MaterialIcon.menu
var image: UIImage? = MaterialIcon.cm.menu
// Menu button.
let menuButton: FlatButton = FlatButton()
......@@ -82,7 +82,7 @@ class ViewController: UIViewController {
let switchControl: MaterialSwitch = MaterialSwitch(state: .Off, style: .LightContent, size: .Small)
// Search button.
image = MaterialIcon.search
image = MaterialIcon.cm.search
let searchButton: FlatButton = FlatButton()
searchButton.pulseScale = false
searchButton.pulseColor = MaterialColor.white
......
......@@ -37,7 +37,6 @@ 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 = AppToolbarController(rootViewController: YellowViewController())
window!.makeKeyAndVisible()
......
......@@ -91,7 +91,7 @@ class AppToolbarController: ToolbarController {
// detailLabel.font = RobotoFont.regular
// toolbar.detailLabel = detailLabel
var image: UIImage? = MaterialIcon.menu
var image: UIImage? = MaterialIcon.cm.menu
// Menu button.
let menuButton: FlatButton = FlatButton()
......@@ -107,7 +107,7 @@ class AppToolbarController: ToolbarController {
switchControl.delegate = self
// Search button.
image = MaterialIcon.search
image = MaterialIcon.cm.search
let searchButton: FlatButton = FlatButton()
searchButton.pulseColor = nil
searchButton.pulseScale = false
......
......@@ -37,15 +37,15 @@ class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let videoItem: UITabBarItem = UITabBarItem(title: "Video", image: MaterialIcon.videocam, selectedImage: nil)
let videoItem: UITabBarItem = UITabBarItem(title: "Video", image: MaterialIcon.cm.videocam, selectedImage: nil)
videoItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
videoItem.setTitleColor(MaterialColor.teal.base, forState: .Selected)
let photoItem: UITabBarItem = UITabBarItem(title: "Photo", image: MaterialIcon.photoCamera, selectedImage: nil)
let photoItem: UITabBarItem = UITabBarItem(title: "Photo", image: MaterialIcon.cm.photoCamera, selectedImage: nil)
photoItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
photoItem.setTitleColor(MaterialColor.teal.base, forState: .Selected)
let libraryItem: UITabBarItem = UITabBarItem(title: "Library", image: MaterialIcon.photoLibrary, selectedImage: nil)
let libraryItem: UITabBarItem = UITabBarItem(title: "Library", image: MaterialIcon.cm.photoLibrary, selectedImage: nil)
libraryItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
libraryItem.setTitleColor(MaterialColor.teal.base, forState: .Selected)
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--View Controller-->
......
......@@ -35,6 +35,7 @@
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
......
......@@ -57,41 +57,12 @@ class ViewController: UIViewController, TextFieldDelegate {
/// Prepares the name TextField.
private func prepareNameField() {
nameField.placeholder = "First Name"
nameField.placeholderTextColor = MaterialColor.grey.base
nameField.font = RobotoFont.regularWithSize(20)
nameField.textColor = MaterialColor.black
nameField.borderStyle = .None
nameField.titleLabel = UILabel()
nameField.titleLabel!.font = RobotoFont.mediumWithSize(12)
nameField.titleLabelColor = MaterialColor.grey.base
nameField.titleLabelActiveColor = MaterialColor.blue.accent3
let image: UIImage? = MaterialIcon.close
let clearButton: FlatButton = FlatButton()
clearButton.pulseColor = MaterialColor.grey.base
clearButton.pulseScale = false
clearButton.tintColor = MaterialColor.grey.base
clearButton.setImage(image, forState: .Normal)
clearButton.setImage(image, forState: .Highlighted)
nameField.clearButton = clearButton
}
/// Prepares the email TextField.
private func prepareEmailField() {
emailField.delegate = self
emailField.placeholder = "Email"
emailField.placeholderTextColor = MaterialColor.grey.base
emailField.font = RobotoFont.regularWithSize(20)
emailField.textColor = MaterialColor.black
emailField.borderStyle = .None
emailField.titleLabel = UILabel()
emailField.titleLabel!.font = RobotoFont.mediumWithSize(12)
emailField.titleLabelColor = MaterialColor.grey.base
emailField.titleLabelActiveColor = MaterialColor.blue.accent3
/*
Used to display the error message, which is displayed when
......@@ -99,20 +70,9 @@ class ViewController: UIViewController, TextFieldDelegate {
*/
emailField.detailLabel = UILabel()
emailField.detailLabel!.text = "Email is incorrect."
emailField.detailLabel!.font = RobotoFont.mediumWithSize(12)
emailField.detailLabel!.font = RobotoFont.regularWithSize(12)
emailField.detailLabelActiveColor = MaterialColor.red.accent3
// emailField.detailLabelAutoHideEnabled = false // Uncomment this line to have manual hiding.
let image: UIImage? = MaterialIcon.close
let clearButton: FlatButton = FlatButton()
clearButton.pulseColor = MaterialColor.grey.base
clearButton.pulseScale = false
clearButton.tintColor = MaterialColor.grey.base
clearButton.setImage(image, forState: .Normal)
clearButton.setImage(image, forState: .Highlighted)
emailField.clearButton = clearButton
}
/// Executed when the 'return' key is pressed when using the emailField.
......
......@@ -53,9 +53,9 @@
children = (
96F2F20D1C97AFC600A5FE27 /* AppDelegate.swift */,
96F2F2141C97AFC600A5FE27 /* ViewController.swift */,
96F2F2111C97AFC600A5FE27 /* Main.storyboard */,
96F2F20E1C97AFC600A5FE27 /* Assets.xcassets */,
96F2F20F1C97AFC600A5FE27 /* LaunchScreen.storyboard */,
96F2F2111C97AFC600A5FE27 /* Main.storyboard */,
96F2F2131C97AFC600A5FE27 /* Info.plist */,
);
path = Toolbar;
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--View Controller-->
......
......@@ -94,24 +94,30 @@ class ViewController: UIViewController {
toolbar.detailLabel = detailLabel
// Menu button.
let img1: UIImage? = MaterialIcon.menu
let img1: UIImage? = MaterialIcon.cm.menu
let btn1: FlatButton = FlatButton()
btn1.pulseScale = false
btn1.setImage(img1, forState: .Normal)
btn1.pulseColor = MaterialColor.white
btn1.tintColor = MaterialColor.white
btn1.setImage(img1, forState: .Normal)
btn1.setImage(img1, forState: .Highlighted)
// Star button.
let img2: UIImage? = UIImage(named: "ic_star_white")
let img2: UIImage? = MaterialIcon.cm.star
let btn2: FlatButton = FlatButton()
btn2.pulseScale = false
btn2.pulseColor = MaterialColor.white
btn2.tintColor = MaterialColor.white
btn2.setImage(img2, forState: .Normal)
btn2.setImage(img2, forState: .Highlighted)
// Search button.
let img3: UIImage? = UIImage(named: "ic_search_white")
let img3: UIImage? = MaterialIcon.cm.search
let btn3: FlatButton = FlatButton()
btn3.pulseScale = false
btn3.setImage(img3, forState: .Normal)
btn3.pulseColor = MaterialColor.white
btn3.tintColor = MaterialColor.white
btn3.setImage(img3, forState: .Normal)
btn3.setImage(img3, forState: .Highlighted)
// Add buttons to left side.
......
Pod::Spec.new do |s|
s.name = 'Material'
s.version = '1.38.5'
s.version = '1.39.4'
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.homepage = 'http://cosmicmind.io'
......@@ -8,9 +8,12 @@ Pod::Spec.new do |s|
s.authors = { 'CosmicMind, Inc.' => 'support@cosmicmind.io' }
s.source = { :git => 'https://github.com/CosmicMind/Material.git', :tag => s.version }
s.ios.deployment_target = '8.0'
s.source_files = 'Sources/*.swift'
s.ios.source_files = 'Sources/iOS/**/*.swift'
s.osx.deployment_target = '10.9'
s.osx.source_files = 'Sources/OSX/**/*.swift'
s.requires_arc = true
s.resource_bundles = {
'io.cosmicmind.Material' => ['Sources/Assets.xcassets/**/*.png']
'io.cosmicmind.material.fonts' => ['Sources/**/*.ttf'],
'io.cosmicmind.material.icons' => ['Sources/Assets.xcassets/**/*.png']
}
end
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -16,7 +16,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "963832351B88DFD80015F710"
BuildableName = "Material.framework"
BlueprintName = "Material"
BlueprintName = "Material iOS"
ReferencedContainer = "container:Material.xcodeproj">
</BuildableReference>
</BuildActionEntry>
......@@ -34,7 +34,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "963832401B88DFD80015F710"
BuildableName = "Material.xctest"
BlueprintName = "MaterialTests"
BlueprintName = "Material iOS Tests"
ReferencedContainer = "container:Material.xcodeproj">
</BuildableReference>
</TestableReference>
......@@ -44,7 +44,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "963832351B88DFD80015F710"
BuildableName = "Material.framework"
BlueprintName = "Material"
BlueprintName = "Material iOS"
ReferencedContainer = "container:Material.xcodeproj">
</BuildableReference>
</MacroExpansion>
......@@ -66,7 +66,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "963832351B88DFD80015F710"
BuildableName = "Material.framework"
BlueprintName = "Material"
BlueprintName = "Material iOS"
ReferencedContainer = "container:Material.xcodeproj">
</BuildableReference>
</MacroExpansion>
......@@ -84,7 +84,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "963832351B88DFD80015F710"
BuildableName = "Material.framework"
BlueprintName = "Material"
BlueprintName = "Material iOS"
ReferencedContainer = "container:Material.xcodeproj">
</BuildableReference>
</MacroExpansion>
......
......@@ -26,7 +26,7 @@ Express your creativity with Material, an animation and graphics framework for G
## Requirements
* iOS 8.0+
* iOS 8.0+ / Mac OS X 10.9+
* Xcode 7.3+
## Communication
......@@ -39,7 +39,7 @@ Express your creativity with Material, an animation and graphics framework for G
## Installation
> **Embedded frameworks require a minimum deployment target of iOS 8.**
> **Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks (10.9).**
> - [Download Material](https://github.com/CosmicMind/Material/archive/master.zip)
Visit the [Installation](https://github.com/CosmicMind/Material/wiki/Installation) page to learn how to install Material using [CocoaPods](http://cocoapods.org) and [Carthage](https://github.com/Carthage/Carthage).
......@@ -365,6 +365,11 @@ Add a new dimension of interactivity with CaptureView. CaptureView is a fully fu
* TabBarController
* Scrolling Techniques
* Snackbar
* BottomNavigationController with Snackbar.
* Bottom Sheets
* Dialogs
* Collapsing Toolbar
* RTL Support
* Advanced Camera / Audio Toolset & Views
* More Examples
......
......@@ -2,17 +2,17 @@
"images" : [
{
"idiom" : "universal",
"filename" : "ic_bell_white.png",
"filename" : "cm_add_white.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_bell_white_2x.png",
"filename" : "cm_add_white_2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_bell_white_3x.png",
"filename" : "cm_add_white_3x.png",
"scale" : "3x"
}
],
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "cm_arrow_back_white.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "cm_arrow_back_white_2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "cm_arrow_back_white_3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "cm_arrow_downward_white.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "cm_arrow_downward_white_2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "cm_arrow_downward_white_3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "cm_audio_white.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "cm_audio_white_2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "cm_audio_white_3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "cm_bell_white.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "cm_bell_white_2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "cm_bell_white_3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "cm_close_white.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "cm_close_white_2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "cm_close_white_3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
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