Commit 973a8015 by Daniel Dahan

updated base theme

parent 56d71fc4
......@@ -15,6 +15,8 @@
65B965871B8BEEC60055B139 /* SideNavigationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65B965861B8BEEC60055B139 /* SideNavigationViewController.swift */; };
65BDD1451BB5B8B8006F7F2B /* MaterialTheme+View.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65BDD1441BB5B8B8006F7F2B /* MaterialTheme+View.swift */; settings = {ASSET_TAGS = (); }; };
65BDD1471BB5B916006F7F2B /* MaterialView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65BDD1461BB5B916006F7F2B /* MaterialView.swift */; settings = {ASSET_TAGS = (); }; };
65BDD1491BB5DC98006F7F2B /* MaterialTheme+Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65BDD1481BB5DC98006F7F2B /* MaterialTheme+Color.swift */; settings = {ASSET_TAGS = (); }; };
65BDD14B1BB5DD02006F7F2B /* MaterialTheme+Font.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65BDD14A1BB5DD02006F7F2B /* MaterialTheme+Font.swift */; settings = {ASSET_TAGS = (); }; };
65DBE4201B9A9244000C804F /* Roboto-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 65DBE41E1B9A9244000C804F /* Roboto-Bold.ttf */; };
65DBE4211B9A9244000C804F /* Roboto-Thin.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 65DBE41F1B9A9244000C804F /* Roboto-Thin.ttf */; };
962F3E531BACA68C0004B8AD /* NavigationBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 962F3E521BACA68C0004B8AD /* NavigationBarView.swift */; };
......@@ -68,6 +70,8 @@
65B965861B8BEEC60055B139 /* SideNavigationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SideNavigationViewController.swift; sourceTree = "<group>"; };
65BDD1441BB5B8B8006F7F2B /* MaterialTheme+View.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "MaterialTheme+View.swift"; sourceTree = "<group>"; };
65BDD1461BB5B916006F7F2B /* MaterialView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialView.swift; sourceTree = "<group>"; };
65BDD1481BB5DC98006F7F2B /* MaterialTheme+Color.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "MaterialTheme+Color.swift"; sourceTree = "<group>"; };
65BDD14A1BB5DD02006F7F2B /* MaterialTheme+Font.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "MaterialTheme+Font.swift"; sourceTree = "<group>"; };
65DBE41E1B9A9244000C804F /* Roboto-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Roboto-Bold.ttf"; sourceTree = "<group>"; };
65DBE41F1B9A9244000C804F /* Roboto-Thin.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Roboto-Thin.ttf"; sourceTree = "<group>"; };
962F3E521BACA68C0004B8AD /* NavigationBarView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationBarView.swift; sourceTree = "<group>"; };
......@@ -228,6 +232,8 @@
children = (
96B57D4D1B90AF7D00DE7BBB /* MaterialTheme.swift */,
65BDD1441BB5B8B8006F7F2B /* MaterialTheme+View.swift */,
65BDD1481BB5DC98006F7F2B /* MaterialTheme+Color.swift */,
65BDD14A1BB5DD02006F7F2B /* MaterialTheme+Font.swift */,
);
name = Theme;
sourceTree = "<group>";
......@@ -394,10 +400,12 @@
9638326B1B88E5BF0015F710 /* FabButton.swift in Sources */,
9A94D1091B8A3F5100F586A5 /* MaterialCardView.swift in Sources */,
65B965871B8BEEC60055B139 /* SideNavigationViewController.swift in Sources */,
65BDD14B1BB5DD02006F7F2B /* MaterialTheme+Font.swift in Sources */,
65BDD1451BB5B8B8006F7F2B /* MaterialTheme+View.swift in Sources */,
9638326C1B88E5BF0015F710 /* FlatButton.swift in Sources */,
963832711B88E5BF0015F710 /* MaterialText.swift in Sources */,
9638326A1B88E5BF0015F710 /* CapturePreview.swift in Sources */,
65BDD1491BB5DC98006F7F2B /* MaterialTheme+Color.swift in Sources */,
9AAC38541B89559900FE6B2D /* Roboto.swift in Sources */,
65B9657E1B8A7C330055B139 /* MaterialButton.swift in Sources */,
963832881B8908180015F710 /* Layout.swift in Sources */,
......
......@@ -226,18 +226,18 @@ public class BasicCardView : MaterialCardView, Comparable {
if nil == titleLabelContainer {
titleLabelContainer = UIView()
titleLabelContainer!.translatesAutoresizingMaskIntoConstraints = false
titleLabelContainer!.backgroundColor = MaterialTheme.clear.color
titleLabelContainer!.backgroundColor = MaterialTheme.color.clear.base
addSubview(titleLabelContainer!)
}
// text
titleLabelContainer!.addSubview(t)
t.translatesAutoresizingMaskIntoConstraints = false
t.backgroundColor = MaterialTheme.clear.color
t.backgroundColor = MaterialTheme.color.clear.base
t.font = Roboto.regular
t.numberOfLines = 0
t.lineBreakMode = .ByTruncatingTail
t.textColor = MaterialTheme.white.color
t.textColor = MaterialTheme.color.white.base
} else {
titleLabelContainer?.removeFromSuperview()
titleLabelContainer = nil
......@@ -270,15 +270,15 @@ public class BasicCardView : MaterialCardView, Comparable {
if nil == detailLabelContainer {
detailLabelContainer = UIView()
detailLabelContainer!.translatesAutoresizingMaskIntoConstraints = false
detailLabelContainer!.backgroundColor = MaterialTheme.clear.color
detailLabelContainer!.backgroundColor = MaterialTheme.color.clear.base
addSubview(detailLabelContainer!)
}
// text
detailLabelContainer!.addSubview(l)
l.translatesAutoresizingMaskIntoConstraints = false
l.textColor = MaterialTheme.white.color
l.backgroundColor = MaterialTheme.clear.color
l.textColor = MaterialTheme.color.white.base
l.backgroundColor = MaterialTheme.color.clear.base
l.font = Roboto.light
l.numberOfLines = 0
l.lineBreakMode = .ByTruncatingTail
......@@ -297,7 +297,7 @@ public class BasicCardView : MaterialCardView, Comparable {
didSet {
if let d = divider {
d.translatesAutoresizingMaskIntoConstraints = false
d.backgroundColor = MaterialTheme.blueGrey.darken1
d.backgroundColor = MaterialTheme.color.blueGrey.darken1
addSubview(d)
} else {
divider?.removeFromSuperview()
......@@ -322,7 +322,7 @@ public class BasicCardView : MaterialCardView, Comparable {
} else if nil == buttonsContainer {
buttonsContainer = UIView()
buttonsContainer!.translatesAutoresizingMaskIntoConstraints = false
buttonsContainer!.backgroundColor = MaterialTheme.clear.color
buttonsContainer!.backgroundColor = MaterialTheme.color.clear.base
addSubview(buttonsContainer!)
} else {
for v in buttonsContainer!.subviews {
......@@ -344,7 +344,7 @@ public class BasicCardView : MaterialCardView, Comparable {
} else if nil == buttonsContainer {
buttonsContainer = UIView()
buttonsContainer!.translatesAutoresizingMaskIntoConstraints = false
buttonsContainer!.backgroundColor = MaterialTheme.clear.color
buttonsContainer!.backgroundColor = MaterialTheme.color.clear.base
addSubview(buttonsContainer!)
}
reloadView()
......@@ -504,7 +504,7 @@ public class BasicCardView : MaterialCardView, Comparable {
internal override func prepareView() {
super.prepareView()
prepareShadow()
backgroundColor = MaterialTheme.blueGrey.color
backgroundColor = MaterialTheme.color.blueGrey.base
}
}
......
......@@ -194,7 +194,7 @@ public class Preview: UIView {
//
private func viewWithColor(color: UIColor) -> UIView {
let view: UIView = UIView(frame: Preview.boxBounds)
view.backgroundColor = MaterialTheme.clear.color
view.backgroundColor = MaterialTheme.color.clear.base
view.layer.borderColor = color.CGColor
view.layer.borderWidth = 5
view.hidden = true
......
......@@ -24,8 +24,8 @@ public class FabButton : MaterialButton {
//
internal override func prepareView() {
super.prepareView()
setTitleColor(MaterialTheme.white.color, forState: .Normal)
backgroundColor = MaterialTheme.red.darken1
setTitleColor(MaterialTheme.color.white.base, forState: .Normal)
backgroundColor = MaterialTheme.color.red.darken1
contentEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 0)
}
......
......@@ -25,9 +25,9 @@ public class FlatButton : MaterialButton {
internal override func prepareView() {
super.prepareView()
titleLabel!.font = Roboto.regular
setTitleColor(MaterialTheme.blueGrey.darken4, forState: .Normal)
pulseColor = MaterialTheme.blueGrey.lighten3
backgroundColor = MaterialTheme.clear.color
setTitleColor(MaterialTheme.color.blueGrey.darken4, forState: .Normal)
pulseColor = MaterialTheme.color.blueGrey.lighten3
backgroundColor = MaterialTheme.color.clear.base
contentEdgeInsets = UIEdgeInsetsMake(MaterialTheme.buttonVerticalInset, MaterialTheme.buttonHorizontalInset, MaterialTheme.buttonVerticalInset, MaterialTheme.buttonHorizontalInset)
}
......
......@@ -282,7 +282,7 @@ public class ImageCardView : MaterialCardView, Comparable {
if nil == imageViewContainer {
imageViewContainer = UIView()
imageViewContainer!.translatesAutoresizingMaskIntoConstraints = false
imageViewContainer!.backgroundColor = MaterialTheme.clear.color
imageViewContainer!.backgroundColor = MaterialTheme.color.clear.base
addSubview(imageViewContainer!)
}
......@@ -293,8 +293,8 @@ public class ImageCardView : MaterialCardView, Comparable {
t.userInteractionEnabled = false
t.clipsToBounds = true
if nil != titleLabel {
titleLabelContainer!.backgroundColor = MaterialTheme.clear.color
titleLabel!.textColor = MaterialTheme.white.color
titleLabelContainer!.backgroundColor = MaterialTheme.color.clear.base
titleLabel!.textColor = MaterialTheme.color.white.base
titleLabelContainer!.removeFromSuperview()
imageViewContainer!.addSubview(titleLabelContainer!)
}
......@@ -336,16 +336,16 @@ public class ImageCardView : MaterialCardView, Comparable {
// text
titleLabelContainer!.addSubview(t)
t.translatesAutoresizingMaskIntoConstraints = false
t.backgroundColor = MaterialTheme.clear.color
t.backgroundColor = MaterialTheme.color.clear.base
t.font = Roboto.regular
t.numberOfLines = 0
t.lineBreakMode = .ByTruncatingTail
if nil == imageView {
titleLabelContainer!.backgroundColor = MaterialTheme.clear.color
t.textColor = MaterialTheme.black.color
titleLabelContainer!.backgroundColor = MaterialTheme.color.clear.base
t.textColor = MaterialTheme.color.black.base
} else {
titleLabelContainer!.backgroundColor = MaterialTheme.clear.color
t.textColor = MaterialTheme.clear.color
titleLabelContainer!.backgroundColor = MaterialTheme.color.clear.base
t.textColor = MaterialTheme.color.clear.base
titleLabelContainer!.removeFromSuperview()
imageViewContainer!.addSubview(titleLabelContainer!)
}
......@@ -381,15 +381,15 @@ public class ImageCardView : MaterialCardView, Comparable {
if nil == detailLabelContainer {
detailLabelContainer = UIView()
detailLabelContainer!.translatesAutoresizingMaskIntoConstraints = false
detailLabelContainer!.backgroundColor = MaterialTheme.clear.color
detailLabelContainer!.backgroundColor = MaterialTheme.color.clear.base
addSubview(detailLabelContainer!)
}
// text
detailLabelContainer!.addSubview(l)
l.translatesAutoresizingMaskIntoConstraints = false
l.textColor = MaterialTheme.black.color
l.backgroundColor = MaterialTheme.clear.color
l.textColor = MaterialTheme.color.black.base
l.backgroundColor = MaterialTheme.color.clear.base
l.font = Roboto.light
l.numberOfLines = 0
l.lineBreakMode = .ByTruncatingTail
......@@ -408,7 +408,7 @@ public class ImageCardView : MaterialCardView, Comparable {
didSet {
if let d = divider {
d.translatesAutoresizingMaskIntoConstraints = false
d.backgroundColor = MaterialTheme.blueGrey.lighten5
d.backgroundColor = MaterialTheme.color.blueGrey.lighten5
addSubview(d)
} else {
divider?.removeFromSuperview()
......@@ -433,7 +433,7 @@ public class ImageCardView : MaterialCardView, Comparable {
} else if nil == buttonsContainer {
buttonsContainer = UIView()
buttonsContainer!.translatesAutoresizingMaskIntoConstraints = false
buttonsContainer!.backgroundColor = MaterialTheme.clear.color
buttonsContainer!.backgroundColor = MaterialTheme.color.clear.base
addSubview(buttonsContainer!)
}
reloadView()
......@@ -451,7 +451,7 @@ public class ImageCardView : MaterialCardView, Comparable {
} else if nil == buttonsContainer {
buttonsContainer = UIView()
buttonsContainer!.translatesAutoresizingMaskIntoConstraints = false
buttonsContainer!.backgroundColor = MaterialTheme.clear.color
buttonsContainer!.backgroundColor = MaterialTheme.color.clear.base
addSubview(buttonsContainer!)
} else {
for v in buttonsContainer!.subviews {
......@@ -638,7 +638,7 @@ public class ImageCardView : MaterialCardView, Comparable {
internal override func prepareView() {
super.prepareView()
prepareShadow()
backgroundColor = MaterialTheme.white.color
backgroundColor = MaterialTheme.color.white.base
}
}
......
......@@ -44,7 +44,7 @@ public class MaterialButton : UIButton {
/**
:name: pulseColor
*/
public var pulseColor: UIColor? = MaterialTheme.white.color
public var pulseColor: UIColor? = MaterialTheme.color.white.base
/**
:name: init
......@@ -119,7 +119,7 @@ public class MaterialButton : UIButton {
// :name: prepareShadow
//
internal func prepareShadow() {
layer.shadowColor = MaterialTheme.black.color.CGColor
layer.shadowColor = MaterialTheme.color.black.base.CGColor
layer.shadowOffset = CGSizeMake(0.1, 0.1)
layer.shadowOpacity = 0.4
layer.shadowRadius = 2
......
......@@ -49,7 +49,7 @@ public class MaterialCardView : UIView {
/**
:name: pulseColor
*/
public var pulseColor: UIColor? = MaterialTheme.blueGrey.lighten3
public var pulseColor: UIColor? = MaterialTheme.color.blueGrey.lighten3
/**
:name: init
......@@ -113,7 +113,7 @@ public class MaterialCardView : UIView {
// :name: prepareShadow
//
internal func prepareShadow() {
layer.shadowColor = MaterialTheme.black.color.CGColor
layer.shadowColor = MaterialTheme.color.black.base.CGColor
layer.shadowOffset = CGSizeMake(0.1, 0.1)
layer.shadowOpacity = 0.4
layer.shadowRadius = 2
......@@ -123,7 +123,7 @@ public class MaterialCardView : UIView {
// :name: removeShadow
//
internal func removeShadow() {
layer.shadowColor = MaterialTheme.clear.color.CGColor
layer.shadowColor = MaterialTheme.color.clear.base.CGColor
layer.shadowOffset = CGSizeMake(0, 0)
layer.shadowOpacity = 0
layer.shadowRadius = 0
......
//
// Copyright (C) 2015 GraphKit, Inc. <http://graphkit.io> and other GraphKit contributors.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program located at the root of the software package
// in a file called LICENSE. If not, see <http://www.gnu.org/licenses/>.
//
import UIKit
// font
public extension MaterialTheme {
public struct font {
public static var pointSize: CGFloat = 16
}
}
\ No newline at end of file
......@@ -33,7 +33,7 @@ public extension MaterialTheme.view {
public static let height: CGFloat = UIScreen.mainScreen().bounds.height
// layer
public static let shadowColor: UIColor = MaterialTheme.blueGrey.darken4
public static let shadowColor: UIColor = MaterialTheme.color.blueGrey.darken4
public static let shadowOffset: CGSize = CGSizeMake(0.2, 0.2)
public static let shadowOpacity: Float = 0.5
public static let shadowRadius: CGFloat = 1
......@@ -41,13 +41,14 @@ public extension MaterialTheme.view {
public static let masksToBounds: Bool = false
// color
public static let backgroudColor: UIColor = MaterialTheme.white.color
public static let backgroudColor: UIColor = MaterialTheme.color.white.base
// interaction
public static let userInteractionEnabled: Bool = true
// image
public static let imageGravity: String = kCAGravityCenter
public static let imageContentsRect: CGRect = CGRectMake(0, 0, 1, 1)
}
// navigation
......@@ -67,7 +68,7 @@ public extension MaterialTheme.navigation {
public static let masksToBounds: Bool = MaterialTheme.view.masksToBounds
// color
public static let backgroudColor: UIColor = MaterialTheme.blue.accent2
public static let backgroudColor: UIColor = MaterialTheme.color.blue.accent2
public static let lightContentStatusBar: Bool = true
// interaction
......@@ -75,5 +76,6 @@ public extension MaterialTheme.navigation {
// image
public static let imageGravity: String = MaterialTheme.view.imageGravity
public static let imageContentsRect: CGRect = MaterialTheme.view.imageContentsRect
}
......@@ -19,6 +19,7 @@
import UIKit
public class MaterialView: UIView {
/**
:name: image
*/
......@@ -33,7 +34,16 @@ public class MaterialView: UIView {
*/
public var imageGravity: String? {
didSet {
layer.contentsGravity = nil == imageGravity ? MaterialTheme.navigation.imageGravity : imageGravity!
layer.contentsGravity = nil == imageGravity ? MaterialTheme.view.imageGravity : imageGravity!
}
}
/**
:name: imageContentsRect
*/
public var imageContentsRect: CGRect? {
didSet {
layer.contentsRect = nil == imageContentsRect ? MaterialTheme.view.imageContentsRect : imageContentsRect!
}
}
......@@ -142,6 +152,9 @@ public class MaterialView: UIView {
*/
public override init(frame: CGRect) {
super.init(frame: frame)
prepareView()
prepareLayer()
prepareBounds()
}
/**
......@@ -150,8 +163,8 @@ public class MaterialView: UIView {
public convenience init() {
self.init(frame: CGRectMake(MaterialTheme.view.x, MaterialTheme.view.y, MaterialTheme.view.width, MaterialTheme.view.height))
prepareView()
prepareFrame()
prepareLayer()
prepareBounds()
}
/**
......@@ -163,13 +176,13 @@ public class MaterialView: UIView {
}
/**
:name: prepareFrame
:name: prepareBounds
*/
internal func prepareFrame() {
x = frame.origin.x
y = frame.origin.y
width = frame.size.width
height = frame.size.height
internal func prepareBounds() {
self.x = frame.origin.x
self.y = frame.origin.y
self.width = frame.size.width
self.height = frame.size.height
}
/**
......
......@@ -29,13 +29,31 @@ public class NavigationBarView: MaterialView {
}
/**
:name: imageGravity
*/
public override var imageGravity: String? {
didSet {
layer.contentsGravity = nil == imageGravity ? MaterialTheme.navigation.imageGravity : imageGravity!
}
}
/**
:name: imageContentsRect
*/
public override var imageContentsRect: CGRect? {
didSet {
layer.contentsRect = nil == imageContentsRect ? MaterialTheme.navigation.imageContentsRect : imageContentsRect!
}
}
/**
:name: init
*/
public convenience init() {
self.init(frame: CGRectMake(MaterialTheme.navigation.x, MaterialTheme.navigation.y, MaterialTheme.navigation.width, MaterialTheme.navigation.height))
prepareView()
prepareFrame()
prepareLayer()
prepareBounds()
}
/**
......
......@@ -25,8 +25,8 @@ public class RaisedButton : MaterialButton {
internal override func prepareView() {
super.prepareView()
titleLabel!.font = Roboto.regular
setTitleColor(MaterialTheme.white.color, forState: .Normal)
backgroundColor = MaterialTheme.blue.accent2
setTitleColor(MaterialTheme.color.white.base, forState: .Normal)
backgroundColor = MaterialTheme.color.blue.accent2
contentEdgeInsets = UIEdgeInsetsMake(MaterialTheme.buttonVerticalInset, MaterialTheme.buttonHorizontalInset, MaterialTheme.buttonVerticalInset, MaterialTheme.buttonHorizontalInset)
}
......
......@@ -23,7 +23,7 @@ public struct Roboto {
:name: thin
*/
public static var thin: UIFont {
return thinWithSize(MaterialTheme.textFontSize)
return thinWithSize(MaterialTheme.font.pointSize)
}
/**
......@@ -40,7 +40,7 @@ public struct Roboto {
:name: light
*/
public static var light: UIFont {
return lightWithSize(MaterialTheme.textFontSize)
return lightWithSize(MaterialTheme.font.pointSize)
}
/**
......@@ -57,7 +57,7 @@ public struct Roboto {
:name: regular
*/
public static var regular: UIFont {
return regularWithSize(MaterialTheme.textFontSize)
return regularWithSize(MaterialTheme.font.pointSize)
}
/**
......@@ -74,7 +74,7 @@ public struct Roboto {
:name: medium
*/
public static var medium: UIFont {
return mediumWithSize(MaterialTheme.textFontSize)
return mediumWithSize(MaterialTheme.font.pointSize)
}
/**
......@@ -91,7 +91,7 @@ public struct Roboto {
:name: bold
*/
public static var bold: UIFont {
return boldWithSize(MaterialTheme.textFontSize)
return boldWithSize(MaterialTheme.font.pointSize)
}
/**
......
......@@ -136,7 +136,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
public static var hideStatusBar: Bool = true
public static var horizontalThreshold: CGFloat = defaultOptions.threshold
public static var verticalThreshold: CGFloat = defaultOptions.threshold
public static var backdropBackgroundColor: UIColor = MaterialTheme.black.color
public static var backdropBackgroundColor: UIColor = MaterialTheme.color.black.base
public static var animationDuration: CGFloat = defaultOptions.defaultAnimationDuration
public static var leftBezelWidth: CGFloat = defaultOptions.bezelWidth
public static var leftViewContainerWidth: CGFloat = defaultOptions.containerWidth
......@@ -1242,7 +1242,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
//
private func prepareMainContainer() {
mainViewContainer = UIView(frame: view.bounds)
mainViewContainer!.backgroundColor = MaterialTheme.clear.color
mainViewContainer!.backgroundColor = MaterialTheme.color.clear.base
mainViewContainer!.autoresizingMask = [.FlexibleHeight, .FlexibleWidth]
view.addSubview(mainViewContainer!)
}
......@@ -1301,7 +1301,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
b.origin.x = originX
b.origin.y = originY
viewContainer = UIView(frame: b)
viewContainer!.backgroundColor = MaterialTheme.clear.color
viewContainer!.backgroundColor = MaterialTheme.color.clear.base
viewContainer!.autoresizingMask = .FlexibleHeight
view.addSubview(viewContainer!)
}
......
......@@ -62,7 +62,7 @@ public class TextView: UITextView {
p.font = font
p.textAlignment = textAlignment
p.numberOfLines = 0
p.backgroundColor = MaterialTheme.clear.color
p.backgroundColor = MaterialTheme.color.clear.base
addSubview(p)
updateLabelConstraints()
textViewTextDidChange()
......@@ -124,7 +124,7 @@ public class TextView: UITextView {
// label needs to be added to the view
// hierarchy before setting insets
textContainerInset = UIEdgeInsetsMake(16, 16, 16, 16)
backgroundColor = MaterialTheme.clear.color
backgroundColor = MaterialTheme.color.clear.base
NSNotificationCenter.defaultCenter().addObserver(self, selector: "textViewTextDidChange", name: UITextViewTextDidChangeNotification, object: nil)
updateLabelConstraints()
}
......
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