Commit 85254ab8 by Daniel Dahan

updated TabBar to BottomTabBar

parent aa4f01ee
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
location = "group:Programmatic/SearchBarController/SearchBarController.xcodeproj"> location = "group:Programmatic/SearchBarController/SearchBarController.xcodeproj">
</FileRef> </FileRef>
<FileRef <FileRef
location = "group:Programmatic/TabBar/TabBar.xcodeproj"> location = "group:Programmatic/BottomTabBar/BottomTabBar.xcodeproj">
</FileRef> </FileRef>
<FileRef <FileRef
location = "group:Programmatic/BottomNavigationController/BottomNavigationController.xcodeproj"> location = "group:Programmatic/BottomNavigationController/BottomNavigationController.xcodeproj">
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
location = "group:Storyboards/Toolbar/Toolbar.xcodeproj"> location = "group:Storyboards/Toolbar/Toolbar.xcodeproj">
</FileRef> </FileRef>
<FileRef <FileRef
location = "group:Storyboards/TabBar/TabBar.xcodeproj"> location = "group:Storyboards/BottomTabBar/BottomTabBar.xcodeproj">
</FileRef> </FileRef>
<FileRef <FileRef
location = "group:Storyboards/SideNavigationController/SideNavigationController.xcodeproj"> location = "group:Storyboards/SideNavigationController/SideNavigationController.xcodeproj">
......
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
9663F94E1C7A74EA00AF0965 /* AppLeftViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F94D1C7A74EA00AF0965 /* AppLeftViewController.swift */; }; 9663F94E1C7A74EA00AF0965 /* AppLeftViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F94D1C7A74EA00AF0965 /* AppLeftViewController.swift */; };
9663F9521C7A751D00AF0965 /* ItemViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F9511C7A751D00AF0965 /* ItemViewController.swift */; }; 9663F9521C7A751D00AF0965 /* ItemViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F9511C7A751D00AF0965 /* ItemViewController.swift */; };
96CC08881C7FEBD60034FF84 /* RecipesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96CC08871C7FEBD60034FF84 /* RecipesViewController.swift */; }; 96CC08881C7FEBD60034FF84 /* RecipesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96CC08871C7FEBD60034FF84 /* RecipesViewController.swift */; };
96FBE38A1CA8D931001E2932 /* Material.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96FBE3891CA8D931001E2932 /* Material.framework */; };
96FBE38B1CA8D931001E2932 /* Material.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 96FBE3891CA8D931001E2932 /* Material.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
...@@ -30,7 +28,6 @@ ...@@ -30,7 +28,6 @@
dstPath = ""; dstPath = "";
dstSubfolderSpec = 10; dstSubfolderSpec = 10;
files = ( files = (
96FBE38B1CA8D931001E2932 /* Material.framework in Embed Frameworks */,
); );
name = "Embed Frameworks"; name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
...@@ -52,7 +49,6 @@ ...@@ -52,7 +49,6 @@
9663F94D1C7A74EA00AF0965 /* AppLeftViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppLeftViewController.swift; sourceTree = "<group>"; }; 9663F94D1C7A74EA00AF0965 /* AppLeftViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppLeftViewController.swift; sourceTree = "<group>"; };
9663F9511C7A751D00AF0965 /* ItemViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemViewController.swift; sourceTree = "<group>"; }; 9663F9511C7A751D00AF0965 /* ItemViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemViewController.swift; sourceTree = "<group>"; };
96CC08871C7FEBD60034FF84 /* RecipesViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipesViewController.swift; sourceTree = "<group>"; }; 96CC08871C7FEBD60034FF84 /* RecipesViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecipesViewController.swift; sourceTree = "<group>"; };
96FBE3891CA8D931001E2932 /* Material.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = Material.framework; path = "/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-hbpnflxhoouqxebjcyhbbhqyesjd/Build/Products/Debug-iphonesimulator/Material.framework"; sourceTree = "<absolute>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
...@@ -60,7 +56,6 @@ ...@@ -60,7 +56,6 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
96FBE38A1CA8D931001E2932 /* Material.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -70,7 +65,6 @@ ...@@ -70,7 +65,6 @@
9663F9251C7A744500AF0965 = { 9663F9251C7A744500AF0965 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
96FBE3891CA8D931001E2932 /* Material.framework */,
9663F9301C7A744600AF0965 /* App */, 9663F9301C7A744600AF0965 /* App */,
9663F92F1C7A744600AF0965 /* Products */, 9663F92F1C7A744600AF0965 /* Products */,
); );
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
96FBE3941CA9AB46001E2932 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96FBE38E1CA9AB46001E2932 /* AppDelegate.swift */; }; 96FBE3BE1CAA15DF001E2932 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96FBE3B81CAA15DF001E2932 /* AppDelegate.swift */; };
96FBE3951CA9AB46001E2932 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96FBE38F1CA9AB46001E2932 /* Assets.xcassets */; }; 96FBE3BF1CAA15DF001E2932 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96FBE3B91CAA15DF001E2932 /* Assets.xcassets */; };
96FBE3961CA9AB46001E2932 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 96FBE3901CA9AB46001E2932 /* LaunchScreen.storyboard */; }; 96FBE3C01CAA15DF001E2932 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 96FBE3BA1CAA15DF001E2932 /* LaunchScreen.storyboard */; };
96FBE3981CA9AB46001E2932 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96FBE3931CA9AB46001E2932 /* ViewController.swift */; }; 96FBE3C21CAA15DF001E2932 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96FBE3BD1CAA15DF001E2932 /* ViewController.swift */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
...@@ -27,12 +27,12 @@ ...@@ -27,12 +27,12 @@
/* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
96A5366F1CA3A5450069B3CC /* TabBar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TabBar.app; sourceTree = BUILT_PRODUCTS_DIR; }; 96A5366F1CA3A5450069B3CC /* BottomTabBar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BottomTabBar.app; sourceTree = BUILT_PRODUCTS_DIR; };
96FBE38E1CA9AB46001E2932 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; 96FBE3B81CAA15DF001E2932 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
96FBE38F1CA9AB46001E2932 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 96FBE3B91CAA15DF001E2932 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
96FBE3911CA9AB46001E2932 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 96FBE3BB1CAA15DF001E2932 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
96FBE3921CA9AB46001E2932 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 96FBE3BC1CAA15DF001E2932 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
96FBE3931CA9AB46001E2932 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; }; 96FBE3BD1CAA15DF001E2932 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
96A536661CA3A5450069B3CC = { 96A536661CA3A5450069B3CC = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
96FBE38D1CA9AB46001E2932 /* TabBar */, 96FBE3B71CAA15DF001E2932 /* BottomTabBar */,
96A536701CA3A5450069B3CC /* Products */, 96A536701CA3A5450069B3CC /* Products */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -57,29 +57,29 @@ ...@@ -57,29 +57,29 @@
96A536701CA3A5450069B3CC /* Products */ = { 96A536701CA3A5450069B3CC /* Products */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
96A5366F1CA3A5450069B3CC /* TabBar.app */, 96A5366F1CA3A5450069B3CC /* BottomTabBar.app */,
); );
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
96FBE38D1CA9AB46001E2932 /* TabBar */ = { 96FBE3B71CAA15DF001E2932 /* BottomTabBar */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
96FBE38E1CA9AB46001E2932 /* AppDelegate.swift */, 96FBE3B81CAA15DF001E2932 /* AppDelegate.swift */,
96FBE3931CA9AB46001E2932 /* ViewController.swift */, 96FBE3BD1CAA15DF001E2932 /* ViewController.swift */,
96FBE38F1CA9AB46001E2932 /* Assets.xcassets */, 96FBE3B91CAA15DF001E2932 /* Assets.xcassets */,
96FBE3901CA9AB46001E2932 /* LaunchScreen.storyboard */, 96FBE3BA1CAA15DF001E2932 /* LaunchScreen.storyboard */,
96FBE3921CA9AB46001E2932 /* Info.plist */, 96FBE3BC1CAA15DF001E2932 /* Info.plist */,
); );
path = TabBar; path = BottomTabBar;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXNativeTarget section */ /* Begin PBXNativeTarget section */
96A5366E1CA3A5450069B3CC /* TabBar */ = { 96A5366E1CA3A5450069B3CC /* BottomTabBar */ = {
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = 96A536811CA3A5450069B3CC /* Build configuration list for PBXNativeTarget "TabBar" */; buildConfigurationList = 96A536811CA3A5450069B3CC /* Build configuration list for PBXNativeTarget "BottomTabBar" */;
buildPhases = ( buildPhases = (
96A5366B1CA3A5450069B3CC /* Sources */, 96A5366B1CA3A5450069B3CC /* Sources */,
96A5366C1CA3A5450069B3CC /* Frameworks */, 96A5366C1CA3A5450069B3CC /* Frameworks */,
...@@ -90,9 +90,9 @@ ...@@ -90,9 +90,9 @@
); );
dependencies = ( dependencies = (
); );
name = TabBar; name = BottomTabBar;
productName = BottomNavigationBar; productName = BottomNavigationBar;
productReference = 96A5366F1CA3A5450069B3CC /* TabBar.app */; productReference = 96A5366F1CA3A5450069B3CC /* BottomTabBar.app */;
productType = "com.apple.product-type.application"; productType = "com.apple.product-type.application";
}; };
/* End PBXNativeTarget section */ /* End PBXNativeTarget section */
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
}; };
}; };
}; };
buildConfigurationList = 96A5366A1CA3A5450069B3CC /* Build configuration list for PBXProject "TabBar" */; buildConfigurationList = 96A5366A1CA3A5450069B3CC /* Build configuration list for PBXProject "BottomTabBar" */;
compatibilityVersion = "Xcode 3.2"; compatibilityVersion = "Xcode 3.2";
developmentRegion = English; developmentRegion = English;
hasScannedForEncodings = 0; hasScannedForEncodings = 0;
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
projectDirPath = ""; projectDirPath = "";
projectRoot = ""; projectRoot = "";
targets = ( targets = (
96A5366E1CA3A5450069B3CC /* TabBar */, 96A5366E1CA3A5450069B3CC /* BottomTabBar */,
); );
}; };
/* End PBXProject section */ /* End PBXProject section */
...@@ -133,8 +133,8 @@ ...@@ -133,8 +133,8 @@
isa = PBXResourcesBuildPhase; isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
96FBE3951CA9AB46001E2932 /* Assets.xcassets in Resources */, 96FBE3BF1CAA15DF001E2932 /* Assets.xcassets in Resources */,
96FBE3961CA9AB46001E2932 /* LaunchScreen.storyboard in Resources */, 96FBE3C01CAA15DF001E2932 /* LaunchScreen.storyboard in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -145,18 +145,18 @@ ...@@ -145,18 +145,18 @@
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
96FBE3981CA9AB46001E2932 /* ViewController.swift in Sources */, 96FBE3C21CAA15DF001E2932 /* ViewController.swift in Sources */,
96FBE3941CA9AB46001E2932 /* AppDelegate.swift in Sources */, 96FBE3BE1CAA15DF001E2932 /* AppDelegate.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
/* End PBXSourcesBuildPhase section */ /* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */ /* Begin PBXVariantGroup section */
96FBE3901CA9AB46001E2932 /* LaunchScreen.storyboard */ = { 96FBE3BA1CAA15DF001E2932 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup; isa = PBXVariantGroup;
children = ( children = (
96FBE3911CA9AB46001E2932 /* Base */, 96FBE3BB1CAA15DF001E2932 /* Base */,
); );
name = LaunchScreen.storyboard; name = LaunchScreen.storyboard;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -251,10 +251,10 @@ ...@@ -251,10 +251,10 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = "$(SRCROOT)/TabBar/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/BottomTabBar/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.TabBar; PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.BottomTabBar;
PRODUCT_NAME = TabBar; PRODUCT_NAME = BottomTabBar;
}; };
name = Debug; name = Debug;
}; };
...@@ -262,17 +262,17 @@ ...@@ -262,17 +262,17 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = "$(SRCROOT)/TabBar/Info.plist"; INFOPLIST_FILE = "$(SRCROOT)/BottomTabBar/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.TabBar; PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.BottomTabBar;
PRODUCT_NAME = TabBar; PRODUCT_NAME = BottomTabBar;
}; };
name = Release; name = Release;
}; };
/* End XCBuildConfiguration section */ /* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */ /* Begin XCConfigurationList section */
96A5366A1CA3A5450069B3CC /* Build configuration list for PBXProject "TabBar" */ = { 96A5366A1CA3A5450069B3CC /* Build configuration list for PBXProject "BottomTabBar" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
96A5367F1CA3A5450069B3CC /* Debug */, 96A5367F1CA3A5450069B3CC /* Debug */,
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
defaultConfigurationIsVisible = 0; defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
96A536811CA3A5450069B3CC /* Build configuration list for PBXNativeTarget "TabBar" */ = { 96A536811CA3A5450069B3CC /* Build configuration list for PBXNativeTarget "BottomTabBar" */ = {
isa = XCConfigurationList; isa = XCConfigurationList;
buildConfigurations = ( buildConfigurations = (
96A536821CA3A5450069B3CC /* Debug */, 96A536821CA3A5450069B3CC /* Debug */,
......
...@@ -32,8 +32,8 @@ import UIKit ...@@ -32,8 +32,8 @@ import UIKit
import Material import Material
class ViewController: UIViewController { class ViewController: UIViewController {
/// Reference for TabBar. /// Reference for BottomTabBar.
private var tabBar: TabBar! private var bottomTabBar: BottomTabBar!
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -48,10 +48,10 @@ class ViewController: UIViewController { ...@@ -48,10 +48,10 @@ class ViewController: UIViewController {
/// Prepare tabBar. /// Prepare tabBar.
private func prepareTabBar() { private func prepareTabBar() {
tabBar = TabBar() bottomTabBar = BottomTabBar()
// tabBar.autoLayoutToSuperview // Set to false if you want to handle the layout yourself. // tabBar.autoLayoutToSuperview // Set to false if you want to handle the layout yourself.
tabBar.backgroundColor = MaterialColor.grey.darken4 bottomTabBar.backgroundColor = MaterialColor.grey.darken4
view.addSubview(tabBar) view.addSubview(bottomTabBar)
let videoItem: UITabBarItem = UITabBarItem(title: "Video", image: MaterialIcon.videocam, selectedImage: nil) let videoItem: UITabBarItem = UITabBarItem(title: "Video", image: MaterialIcon.videocam, selectedImage: nil)
videoItem.setTitleColor(MaterialColor.grey.base, forState: .Normal) videoItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
...@@ -65,9 +65,9 @@ class ViewController: UIViewController { ...@@ -65,9 +65,9 @@ class ViewController: UIViewController {
libraryItem.setTitleColor(MaterialColor.grey.base, forState: .Normal) libraryItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
libraryItem.setTitleColor(MaterialColor.teal.base, forState: .Selected) libraryItem.setTitleColor(MaterialColor.teal.base, forState: .Selected)
tabBar.setItems([videoItem, photoItem, libraryItem], animated: true) bottomTabBar.setItems([videoItem, photoItem, libraryItem], animated: true)
tabBar.tintColor = MaterialColor.teal.base // Sets the image color when highlighted. bottomTabBar.tintColor = MaterialColor.teal.base // Sets the image color when highlighted.
tabBar.itemPositioning = .Automatic // Sets the alignment of the UITabBarItems. bottomTabBar.itemPositioning = .Automatic // Sets the alignment of the UITabBarItems.
tabBar.selectedItem = videoItem bottomTabBar.selectedItem = videoItem
} }
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<!--View Controller--> <!--View Controller-->
<scene sceneID="tne-QT-ifu"> <scene sceneID="tne-QT-ifu">
<objects> <objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="TabBar" customModuleProvider="target" sceneMemberID="viewController"> <viewController id="BYZ-38-t0r" customClass="ViewController" customModule="BottomTabBar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides> <layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<tabBar contentMode="scaleToFill" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sMP-AS-Zl9" customClass="TabBar" customModule="Material"> <tabBar contentMode="scaleToFill" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sMP-AS-Zl9" customClass="BottomTabBar" customModule="Material">
<rect key="frame" x="0.0" y="551" width="600" height="49"/> <rect key="frame" x="0.0" y="551" width="600" height="49"/>
<items/> <items/>
<userDefinedRuntimeAttributes> <userDefinedRuntimeAttributes>
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</constraints> </constraints>
</view> </view>
<connections> <connections>
<outlet property="tabBar" destination="sMP-AS-Zl9" id="zaC-4Z-zf1"/> <outlet property="bottomTabBar" destination="sMP-AS-Zl9" id="lTV-UP-u6I"/>
</connections> </connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
......
...@@ -33,7 +33,7 @@ import Material ...@@ -33,7 +33,7 @@ import Material
class ViewController: UIViewController { class ViewController: UIViewController {
@IBOutlet weak var tabBar: TabBar! @IBOutlet weak var bottomTabBar: BottomTabBar!
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -49,10 +49,10 @@ class ViewController: UIViewController { ...@@ -49,10 +49,10 @@ class ViewController: UIViewController {
libraryItem.setTitleColor(MaterialColor.grey.base, forState: .Normal) libraryItem.setTitleColor(MaterialColor.grey.base, forState: .Normal)
libraryItem.setTitleColor(MaterialColor.teal.base, forState: .Selected) libraryItem.setTitleColor(MaterialColor.teal.base, forState: .Selected)
tabBar.setItems([videoItem, photoItem, libraryItem], animated: true) bottomTabBar.setItems([videoItem, photoItem, libraryItem], animated: true)
tabBar.tintColor = MaterialColor.teal.base // Sets the image color when highlighted. bottomTabBar.tintColor = MaterialColor.teal.base // Sets the image color when highlighted.
tabBar.itemPositioning = .Automatic // Sets the alignment of the UITabBarItems. bottomTabBar.itemPositioning = .Automatic // Sets the alignment of the UITabBarItems.
tabBar.selectedItem = videoItem bottomTabBar.selectedItem = videoItem
} }
} }
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
960B23521C38490D00E96216 /* TextView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 960B23451C38480E00E96216 /* TextView.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 960B23521C38490D00E96216 /* TextView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 960B23451C38480E00E96216 /* TextView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96162BFB1CA6E89F00E3A235 /* MaterialPulseAnimation.swift in Headers */ = {isa = PBXBuildFile; fileRef = 968F17211C94B10B008CA3F6 /* MaterialPulseAnimation.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96162BFB1CA6E89F00E3A235 /* MaterialPulseAnimation.swift in Headers */ = {isa = PBXBuildFile; fileRef = 968F17211C94B10B008CA3F6 /* MaterialPulseAnimation.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96162BFC1CA6E89F00E3A235 /* NavigationItem.swift in Headers */ = {isa = PBXBuildFile; fileRef = 967887861C9775900037F6C9 /* NavigationItem.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96162BFC1CA6E89F00E3A235 /* NavigationItem.swift in Headers */ = {isa = PBXBuildFile; fileRef = 967887861C9775900037F6C9 /* NavigationItem.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96162BFD1CA6E89F00E3A235 /* TabBar.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96A536641CA3A2C80069B3CC /* TabBar.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96162BFD1CA6E89F00E3A235 /* BottomTabBar.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96A536641CA3A2C80069B3CC /* BottomTabBar.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96162BFF1CA6E89F00E3A235 /* BottomNavigationController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BAECE91CA3B8B90048037C /* BottomNavigationController.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96162BFF1CA6E89F00E3A235 /* BottomNavigationController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BAECE91CA3B8B90048037C /* BottomNavigationController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
9626C2DE1C795017007CA8E0 /* MenuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9626C2DD1C795017007CA8E0 /* MenuViewController.swift */; }; 9626C2DE1C795017007CA8E0 /* MenuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9626C2DD1C795017007CA8E0 /* MenuViewController.swift */; };
96334EF61C8B84660083986B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96334EF51C8B84660083986B /* Assets.xcassets */; }; 96334EF61C8B84660083986B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96334EF51C8B84660083986B /* Assets.xcassets */; };
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
968F171C1C9266D0008CA3F6 /* Toolbar.swift in Headers */ = {isa = PBXBuildFile; fileRef = 968F16F51C9260EC008CA3F6 /* Toolbar.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 968F171C1C9266D0008CA3F6 /* Toolbar.swift in Headers */ = {isa = PBXBuildFile; fileRef = 968F16F51C9260EC008CA3F6 /* Toolbar.swift */; settings = {ATTRIBUTES = (Public, ); }; };
968F171D1C9266D0008CA3F6 /* ToolbarController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 968F16F71C92612E008CA3F6 /* ToolbarController.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 968F171D1C9266D0008CA3F6 /* ToolbarController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 968F16F71C92612E008CA3F6 /* ToolbarController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
968F17221C94B10B008CA3F6 /* MaterialPulseAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968F17211C94B10B008CA3F6 /* MaterialPulseAnimation.swift */; }; 968F17221C94B10B008CA3F6 /* MaterialPulseAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 968F17211C94B10B008CA3F6 /* MaterialPulseAnimation.swift */; };
96A536651CA3A2C80069B3CC /* TabBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A536641CA3A2C80069B3CC /* TabBar.swift */; }; 96A536651CA3A2C80069B3CC /* BottomTabBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A536641CA3A2C80069B3CC /* BottomTabBar.swift */; };
96A71E911C6FBC2200C0C4AE /* MenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71E901C6FBC2200C0C4AE /* MenuView.swift */; }; 96A71E911C6FBC2200C0C4AE /* MenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96A71E901C6FBC2200C0C4AE /* MenuView.swift */; };
96A71EB81C6FCFA300C0C4AE /* Material+UIImage+Color.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96DBA7351C61198400844821 /* Material+UIImage+Color.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96A71EB81C6FCFA300C0C4AE /* Material+UIImage+Color.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96DBA7351C61198400844821 /* Material+UIImage+Color.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96A71EB91C6FCFA300C0C4AE /* Grid.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9656CD0B1C6BD33700EBCEF1 /* Grid.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96A71EB91C6FCFA300C0C4AE /* Grid.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9656CD0B1C6BD33700EBCEF1 /* Grid.swift */; settings = {ATTRIBUTES = (Public, ); }; };
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
968F16F51C9260EC008CA3F6 /* Toolbar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Toolbar.swift; sourceTree = "<group>"; }; 968F16F51C9260EC008CA3F6 /* Toolbar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Toolbar.swift; sourceTree = "<group>"; };
968F16F71C92612E008CA3F6 /* ToolbarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ToolbarController.swift; sourceTree = "<group>"; }; 968F16F71C92612E008CA3F6 /* ToolbarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ToolbarController.swift; sourceTree = "<group>"; };
968F17211C94B10B008CA3F6 /* MaterialPulseAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialPulseAnimation.swift; sourceTree = "<group>"; }; 968F17211C94B10B008CA3F6 /* MaterialPulseAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialPulseAnimation.swift; sourceTree = "<group>"; };
96A536641CA3A2C80069B3CC /* TabBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabBar.swift; sourceTree = "<group>"; }; 96A536641CA3A2C80069B3CC /* BottomTabBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BottomTabBar.swift; sourceTree = "<group>"; };
96A71E901C6FBC2200C0C4AE /* MenuView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MenuView.swift; sourceTree = "<group>"; }; 96A71E901C6FBC2200C0C4AE /* MenuView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MenuView.swift; sourceTree = "<group>"; };
96A71EC61C6FFF0500C0C4AE /* MaterialSwitch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialSwitch.swift; sourceTree = "<group>"; }; 96A71EC61C6FFF0500C0C4AE /* MaterialSwitch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialSwitch.swift; sourceTree = "<group>"; };
96A71EF51C71127100C0C4AE /* SearchBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchBar.swift; sourceTree = "<group>"; }; 96A71EF51C71127100C0C4AE /* SearchBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchBar.swift; sourceTree = "<group>"; };
...@@ -360,6 +360,7 @@ ...@@ -360,6 +360,7 @@
96A536631CA3A2400069B3CC /* BottomNavigation */ = { 96A536631CA3A2400069B3CC /* BottomNavigation */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
96A536641CA3A2C80069B3CC /* BottomTabBar.swift */,
96BAECE91CA3B8B90048037C /* BottomNavigationController.swift */, 96BAECE91CA3B8B90048037C /* BottomNavigationController.swift */,
); );
name = BottomNavigation; name = BottomNavigation;
...@@ -441,7 +442,6 @@ ...@@ -441,7 +442,6 @@
96CC08561C7E0EC00034FF84 /* ControlView */, 96CC08561C7E0EC00034FF84 /* ControlView */,
96D88C541C132A7700B91418 /* StatusBar */, 96D88C541C132A7700B91418 /* StatusBar */,
96F2F1B31C97A40600A5FE27 /* Toolbar */, 96F2F1B31C97A40600A5FE27 /* Toolbar */,
96FBE38C1CA9A93E001E2932 /* TabBar */,
9626C2DB1C794FBB007CA8E0 /* SearchBar */, 9626C2DB1C794FBB007CA8E0 /* SearchBar */,
9626C2DA1C794FA5007CA8E0 /* NavigationBar */, 9626C2DA1C794FA5007CA8E0 /* NavigationBar */,
9626C2DC1C794FE5007CA8E0 /* SideNavigation */, 9626C2DC1C794FE5007CA8E0 /* SideNavigation */,
...@@ -606,14 +606,6 @@ ...@@ -606,14 +606,6 @@
name = Toolbar; name = Toolbar;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
96FBE38C1CA9A93E001E2932 /* TabBar */ = {
isa = PBXGroup;
children = (
96A536641CA3A2C80069B3CC /* TabBar.swift */,
);
name = TabBar;
sourceTree = "<group>";
};
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */ /* Begin PBXHeadersBuildPhase section */
...@@ -691,7 +683,7 @@ ...@@ -691,7 +683,7 @@
968F171D1C9266D0008CA3F6 /* ToolbarController.swift in Headers */, 968F171D1C9266D0008CA3F6 /* ToolbarController.swift in Headers */,
96162BFB1CA6E89F00E3A235 /* MaterialPulseAnimation.swift in Headers */, 96162BFB1CA6E89F00E3A235 /* MaterialPulseAnimation.swift in Headers */,
96162BFC1CA6E89F00E3A235 /* NavigationItem.swift in Headers */, 96162BFC1CA6E89F00E3A235 /* NavigationItem.swift in Headers */,
96162BFD1CA6E89F00E3A235 /* TabBar.swift in Headers */, 96162BFD1CA6E89F00E3A235 /* BottomTabBar.swift in Headers */,
96162BFF1CA6E89F00E3A235 /* BottomNavigationController.swift in Headers */, 96162BFF1CA6E89F00E3A235 /* BottomNavigationController.swift in Headers */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
...@@ -855,7 +847,7 @@ ...@@ -855,7 +847,7 @@
96334EFA1C8B849A0083986B /* NavigationController.swift in Sources */, 96334EFA1C8B849A0083986B /* NavigationController.swift in Sources */,
96D88C301C1328D800B91418 /* MaterialEdgeInset.swift in Sources */, 96D88C301C1328D800B91418 /* MaterialEdgeInset.swift in Sources */,
96CC08A01C80CB180034FF84 /* MaterialSpacing.swift in Sources */, 96CC08A01C80CB180034FF84 /* MaterialSpacing.swift in Sources */,
96A536651CA3A2C80069B3CC /* TabBar.swift in Sources */, 96A536651CA3A2C80069B3CC /* BottomTabBar.swift in Sources */,
96D88C211C1328D800B91418 /* CaptureSession.swift in Sources */, 96D88C211C1328D800B91418 /* CaptureSession.swift in Sources */,
96442ADE1C28EF3700C3C574 /* MaterialTableViewCell.swift in Sources */, 96442ADE1C28EF3700C3C574 /* MaterialTableViewCell.swift in Sources */,
960B23271C383E5500E96216 /* Material+String.swift in Sources */, 960B23271C383E5500E96216 /* Material+String.swift in Sources */,
......
...@@ -38,7 +38,7 @@ public extension UITabBarItem { ...@@ -38,7 +38,7 @@ public extension UITabBarItem {
} }
@IBDesignable @IBDesignable
public class TabBar : UITabBar { public class BottomTabBar : UITabBar {
/// Automatically aligns the BottomNavigationBar to the superview. /// Automatically aligns the BottomNavigationBar to the superview.
public var autoLayoutToSuperview: Bool = true public var autoLayoutToSuperview: Bool = true
......
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