Commit d01fc27f by Daniel Dahan

development: added NavigationViewController base

parent 2d5ca9d5
......@@ -15,6 +15,8 @@
65B965871B8BEEC60055B139 /* SideNavigationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65B965861B8BEEC60055B139 /* SideNavigationViewController.swift */; };
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 /* NavigationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 962F3E521BACA68C0004B8AD /* NavigationViewController.swift */; };
962F3E541BACA7FB0004B8AD /* NavigationViewController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 962F3E521BACA68C0004B8AD /* NavigationViewController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
963832421B88DFD80015F710 /* MaterialKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 963832361B88DFD80015F710 /* MaterialKit.framework */; };
9638325A1B88E31A0015F710 /* MaterialKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832581B88E31A0015F710 /* MaterialKitTests.swift */; };
963832691B88E5BF0015F710 /* Capture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9638325E1B88E5BF0015F710 /* Capture.swift */; };
......@@ -64,6 +66,7 @@
65B965861B8BEEC60055B139 /* SideNavigationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SideNavigationViewController.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 /* NavigationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationViewController.swift; sourceTree = "<group>"; };
963832361B88DFD80015F710 /* MaterialKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MaterialKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
963832411B88DFD80015F710 /* MaterialKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MaterialKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
963832541B88E30F0015F710 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
......@@ -108,17 +111,11 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
65B965731B8A58E60055B139 /* View */ = {
isa = PBXGroup;
children = (
);
name = View;
sourceTree = "<group>";
};
65B965851B8BEEB00055B139 /* Navigation */ = {
isa = PBXGroup;
children = (
65B965861B8BEEC60055B139 /* SideNavigationViewController.swift */,
962F3E521BACA68C0004B8AD /* NavigationViewController.swift */,
);
name = Navigation;
sourceTree = "<group>";
......@@ -149,7 +146,6 @@
96B57D4C1B90AF6A00DE7BBB /* Theme */,
9AAC38521B89553800FE6B2D /* Font */,
963832861B8907FE0015F710 /* Layout */,
65B965731B8A58E60055B139 /* View */,
65B965851B8BEEB00055B139 /* Navigation */,
963832761B88E8990015F710 /* Text */,
963832751B88E87B0015F710 /* Button */,
......@@ -276,6 +272,7 @@
657CD02D1B8EE0D3008C0029 /* MaterialButton.swift in Headers */,
96C910ED1B95804B00E7CE5C /* MaterialTheme.swift in Headers */,
657CD02F1B8EE0D3008C0029 /* ImageCardView.swift in Headers */,
962F3E541BACA7FB0004B8AD /* NavigationViewController.swift in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -386,6 +383,7 @@
963832691B88E5BF0015F710 /* Capture.swift in Sources */,
9A94D10B1B8A485C00F586A5 /* ImageCardView.swift in Sources */,
96B57D4E1B90AF7D00DE7BBB /* MaterialTheme.swift in Sources */,
962F3E531BACA68C0004B8AD /* NavigationViewController.swift in Sources */,
9638326B1B88E5BF0015F710 /* FabButton.swift in Sources */,
9A94D1091B8A3F5100F586A5 /* MaterialCardView.swift in Sources */,
65B965871B8BEEC60055B139 /* SideNavigationViewController.swift in Sources */,
......
//
// 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
public class NavigationViewController: UIViewController {
//
// :name: titleLabel
//
public var titleLabel: UILabel? {
didSet {
if let v = titleLabel {
view.addSubview(v)
}
}
}
/**
:name: leftButton
*/
public var leftButton: FlatButton? {
didSet {
if let v = leftButton {
view.addSubview(v)
}
}
}
/**
:name: rightButton
*/
public var rightButton: FlatButton? {
didSet {
if let v = rightButton {
view.addSubview(v)
}
}
}
/**
:name: init
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
/**
:name: init
*/
public init() {
super.init(nibName: nil, bundle: nil)
}
//
// :name: viewDidLoad
//
public override func viewDidLoad() {
super.viewDidLoad()
prepareView()
}
/**
:name: viewWillAppear
*/
public override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
}
/**
:name: viewDidDisappear
*/
public override func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)
}
//
// :name: prepareView
//
private func prepareView() {
view.translatesAutoresizingMaskIntoConstraints = false
view.layer.shadowColor = MaterialTheme.blueGrey.darken4.CGColor
view.layer.shadowOffset = CGSizeMake(0.2, 0.2)
view.layer.shadowOpacity = 0.5
view.layer.shadowRadius = 1
view.clipsToBounds = false
}
}
\ 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