Commit 349dd849 by Daniel Dahan

moved TabBarController back to TabsController

parent c8369cae
Pod::Spec.new do |s|
s.name = 'Material'
s.version = '2.9.2'
s.version = '2.9.3'
s.license = 'BSD-3-Clause'
s.summary = 'A Material Design library for creating beautiful applications.'
s.homepage = 'http://materialswift.com'
......
......@@ -197,14 +197,14 @@
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, ); }; };
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, ); }; };
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, ); }; };
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, ); }; };
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 */
/* Begin PBXFileReference section */
......@@ -332,7 +332,7 @@
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>"; };
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>"; };
96F1DC871D654FDF0025F925 /* Material+CALayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Material+CALayer.swift"; sourceTree = "<group>"; };
/* End PBXFileReference section */
......@@ -563,7 +563,7 @@
isa = PBXGroup;
children = (
96BCB79A1CB40DC500C806FE /* TabBar.swift */,
96E09DC71F2287E50000B121 /* TabBarController.swift */,
96E09DC71F2287E50000B121 /* TabsController.swift */,
);
name = Tab;
sourceTree = "<group>";
......@@ -923,7 +923,7 @@
9685D5AF1F0F04CB00AFEB79 /* CardCollectionViewCell.swift in Headers */,
9685D5B01F0F04CB00AFEB79 /* CardCollectionViewController.swift in Headers */,
9685D5B11F0F04CB00AFEB79 /* Material+MotionAnimation.swift in Headers */,
96F1A5531F24F17A001D8CAF /* TabBarController.swift in Headers */,
96F1A5531F24F17A001D8CAF /* TabsController.swift in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -1072,7 +1072,7 @@
9615278E1F393C0E00E8B2AC /* MotionAnimationFillMode.swift in Sources */,
9615278C1F393C0E00E8B2AC /* Motion+UIView.swift in Sources */,
961527961F393C0E00E8B2AC /* MotionCoordinateSpace.swift in Sources */,
96E09DC81F2287E50000B121 /* TabBarController.swift in Sources */,
96E09DC81F2287E50000B121 /* TabsController.swift in Sources */,
961154CC1F32A7B100A78D74 /* ChipBar.swift in Sources */,
961527941F393C0E00E8B2AC /* MotionContext.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
- [x] Icons
- [x] TextField
- [X] Snackbar
- [x] TabBar
- [x] Tabs
- [x] Chips
- [X] SearchBar
- [x] NavigationController
- [x] NavigationDrawer
......@@ -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)
## 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
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.9.2</string>
<string>2.9.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -54,16 +54,16 @@ extension UIViewController {
extension UIViewController {
/**
A convenience property that provides access to the TabBarController.
This is the recommended method of accessing the TabBarController
A convenience property that provides access to the TabsController.
This is the recommended method of accessing the TabsController
through child UIViewControllers.
*/
public var tabsController: TabBarController? {
public var tabsController: TabsController? {
return traverseViewControllerHierarchyForClassType()
}
}
open class TabBarController: TransitionController {
open class TabsController: TransitionController {
/**
A Display value to indicate whether or not to
display the rootViewController to the full view
......@@ -92,7 +92,7 @@ open class TabBarController: TransitionController {
/// A reference to the currently selected view controller index value.
@IBInspectable
open var selectedIndex = 0
open fileprivate(set) var selectedIndex = 0
/// The tabBar alignment.
open var tabBarAlignment = TabBarAlignment.bottom {
......@@ -139,7 +139,7 @@ open class TabBarController: TransitionController {
super.layoutSubviews()
layoutTabBar()
layoutContainer()
layoutViewController(at: selectedIndex)
layoutRootViewController()
}
open override func prepare() {
......@@ -153,14 +153,14 @@ open class TabBarController: TransitionController {
}
}
internal extension TabBarController {
internal extension TabsController {
override func prepareRootViewController() {
rootViewController = viewControllers[selectedIndex]
}
}
fileprivate extension TabBarController {
fileprivate extension TabsController {
/// Prepares all the view controllers.
func prepareViewControllers() {
for i in 0..<viewControllers.count {
......@@ -212,7 +212,7 @@ fileprivate extension TabBarController {
}
}
fileprivate extension TabBarController {
fileprivate extension TabsController {
/// Layout the container.
func layoutContainer() {
switch displayStyle {
......@@ -243,13 +243,13 @@ fileprivate extension TabBarController {
tabBar.width = view.width
}
/// Layout the view controller at the given index.
func layoutViewController(at index: Int) {
/// Layout the rootViewController.
func layoutRootViewController() {
rootViewController.view.frame = container.bounds
}
}
fileprivate extension TabBarController {
fileprivate extension TabsController {
/**
Removes a given view controller from the childViewControllers array.
- Parameter at index: An Int for the view controller position.
......@@ -261,7 +261,7 @@ fileprivate extension TabBarController {
}
}
fileprivate extension TabBarController {
fileprivate extension TabsController {
/**
Handles the tabItem.
- Parameter tabItem: A TabItem.
......
......@@ -145,7 +145,7 @@ open class TransitionController: UIViewController {
let tvc = viewController
tvc.view.isHidden = false
tvc.view.frame = view.bounds
tvc.view.frame = container.bounds
tvc.motionModalTransitionType = motionTransitionType
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