Commit 349dd849 by Daniel Dahan

moved TabBarController back to TabsController

parent c8369cae
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'Material' s.name = 'Material'
s.version = '2.9.2' s.version = '2.9.3'
s.license = 'BSD-3-Clause' s.license = 'BSD-3-Clause'
s.summary = 'A Material Design library for creating beautiful applications.' s.summary = 'A Material Design library for creating beautiful applications.'
s.homepage = 'http://materialswift.com' s.homepage = 'http://materialswift.com'
......
...@@ -197,14 +197,14 @@ ...@@ -197,14 +197,14 @@
96BFC1541E5E486F0075DE1F /* SpringAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 965532281E47E388005C2792 /* SpringAnimation.swift */; }; 96BFC1541E5E486F0075DE1F /* SpringAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 965532281E47E388005C2792 /* SpringAnimation.swift */; };
96BFC16F1E63C10A0075DE1F /* SpringAnimation.swift in Headers */ = {isa = PBXBuildFile; fileRef = 965532281E47E388005C2792 /* SpringAnimation.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96BFC16F1E63C10A0075DE1F /* SpringAnimation.swift in Headers */ = {isa = PBXBuildFile; fileRef = 965532281E47E388005C2792 /* SpringAnimation.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96D88C321C1328D800B91418 /* Material.h in Headers */ = {isa = PBXBuildFile; fileRef = 96D88C091C1328D800B91418 /* Material.h */; settings = {ATTRIBUTES = (Public, ); }; }; 96D88C321C1328D800B91418 /* Material.h in Headers */ = {isa = PBXBuildFile; fileRef = 96D88C091C1328D800B91418 /* Material.h */; settings = {ATTRIBUTES = (Public, ); }; };
96E09DC81F2287E50000B121 /* TabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96E09DC71F2287E50000B121 /* TabBarController.swift */; }; 96E09DC81F2287E50000B121 /* TabsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96E09DC71F2287E50000B121 /* TabsController.swift */; };
96E3C3951D3A1CC20086A024 /* IconButton.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9658F2161CD6FA4700B902C1 /* IconButton.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96E3C3951D3A1CC20086A024 /* IconButton.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9658F2161CD6FA4700B902C1 /* IconButton.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E3C3961D3A1CC20086A024 /* CollectionReusableView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 966ECF291CF4C20100BB0BDF /* CollectionReusableView.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96E3C3961D3A1CC20086A024 /* CollectionReusableView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 966ECF291CF4C20100BB0BDF /* CollectionReusableView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E3C3971D3A1CC20086A024 /* Material+UIView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96E3C3931D397AE90086A024 /* Material+UIView.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96E3C3971D3A1CC20086A024 /* Material+UIView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96E3C3931D397AE90086A024 /* Material+UIView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E3C3991D3A1CC20086A024 /* StatusBarController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 967A48181D0F425A00B8CEB7 /* StatusBarController.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96E3C3991D3A1CC20086A024 /* StatusBarController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 967A48181D0F425A00B8CEB7 /* StatusBarController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E3C39A1D3A1CC20086A024 /* ErrorTextField.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F18E71CD93E3E008927C5 /* ErrorTextField.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96E3C39A1D3A1CC20086A024 /* ErrorTextField.swift in Headers */ = {isa = PBXBuildFile; fileRef = 961F18E71CD93E3E008927C5 /* ErrorTextField.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96E3C39C1D3A1CC20086A024 /* Offset.swift in Headers */ = {isa = PBXBuildFile; fileRef = 968C99461D377849000074FF /* Offset.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96E3C39C1D3A1CC20086A024 /* Offset.swift in Headers */ = {isa = PBXBuildFile; fileRef = 968C99461D377849000074FF /* Offset.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96F1A5531F24F17A001D8CAF /* TabBarController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96E09DC71F2287E50000B121 /* TabBarController.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96F1A5531F24F17A001D8CAF /* TabsController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96E09DC71F2287E50000B121 /* TabsController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
...@@ -332,7 +332,7 @@ ...@@ -332,7 +332,7 @@
96D88BFC1C1328D800B91418 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 96D88BFC1C1328D800B91418 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
96D88BFD1C1328D800B91418 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; }; 96D88BFD1C1328D800B91418 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
96D88C091C1328D800B91418 /* Material.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Material.h; sourceTree = "<group>"; }; 96D88C091C1328D800B91418 /* Material.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Material.h; sourceTree = "<group>"; };
96E09DC71F2287E50000B121 /* TabBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabBarController.swift; sourceTree = "<group>"; }; 96E09DC71F2287E50000B121 /* TabsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabsController.swift; sourceTree = "<group>"; };
96E3C3931D397AE90086A024 /* Material+UIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Material+UIView.swift"; sourceTree = "<group>"; }; 96E3C3931D397AE90086A024 /* Material+UIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Material+UIView.swift"; sourceTree = "<group>"; };
96F1DC871D654FDF0025F925 /* Material+CALayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Material+CALayer.swift"; sourceTree = "<group>"; }; 96F1DC871D654FDF0025F925 /* Material+CALayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Material+CALayer.swift"; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
...@@ -563,7 +563,7 @@ ...@@ -563,7 +563,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
96BCB79A1CB40DC500C806FE /* TabBar.swift */, 96BCB79A1CB40DC500C806FE /* TabBar.swift */,
96E09DC71F2287E50000B121 /* TabBarController.swift */, 96E09DC71F2287E50000B121 /* TabsController.swift */,
); );
name = Tab; name = Tab;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -923,7 +923,7 @@ ...@@ -923,7 +923,7 @@
9685D5AF1F0F04CB00AFEB79 /* CardCollectionViewCell.swift in Headers */, 9685D5AF1F0F04CB00AFEB79 /* CardCollectionViewCell.swift in Headers */,
9685D5B01F0F04CB00AFEB79 /* CardCollectionViewController.swift in Headers */, 9685D5B01F0F04CB00AFEB79 /* CardCollectionViewController.swift in Headers */,
9685D5B11F0F04CB00AFEB79 /* Material+MotionAnimation.swift in Headers */, 9685D5B11F0F04CB00AFEB79 /* Material+MotionAnimation.swift in Headers */,
96F1A5531F24F17A001D8CAF /* TabBarController.swift in Headers */, 96F1A5531F24F17A001D8CAF /* TabsController.swift in Headers */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -1072,7 +1072,7 @@ ...@@ -1072,7 +1072,7 @@
9615278E1F393C0E00E8B2AC /* MotionAnimationFillMode.swift in Sources */, 9615278E1F393C0E00E8B2AC /* MotionAnimationFillMode.swift in Sources */,
9615278C1F393C0E00E8B2AC /* Motion+UIView.swift in Sources */, 9615278C1F393C0E00E8B2AC /* Motion+UIView.swift in Sources */,
961527961F393C0E00E8B2AC /* MotionCoordinateSpace.swift in Sources */, 961527961F393C0E00E8B2AC /* MotionCoordinateSpace.swift in Sources */,
96E09DC81F2287E50000B121 /* TabBarController.swift in Sources */, 96E09DC81F2287E50000B121 /* TabsController.swift in Sources */,
961154CC1F32A7B100A78D74 /* ChipBar.swift in Sources */, 961154CC1F32A7B100A78D74 /* ChipBar.swift in Sources */,
961527941F393C0E00E8B2AC /* MotionContext.swift in Sources */, 961527941F393C0E00E8B2AC /* MotionContext.swift in Sources */,
965689611F002F4C001C656D /* CardCollectionViewController.swift in Sources */, 965689611F002F4C001C656D /* CardCollectionViewController.swift in Sources */,
......
...@@ -34,7 +34,8 @@ Take a look at [Sample Projects](https://github.com/CosmicMind/Samples) to get y ...@@ -34,7 +34,8 @@ Take a look at [Sample Projects](https://github.com/CosmicMind/Samples) to get y
- [x] Icons - [x] Icons
- [x] TextField - [x] TextField
- [X] Snackbar - [X] Snackbar
- [x] TabBar - [x] Tabs
- [x] Chips
- [X] SearchBar - [X] SearchBar
- [x] NavigationController - [x] NavigationController
- [x] NavigationDrawer - [x] NavigationDrawer
...@@ -154,13 +155,13 @@ A SearchBar is a powerful navigation tool that allows for user's input with an i ...@@ -154,13 +155,13 @@ A SearchBar is a powerful navigation tool that allows for user's input with an i
* [SearchBar Sample](https://github.com/CosmicMind/Samples/tree/master/Projects/Programmatic/Search) * [SearchBar Sample](https://github.com/CosmicMind/Samples/tree/master/Projects/Programmatic/Search)
## TabBar ## Tabs
TabBar is a new component that links a customizable TabBar to a stack of view controllers making a powerful and visually pleasing component to have in any application. Tabs is a new component that links a customizable TabBar to a stack of view controllers making a powerful and visually pleasing component to have in any application.
![TabBar](http://www.cosmicmind.com/material/white/page-tab-bar-controller.gif) ![Tabs](http://www.cosmicmind.com/material/white/page-tab-bar-controller.gif)
* [TabBar Sample](https://github.com/CosmicMind/Samples/tree/master/Projects/Programmatic/TabBarController) * [Tabs Sample](https://github.com/CosmicMind/Samples/tree/master/Projects/Programmatic/TabsController)
## NavigationController ## NavigationController
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.9.2</string> <string>2.9.3</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -54,16 +54,16 @@ extension UIViewController { ...@@ -54,16 +54,16 @@ extension UIViewController {
extension UIViewController { extension UIViewController {
/** /**
A convenience property that provides access to the TabBarController. A convenience property that provides access to the TabsController.
This is the recommended method of accessing the TabBarController This is the recommended method of accessing the TabsController
through child UIViewControllers. through child UIViewControllers.
*/ */
public var tabsController: TabBarController? { public var tabsController: TabsController? {
return traverseViewControllerHierarchyForClassType() return traverseViewControllerHierarchyForClassType()
} }
} }
open class TabBarController: TransitionController { open class TabsController: TransitionController {
/** /**
A Display value to indicate whether or not to A Display value to indicate whether or not to
display the rootViewController to the full view display the rootViewController to the full view
...@@ -92,7 +92,7 @@ open class TabBarController: TransitionController { ...@@ -92,7 +92,7 @@ open class TabBarController: TransitionController {
/// A reference to the currently selected view controller index value. /// A reference to the currently selected view controller index value.
@IBInspectable @IBInspectable
open var selectedIndex = 0 open fileprivate(set) var selectedIndex = 0
/// The tabBar alignment. /// The tabBar alignment.
open var tabBarAlignment = TabBarAlignment.bottom { open var tabBarAlignment = TabBarAlignment.bottom {
...@@ -139,7 +139,7 @@ open class TabBarController: TransitionController { ...@@ -139,7 +139,7 @@ open class TabBarController: TransitionController {
super.layoutSubviews() super.layoutSubviews()
layoutTabBar() layoutTabBar()
layoutContainer() layoutContainer()
layoutViewController(at: selectedIndex) layoutRootViewController()
} }
open override func prepare() { open override func prepare() {
...@@ -153,14 +153,14 @@ open class TabBarController: TransitionController { ...@@ -153,14 +153,14 @@ open class TabBarController: TransitionController {
} }
} }
internal extension TabBarController { internal extension TabsController {
override func prepareRootViewController() { override func prepareRootViewController() {
rootViewController = viewControllers[selectedIndex] rootViewController = viewControllers[selectedIndex]
} }
} }
fileprivate extension TabBarController { fileprivate extension TabsController {
/// Prepares all the view controllers. /// Prepares all the view controllers.
func prepareViewControllers() { func prepareViewControllers() {
for i in 0..<viewControllers.count { for i in 0..<viewControllers.count {
...@@ -212,7 +212,7 @@ fileprivate extension TabBarController { ...@@ -212,7 +212,7 @@ fileprivate extension TabBarController {
} }
} }
fileprivate extension TabBarController { fileprivate extension TabsController {
/// Layout the container. /// Layout the container.
func layoutContainer() { func layoutContainer() {
switch displayStyle { switch displayStyle {
...@@ -243,13 +243,13 @@ fileprivate extension TabBarController { ...@@ -243,13 +243,13 @@ fileprivate extension TabBarController {
tabBar.width = view.width tabBar.width = view.width
} }
/// Layout the view controller at the given index. /// Layout the rootViewController.
func layoutViewController(at index: Int) { func layoutRootViewController() {
rootViewController.view.frame = container.bounds rootViewController.view.frame = container.bounds
} }
} }
fileprivate extension TabBarController { fileprivate extension TabsController {
/** /**
Removes a given view controller from the childViewControllers array. Removes a given view controller from the childViewControllers array.
- Parameter at index: An Int for the view controller position. - Parameter at index: An Int for the view controller position.
...@@ -261,7 +261,7 @@ fileprivate extension TabBarController { ...@@ -261,7 +261,7 @@ fileprivate extension TabBarController {
} }
} }
fileprivate extension TabBarController { fileprivate extension TabsController {
/** /**
Handles the tabItem. Handles the tabItem.
- Parameter tabItem: A TabItem. - Parameter tabItem: A TabItem.
......
...@@ -145,7 +145,7 @@ open class TransitionController: UIViewController { ...@@ -145,7 +145,7 @@ open class TransitionController: UIViewController {
let tvc = viewController let tvc = viewController
tvc.view.isHidden = false tvc.view.isHidden = false
tvc.view.frame = view.bounds tvc.view.frame = container.bounds
tvc.motionModalTransitionType = motionTransitionType tvc.motionModalTransitionType = motionTransitionType
view.isUserInteractionEnabled = false view.isUserInteractionEnabled = false
......
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