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
5108d65a
Unverified
Commit
5108d65a
authored
Sep 19, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: updated BottomNavigationController example
parent
18e10652
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
395 additions
and
43 deletions
+395
-43
Examples/Programmatic/BottomNavigationController/BottomNavigationController.xcodeproj/project.pbxproj
+39
-4
Examples/Programmatic/BottomNavigationController/BottomNavigationController/AppBottomNavigationController.swift
+60
-0
Examples/Programmatic/BottomNavigationController/BottomNavigationController/AppDelegate.swift
+34
-11
Examples/Programmatic/BottomNavigationController/BottomNavigationController/AudioViewController.swift
+50
-0
Examples/Programmatic/BottomNavigationController/BottomNavigationController/PhotoViewController.swift
+50
-0
Examples/Programmatic/BottomNavigationController/BottomNavigationController/RemindersViewController.swift
+50
-0
Examples/Programmatic/BottomNavigationController/BottomNavigationController/SearchViewController.swift
+50
-0
Examples/Programmatic/BottomNavigationController/BottomNavigationController/VideoViewController.swift
+50
-0
Examples/Programmatic/BottomNavigationController/BottomNavigationController/ViewController.swift
+0
-25
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController.xcodeproj/project.pbxproj
+2
-3
Sources/iOS/BottomNavigationController.swift
+10
-0
No files found.
Examples/Programmatic/BottomNavigationController/BottomNavigationController.xcodeproj/project.pbxproj
View file @
5108d65a
...
...
@@ -8,18 +8,41 @@
/* Begin PBXBuildFile section */
96784F921D9021530061C06C
/* AppDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784F911D9021530061C06C
/* AppDelegate.swift */
;
};
96784F941D9021530061C06C
/*
ViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784F931D9021530061C06C
/*
ViewController.swift */
;
};
96784F941D9021530061C06C
/*
PhotoViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784F931D9021530061C06C
/* Photo
ViewController.swift */
;
};
96784F991D9021530061C06C
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784F981D9021530061C06C
/* Assets.xcassets */
;
};
96784F9C1D9021530061C06C
/* LaunchScreen.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784F9A1D9021530061C06C
/* LaunchScreen.storyboard */
;
};
96784FC41D9067240061C06C
/* AppBottomNavigationController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FC31D9067240061C06C
/* AppBottomNavigationController.swift */
;
};
96784FCA1D9068DD0061C06C
/* VideoViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FC91D9068DD0061C06C
/* VideoViewController.swift */
;
};
96784FCC1D9069370061C06C
/* AudioViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FCB1D9069370061C06C
/* AudioViewController.swift */
;
};
96784FCE1D90695C0061C06C
/* RemindersViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FCD1D90695C0061C06C
/* RemindersViewController.swift */
;
};
96784FD01D9069B20061C06C
/* SearchViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FCF1D9069B20061C06C
/* SearchViewController.swift */
;
};
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
96784FC81D9068610061C06C
/* Embed Frameworks */
=
{
isa
=
PBXCopyFilesBuildPhase
;
buildActionMask
=
2147483647
;
dstPath
=
""
;
dstSubfolderSpec
=
10
;
files
=
(
);
name
=
"Embed Frameworks"
;
runOnlyForDeploymentPostprocessing
=
0
;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
96784F8E1D9021530061C06C
/* BottomNavigationController.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
BottomNavigationController.app
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
96784F911D9021530061C06C
/* AppDelegate.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AppDelegate.swift
;
sourceTree
=
"<group>"
;
};
96784F931D9021530061C06C
/*
ViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ViewController.swift
;
sourceTree
=
"<group>"
;
};
96784F931D9021530061C06C
/*
PhotoViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Photo
ViewController.swift
;
sourceTree
=
"<group>"
;
};
96784F981D9021530061C06C
/* Assets.xcassets */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder.assetcatalog
;
path
=
Assets.xcassets
;
sourceTree
=
"<group>"
;
};
96784F9B1D9021530061C06C
/* Base */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.storyboard
;
name
=
Base
;
path
=
Base.lproj/LaunchScreen.storyboard
;
sourceTree
=
"<group>"
;
};
96784F9D1D9021530061C06C
/* Info.plist */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.plist.xml
;
path
=
Info.plist
;
sourceTree
=
"<group>"
;
};
96784FC31D9067240061C06C
/* AppBottomNavigationController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AppBottomNavigationController.swift
;
sourceTree
=
"<group>"
;
};
96784FC91D9068DD0061C06C
/* VideoViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
VideoViewController.swift
;
sourceTree
=
"<group>"
;
};
96784FCB1D9069370061C06C
/* AudioViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AudioViewController.swift
;
sourceTree
=
"<group>"
;
};
96784FCD1D90695C0061C06C
/* RemindersViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RemindersViewController.swift
;
sourceTree
=
"<group>"
;
};
96784FCF1D9069B20061C06C
/* SearchViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SearchViewController.swift
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
...
...
@@ -53,7 +76,12 @@
isa
=
PBXGroup
;
children
=
(
96784F911D9021530061C06C
/* AppDelegate.swift */
,
96784F931D9021530061C06C
/* ViewController.swift */
,
96784FC31D9067240061C06C
/* AppBottomNavigationController.swift */
,
96784F931D9021530061C06C
/* PhotoViewController.swift */
,
96784FC91D9068DD0061C06C
/* VideoViewController.swift */
,
96784FCB1D9069370061C06C
/* AudioViewController.swift */
,
96784FCD1D90695C0061C06C
/* RemindersViewController.swift */
,
96784FCF1D9069B20061C06C
/* SearchViewController.swift */
,
96784F981D9021530061C06C
/* Assets.xcassets */
,
96784F9A1D9021530061C06C
/* LaunchScreen.storyboard */
,
96784F9D1D9021530061C06C
/* Info.plist */
,
...
...
@@ -71,6 +99,7 @@
96784F8A1D9021530061C06C
/* Sources */
,
96784F8B1D9021530061C06C
/* Frameworks */
,
96784F8C1D9021530061C06C
/* Resources */
,
96784FC81D9068610061C06C
/* Embed Frameworks */
,
);
buildRules
=
(
);
...
...
@@ -132,8 +161,13 @@
isa
=
PBXSourcesBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
96784F941D9021530061C06C
/* ViewController.swift in Sources */
,
96784F941D9021530061C06C
/* PhotoViewController.swift in Sources */
,
96784FD01D9069B20061C06C
/* SearchViewController.swift in Sources */
,
96784FCA1D9068DD0061C06C
/* VideoViewController.swift in Sources */
,
96784FCE1D90695C0061C06C
/* RemindersViewController.swift in Sources */
,
96784FC41D9067240061C06C
/* AppBottomNavigationController.swift in Sources */
,
96784F921D9021530061C06C
/* AppDelegate.swift in Sources */
,
96784FCC1D9069370061C06C
/* AudioViewController.swift in Sources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
@@ -287,6 +321,7 @@
96784FA21D9021530061C06C
/* Release */
,
);
defaultConfigurationIsVisible
=
0
;
defaultConfigurationName
=
Release
;
};
/* End XCConfigurationList section */
};
...
...
Examples/Programmatic/BottomNavigationController/BottomNavigationController/AppBottomNavigationController.swift
0 → 100644
View file @
5108d65a
/*
* Copyright (C) 2015 - 2016, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.io>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of CosmicMind nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import
UIKit
import
Material
class
AppBottomNavigationController
:
BottomNavigationController
{
open
override
func
prepare
()
{
super
.
prepare
()
prepareTabBar
()
}
func
tabBarController
(
_
tabBarController
:
UITabBarController
,
shouldSelectViewController
viewController
:
UIViewController
)
->
Bool
{
// if let _ = viewController as? PhotoBarController {
// let vc = PhotoSnackbarController()
// vc.modalTransitionStyle = .coverVertical
// present(vc, animated: true, completion: nil)
// return false
// } else if let _ = viewController as? SearchBarController {
// let vc = SearchSnackbarController()
// vc.modalTransitionStyle = .crossDissolve
// present(vc, animated: true, completion: nil)
// return false
// }
return
true
}
/// Prepares the tabBar.
private
func
prepareTabBar
()
{
tabBar
.
depthPreset
=
.
none
tabBar
.
divider
.
color
=
Color
.
grey
.
lighten3
}
}
Examples/Programmatic/BottomNavigationController/BottomNavigationController/AppDelegate.swift
View file @
5108d65a
//
// AppDelegate.swift
// BottomNavigationController
//
// Created by Daniel Dahan on 2016-09-19.
// Copyright © 2016 CosmicMind. All rights reserved.
//
/*
* Copyright (C) 2015 - 2016, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.io>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of CosmicMind nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import
UIKit
import
Material
@UIApplicationMain
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
{
var
window
:
UIWindow
?
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplicationLaunchOptionsKey
:
Any
]?)
->
Bool
{
// Override point for customization after application launch.
return
true
func
applicationDidFinishLaunching
(
_
application
:
UIApplication
)
{
window
=
UIWindow
(
frame
:
Device
.
bounds
)
window
!.
rootViewController
=
AppBottomNavigationController
(
viewControllers
:
[
PhotoViewController
(),
VideoViewController
(),
AudioViewController
(),
RemindersViewController
(),
SearchViewController
()])
window
!.
makeKeyAndVisible
()
}
func
applicationWillResignActive
(
_
application
:
UIApplication
)
{
...
...
Examples/Programmatic/BottomNavigationController/BottomNavigationController/AudioViewController.swift
0 → 100644
View file @
5108d65a
/*
* Copyright (C) 2015 - 2016, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.io>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of CosmicMind nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import
UIKit
import
Material
class
AudioViewController
:
UIViewController
{
convenience
init
()
{
self
.
init
(
nibName
:
nil
,
bundle
:
nil
)
prepareTabBarItem
()
}
/// Prepare tabBarItem.
private
func
prepareTabBarItem
()
{
tabBarItem
.
image
=
Icon
.
cm
.
audioLibrary
?
.
tintWithColor
(
color
:
Color
.
blueGrey
.
base
)?
.
withRenderingMode
(
.
alwaysOriginal
)
tabBarItem
.
selectedImage
=
Icon
.
cm
.
audioLibrary
?
.
tintWithColor
(
color
:
Color
.
blue
.
base
)?
.
withRenderingMode
(
.
alwaysOriginal
)
}
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
grey
.
lighten5
}
}
Examples/Programmatic/BottomNavigationController/BottomNavigationController/PhotoViewController.swift
0 → 100644
View file @
5108d65a
/*
* Copyright (C) 2015 - 2016, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.io>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of CosmicMind nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import
UIKit
import
Material
class
PhotoViewController
:
UIViewController
{
convenience
init
()
{
self
.
init
(
nibName
:
nil
,
bundle
:
nil
)
prepareTabBarItem
()
}
/// Prepare tabBarItem.
private
func
prepareTabBarItem
()
{
tabBarItem
.
image
=
Icon
.
cm
.
photoCamera
?
.
tintWithColor
(
color
:
Color
.
blueGrey
.
base
)?
.
withRenderingMode
(
.
alwaysOriginal
)
tabBarItem
.
selectedImage
=
Icon
.
cm
.
photoCamera
?
.
tintWithColor
(
color
:
Color
.
blue
.
base
)?
.
withRenderingMode
(
.
alwaysOriginal
)
}
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
grey
.
lighten5
}
}
Examples/Programmatic/BottomNavigationController/BottomNavigationController/RemindersViewController.swift
0 → 100644
View file @
5108d65a
/*
* Copyright (C) 2015 - 2016, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.io>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of CosmicMind nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import
UIKit
import
Material
class
RemindersViewController
:
UIViewController
{
convenience
init
()
{
self
.
init
(
nibName
:
nil
,
bundle
:
nil
)
prepareTabBarItem
()
}
/// Prepare tabBarItem.
private
func
prepareTabBarItem
()
{
tabBarItem
.
image
=
Icon
.
cm
.
bell
?
.
tintWithColor
(
color
:
Color
.
blueGrey
.
base
)?
.
withRenderingMode
(
.
alwaysOriginal
)
tabBarItem
.
selectedImage
=
Icon
.
cm
.
bell
?
.
tintWithColor
(
color
:
Color
.
blue
.
base
)?
.
withRenderingMode
(
.
alwaysOriginal
)
}
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
grey
.
lighten5
}
}
Examples/Programmatic/BottomNavigationController/BottomNavigationController/SearchViewController.swift
0 → 100644
View file @
5108d65a
/*
* Copyright (C) 2015 - 2016, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.io>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of CosmicMind nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import
UIKit
import
Material
class
SearchViewController
:
UIViewController
{
convenience
init
()
{
self
.
init
(
nibName
:
nil
,
bundle
:
nil
)
prepareTabBarItem
()
}
/// Prepare tabBarItem.
private
func
prepareTabBarItem
()
{
tabBarItem
.
image
=
Icon
.
cm
.
search
?
.
tintWithColor
(
color
:
Color
.
blueGrey
.
base
)?
.
withRenderingMode
(
.
alwaysOriginal
)
tabBarItem
.
selectedImage
=
Icon
.
cm
.
search
?
.
tintWithColor
(
color
:
Color
.
blue
.
base
)?
.
withRenderingMode
(
.
alwaysOriginal
)
}
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
grey
.
lighten5
}
}
Examples/Programmatic/BottomNavigationController/BottomNavigationController/VideoViewController.swift
0 → 100644
View file @
5108d65a
/*
* Copyright (C) 2015 - 2016, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.io>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of CosmicMind nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import
UIKit
import
Material
class
VideoViewController
:
UIViewController
{
convenience
init
()
{
self
.
init
(
nibName
:
nil
,
bundle
:
nil
)
prepareTabBarItem
()
}
/// Prepare tabBarItem.
private
func
prepareTabBarItem
()
{
tabBarItem
.
image
=
Icon
.
cm
.
videocam
?
.
tintWithColor
(
color
:
Color
.
blueGrey
.
base
)?
.
withRenderingMode
(
.
alwaysOriginal
)
tabBarItem
.
selectedImage
=
Icon
.
cm
.
videocam
?
.
tintWithColor
(
color
:
Color
.
blue
.
base
)?
.
withRenderingMode
(
.
alwaysOriginal
)
}
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
grey
.
lighten5
}
}
Examples/Programmatic/BottomNavigationController/BottomNavigationController/ViewController.swift
deleted
100644 → 0
View file @
18e10652
//
// ViewController.swift
// BottomNavigationController
//
// Created by Daniel Dahan on 2016-09-19.
// Copyright © 2016 CosmicMind. All rights reserved.
//
import
UIKit
class
ViewController
:
UIViewController
{
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
// Do any additional setup after loading the view, typically from a nib.
}
override
func
didReceiveMemoryWarning
()
{
super
.
didReceiveMemoryWarning
()
// Dispose of any resources that can be recreated.
}
}
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController.xcodeproj/project.pbxproj
View file @
5108d65a
...
...
@@ -119,7 +119,6 @@
TargetAttributes
=
{
96784F511D901F7C0061C06C
=
{
CreatedOnToolsVersion
=
8.0
;
DevelopmentTeam
=
9Z76XCNLGL
;
ProvisioningStyle
=
Automatic
;
};
};
...
...
@@ -279,7 +278,7 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
9Z76XCNLGL
;
DEVELOPMENT_TEAM
=
""
;
INFOPLIST_FILE
=
PhotoLibraryController/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.PhotoLibraryController
;
...
...
@@ -292,7 +291,7 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
9Z76XCNLGL
;
DEVELOPMENT_TEAM
=
""
;
INFOPLIST_FILE
=
PhotoLibraryController/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.PhotoLibraryController
;
...
...
Sources/iOS/BottomNavigationController.swift
View file @
5108d65a
...
...
@@ -80,10 +80,20 @@ open class BottomNavigationController: UITabBarController, UITabBarControllerDel
super
.
init
(
nibName
:
nibNameOrNil
,
bundle
:
nibBundleOrNil
)
}
/// An initializer that accepts no parameters.
public
init
()
{
super
.
init
(
nibName
:
nil
,
bundle
:
nil
)
}
/**
An initializer that initializes the object an Array of UIViewControllers.
- Parameter viewControllers: An Array of UIViewControllers.
*/
public
init
(
viewControllers
:
[
UIViewController
])
{
super
.
init
(
nibName
:
nil
,
bundle
:
nil
)
self
.
viewControllers
=
viewControllers
}
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
prepare
()
...
...
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