Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
c52f057b
Commit
c52f057b
authored
Mar 28, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated example TabBar projects
parent
b2810a19
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
36 deletions
+19
-36
Examples/Programmatic/BottomNavigationController/BottomNavigationController.xcodeproj/project.pbxproj
+0
-6
Examples/Programmatic/BottomNavigationController/BottomNavigationController/AppDelegate.swift
+5
-9
Examples/Programmatic/TabBar/TabBar.xcodeproj/project.pbxproj
+4
-6
Examples/Storyboards/TabBar/TabBar.xcodeproj/project.pbxproj
+4
-6
Examples/Storyboards/TabBar/TabBar/Base.lproj/Main.storyboard
+1
-1
Examples/Storyboards/TabBar/TabBar/ViewController.swift
+5
-5
Sources/BottomNavigationController.swift
+0
-3
No files found.
Examples/Programmatic/BottomNavigationController/BottomNavigationController.xcodeproj/project.pbxproj
View file @
c52f057b
...
...
@@ -13,8 +13,6 @@
96162C391CA7064900E3A235
/* LaunchScreen.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96162C371CA7064900E3A235
/* LaunchScreen.storyboard */
;
};
96162C451CA7083000E3A235
/* PhotoViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96162C441CA7083000E3A235
/* PhotoViewController.swift */
;
};
96162C471CA708B000E3A235
/* LibraryViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96162C461CA708B000E3A235
/* LibraryViewController.swift */
;
};
96FBE3A91CA9AD02001E2932
/* Material.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96FBE3A81CA9AD01001E2932
/* Material.framework */
;
};
96FBE3AA1CA9AD02001E2932
/* Material.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96FBE3A81CA9AD01001E2932
/* Material.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
...
...
@@ -24,7 +22,6 @@
dstPath
=
""
;
dstSubfolderSpec
=
10
;
files
=
(
96FBE3AA1CA9AD02001E2932
/* Material.framework in Embed Frameworks */
,
);
name
=
"Embed Frameworks"
;
runOnlyForDeploymentPostprocessing
=
0
;
...
...
@@ -40,7 +37,6 @@
96162C3A1CA7064900E3A235
/* Info.plist */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.plist.xml
;
path
=
Info.plist
;
sourceTree
=
"<group>"
;
};
96162C441CA7083000E3A235
/* PhotoViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
PhotoViewController.swift
;
sourceTree
=
"<group>"
;
};
96162C461CA708B000E3A235
/* LibraryViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
LibraryViewController.swift
;
sourceTree
=
"<group>"
;
};
96FBE3A81CA9AD01001E2932
/* 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 */
/* Begin PBXFrameworksBuildPhase section */
...
...
@@ -48,7 +44,6 @@
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
96FBE3A91CA9AD02001E2932
/* Material.framework in Frameworks */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
@@ -58,7 +53,6 @@
96162C221CA7064900E3A235
=
{
isa
=
PBXGroup
;
children
=
(
96FBE3A81CA9AD01001E2932
/* Material.framework */
,
96162C2D1CA7064900E3A235
/* BottomNavigationController */
,
96162C2C1CA7064900E3A235
/* Products */
,
);
...
...
Examples/Programmatic/BottomNavigationController/BottomNavigationController/AppDelegate.swift
View file @
c52f057b
...
...
@@ -35,15 +35,13 @@ import Material
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
,
UITabBarControllerDelegate
{
var
window
:
UIWindow
?
var
bottomNavigationController
:
BottomNavigationController
?
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
bottomNavigationController
=
BottomNavigationController
()
bottomNavigationController
!.
selectedIndex
=
0
bottomNavigationController
!.
tabBar
.
tintColor
=
MaterialColor
.
teal
.
base
bottomNavigationController
!.
tabBar
.
backgroundColor
=
MaterialColor
.
grey
.
darken4
bottomNavigationController
!.
delegate
=
self
let
bottomNavigationController
:
BottomNavigationController
=
BottomNavigationController
()
bottomNavigationController
.
viewControllers
=
[
VideoViewController
(),
PhotoViewController
(),
LibraryViewController
()]
bottomNavigationController
.
selectedIndex
=
0
bottomNavigationController
.
tabBar
.
tintColor
=
MaterialColor
.
teal
.
base
bottomNavigationController
.
tabBar
.
backgroundColor
=
MaterialColor
.
grey
.
darken4
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
...
...
@@ -68,8 +66,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UITabBarControllerDelegat
func
applicationDidBecomeActive
(
application
:
UIApplication
)
{
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
bottomNavigationController
!.
viewControllers
=
[
VideoViewController
(),
PhotoViewController
(),
LibraryViewController
()]
}
func
applicationWillTerminate
(
application
:
UIApplication
)
{
...
...
Examples/Programmatic/TabBar/TabBar.xcodeproj/project.pbxproj
View file @
c52f057b
...
...
@@ -10,7 +10,6 @@
96FBE3941CA9AB46001E2932
/* AppDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96FBE38E1CA9AB46001E2932
/* AppDelegate.swift */
;
};
96FBE3951CA9AB46001E2932
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96FBE38F1CA9AB46001E2932
/* Assets.xcassets */
;
};
96FBE3961CA9AB46001E2932
/* LaunchScreen.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96FBE3901CA9AB46001E2932
/* LaunchScreen.storyboard */
;
};
96FBE3971CA9AB46001E2932
/* Info.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96FBE3921CA9AB46001E2932
/* Info.plist */
;
};
96FBE3981CA9AB46001E2932
/* ViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96FBE3931CA9AB46001E2932
/* ViewController.swift */
;
};
/* End PBXBuildFile section */
...
...
@@ -136,7 +135,6 @@
files
=
(
96FBE3951CA9AB46001E2932
/* Assets.xcassets in Resources */
,
96FBE3961CA9AB46001E2932
/* LaunchScreen.storyboard in Resources */
,
96FBE3971CA9AB46001E2932
/* Info.plist in Resources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
@@ -253,9 +251,9 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
INFOPLIST_FILE
=
BottomNavigationBar/Info.plist
;
INFOPLIST_FILE
=
"$(SRCROOT)/TabBar/Info.plist"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.
BottomNavigation
Bar
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.
Tab
Bar
;
PRODUCT_NAME
=
TabBar
;
};
name
=
Debug
;
...
...
@@ -264,9 +262,9 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
INFOPLIST_FILE
=
BottomNavigationBar/Info.plist
;
INFOPLIST_FILE
=
"$(SRCROOT)/TabBar/Info.plist"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.
BottomNavigation
Bar
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.
Tab
Bar
;
PRODUCT_NAME
=
TabBar
;
};
name
=
Release
;
...
...
Examples/Storyboards/TabBar/TabBar.xcodeproj/project.pbxproj
View file @
c52f057b
...
...
@@ -11,7 +11,6 @@
96FBE3A31CA9ABAF001E2932
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96FBE39B1CA9ABAF001E2932
/* Assets.xcassets */
;
};
96FBE3A41CA9ABAF001E2932
/* LaunchScreen.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96FBE39C1CA9ABAF001E2932
/* LaunchScreen.storyboard */
;
};
96FBE3A51CA9ABAF001E2932
/* Main.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96FBE39E1CA9ABAF001E2932
/* Main.storyboard */
;
};
96FBE3A61CA9ABAF001E2932
/* Info.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96FBE3A01CA9ABAF001E2932
/* Info.plist */
;
};
96FBE3A71CA9ABAF001E2932
/* ViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96FBE3A11CA9ABAF001E2932
/* ViewController.swift */
;
};
/* End PBXBuildFile section */
...
...
@@ -137,7 +136,6 @@
isa
=
PBXResourcesBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
96FBE3A61CA9ABAF001E2932
/* Info.plist in Resources */
,
96FBE3A51CA9ABAF001E2932
/* Main.storyboard in Resources */
,
96FBE3A31CA9ABAF001E2932
/* Assets.xcassets in Resources */
,
96FBE3A41CA9ABAF001E2932
/* LaunchScreen.storyboard in Resources */
,
...
...
@@ -265,9 +263,9 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
INFOPLIST_FILE
=
BottomNavigationBar/Info.plist
;
INFOPLIST_FILE
=
"$(SRCROOT)/TabBar/Info.plist"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.
BottomNavigation
Bar
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.
Tab
Bar
;
PRODUCT_NAME
=
TabBar
;
};
name
=
Debug
;
...
...
@@ -276,9 +274,9 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
INFOPLIST_FILE
=
BottomNavigationBar/Info.plist
;
INFOPLIST_FILE
=
"$(SRCROOT)/TabBar/Info.plist"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.
BottomNavigation
Bar
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.
Tab
Bar
;
PRODUCT_NAME
=
TabBar
;
};
name
=
Release
;
...
...
Examples/Storyboards/TabBar/TabBar/Base.lproj/Main.storyboard
View file @
c52f057b
...
...
@@ -35,7 +35,7 @@
</constraints>
</view>
<connections>
<outlet
property=
"
bottomNavigationBar"
destination=
"sMP-AS-Zl9"
id=
"sTP-Ix-Cds
"
/>
<outlet
property=
"
tabBar"
destination=
"sMP-AS-Zl9"
id=
"zaC-4Z-zf1
"
/>
</connections>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"dkx-z0-nzr"
sceneMemberID=
"firstResponder"
/>
...
...
Examples/Storyboards/TabBar/TabBar/ViewController.swift
View file @
c52f057b
...
...
@@ -33,7 +33,7 @@ import Material
class
ViewController
:
UIViewController
{
@IBOutlet
weak
var
bottomNavigationBar
:
BottomNavigation
Bar
!
@IBOutlet
weak
var
tabBar
:
Tab
Bar
!
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -49,10 +49,10 @@ class ViewController: UIViewController {
libraryItem
.
setTitleColor
(
MaterialColor
.
grey
.
base
,
forState
:
.
Normal
)
libraryItem
.
setTitleColor
(
MaterialColor
.
teal
.
base
,
forState
:
.
Selected
)
bottomNavigation
Bar
.
setItems
([
videoItem
,
photoItem
,
libraryItem
],
animated
:
true
)
bottomNavigation
Bar
.
tintColor
=
MaterialColor
.
teal
.
base
// Sets the image color when highlighted.
bottomNavigation
Bar
.
itemPositioning
=
.
Automatic
// Sets the alignment of the UITabBarItems.
bottomNavigation
Bar
.
selectedItem
=
videoItem
tab
Bar
.
setItems
([
videoItem
,
photoItem
,
libraryItem
],
animated
:
true
)
tab
Bar
.
tintColor
=
MaterialColor
.
teal
.
base
// Sets the image color when highlighted.
tab
Bar
.
itemPositioning
=
.
Automatic
// Sets the alignment of the UITabBarItems.
tab
Bar
.
selectedItem
=
videoItem
}
}
...
...
Sources/BottomNavigationController.swift
View file @
c52f057b
...
...
@@ -130,9 +130,6 @@ public class BottomNavigationController : UITabBarController, UITabBarController
/// Handles transitions when tabBarItems are pressed.
public
func
tabBarController
(
tabBarController
:
UITabBarController
,
animationControllerForTransitionFromViewController
fromVC
:
UIViewController
,
toViewController
toVC
:
UIViewController
)
->
UIViewControllerAnimatedTransitioning
?
{
// if 1 < tabBarController.viewControllers?.count {
// return nil
// }
return
.
Fade
==
transitionAnimation
?
BottomNavigationFadeAnimatedTransitioning
()
:
nil
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment