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
b864a98b
Commit
b864a98b
authored
Mar 26, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated last selector issues
parent
8d47964e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
17 deletions
+16
-17
Examples/Programmatic/App/App/AppDelegate.swift
+1
-1
Examples/Programmatic/BottomNavigationController/BottomNavigationController.xcodeproj/project.pbxproj
+2
-2
Examples/Programmatic/MenuView/MenuView/ViewController.swift
+3
-3
Examples/Storyboards/BottomNavigationBar/BottomNavigationBar.xcodeproj/project.pbxproj
+2
-2
Sources/CaptureView.swift
+3
-3
Sources/MaterialSwitch.swift
+3
-3
Sources/SideNavigationController.swift
+2
-3
No files found.
Examples/Programmatic/App/App/AppDelegate.swift
View file @
b864a98b
...
...
@@ -39,7 +39,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
let
bottomNavigationController
:
BottomNavigationController
=
BottomNavigationController
()
bottomNavigationController
.
viewControllers
=
[
App
MenuViewController
(
mainViewController
:
AppNavigationController
(
rootViewController
:
RecipesViewController
()
)),
VideoViewController
(),
PhotoViewController
()]
bottomNavigationController
.
viewControllers
=
[
App
NavigationController
(
rootViewController
:
RecipesViewController
(
)),
VideoViewController
(),
PhotoViewController
()]
bottomNavigationController
.
selectedIndex
=
0
bottomNavigationController
.
tabBar
.
tintColor
=
MaterialColor
.
lightBlue
.
base
bottomNavigationController
.
tabBar
.
backgroundColor
=
MaterialColor
.
grey
.
darken4
...
...
Examples/Programmatic/BottomNavigationController/BottomNavigationController.xcodeproj/project.pbxproj
View file @
b864a98b
...
...
@@ -220,7 +220,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
IPHONEOS_DEPLOYMENT_TARGET
=
9.2
;
IPHONEOS_DEPLOYMENT_TARGET
=
8.0
;
MTL_ENABLE_DEBUG_INFO
=
YES
;
ONLY_ACTIVE_ARCH
=
YES
;
SDKROOT
=
iphoneos
;
...
...
@@ -259,7 +259,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
IPHONEOS_DEPLOYMENT_TARGET
=
9.2
;
IPHONEOS_DEPLOYMENT_TARGET
=
8.0
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
iphoneos
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
...
...
Examples/Programmatic/MenuView/MenuView/ViewController.swift
View file @
b864a98b
...
...
@@ -104,7 +104,7 @@ class ViewController: UIViewController {
btn2
.
borderWidth
=
1
btn2
.
setImage
(
image
,
forState
:
.
Normal
)
btn2
.
setImage
(
image
,
forState
:
.
Highlighted
)
btn2
.
addTarget
(
self
,
action
:
#selector(
handleButton
(_:)
)
,
forControlEvents
:
.
TouchUpInside
)
btn2
.
addTarget
(
self
,
action
:
#selector(
handleButton
)
,
forControlEvents
:
.
TouchUpInside
)
menuView
.
addSubview
(
btn2
)
image
=
UIImage
(
named
:
"ic_photo_camera_white"
)?
.
imageWithRenderingMode
(
.
AlwaysTemplate
)
...
...
@@ -117,7 +117,7 @@ class ViewController: UIViewController {
btn3
.
borderWidth
=
1
btn3
.
setImage
(
image
,
forState
:
.
Normal
)
btn3
.
setImage
(
image
,
forState
:
.
Highlighted
)
btn3
.
addTarget
(
self
,
action
:
#selector(
handleButton
(_:)
)
,
forControlEvents
:
.
TouchUpInside
)
btn3
.
addTarget
(
self
,
action
:
#selector(
handleButton
)
,
forControlEvents
:
.
TouchUpInside
)
menuView
.
addSubview
(
btn3
)
image
=
UIImage
(
named
:
"ic_note_add_white"
)?
.
imageWithRenderingMode
(
.
AlwaysTemplate
)
...
...
@@ -130,7 +130,7 @@ class ViewController: UIViewController {
btn4
.
borderWidth
=
1
btn4
.
setImage
(
image
,
forState
:
.
Normal
)
btn4
.
setImage
(
image
,
forState
:
.
Highlighted
)
btn4
.
addTarget
(
self
,
action
:
#selector(
handleButton
(_:)
)
,
forControlEvents
:
.
TouchUpInside
)
btn4
.
addTarget
(
self
,
action
:
#selector(
handleButton
)
,
forControlEvents
:
.
TouchUpInside
)
menuView
.
addSubview
(
btn4
)
// Initialize the menu and setup the configuration options.
...
...
Examples/Storyboards/BottomNavigationBar/BottomNavigationBar.xcodeproj/project.pbxproj
View file @
b864a98b
...
...
@@ -212,7 +212,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
IPHONEOS_DEPLOYMENT_TARGET
=
9.2
;
IPHONEOS_DEPLOYMENT_TARGET
=
8.0
;
MTL_ENABLE_DEBUG_INFO
=
YES
;
ONLY_ACTIVE_ARCH
=
YES
;
SDKROOT
=
iphoneos
;
...
...
@@ -251,7 +251,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
IPHONEOS_DEPLOYMENT_TARGET
=
9.2
;
IPHONEOS_DEPLOYMENT_TARGET
=
8.0
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
iphoneos
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
...
...
Sources/CaptureView.swift
View file @
b864a98b
...
...
@@ -128,7 +128,7 @@ public class CaptureView : MaterialView, UIGestureRecognizerDelegate {
if
tapToFocusEnabled
{
tapToResetEnabled
=
true
prepareFocusLayer
()
prepareTapGesture
(
&
tapToFocusGesture
,
numberOfTapsRequired
:
1
,
numberOfTouchesRequired
:
1
,
selector
:
#selector(
handleTapToFocusGesture
(_:)
)
)
prepareTapGesture
(
&
tapToFocusGesture
,
numberOfTapsRequired
:
1
,
numberOfTouchesRequired
:
1
,
selector
:
#selector(
handleTapToFocusGesture
)
)
if
let
v
:
UITapGestureRecognizer
=
tapToExposeGesture
{
tapToFocusGesture
!.
requireGestureRecognizerToFail
(
v
)
}
...
...
@@ -148,7 +148,7 @@ public class CaptureView : MaterialView, UIGestureRecognizerDelegate {
if
tapToExposeEnabled
{
tapToResetEnabled
=
true
prepareExposureLayer
()
prepareTapGesture
(
&
tapToExposeGesture
,
numberOfTapsRequired
:
2
,
numberOfTouchesRequired
:
1
,
selector
:
#selector(
handleTapToExposeGesture
(_:)
)
)
prepareTapGesture
(
&
tapToExposeGesture
,
numberOfTapsRequired
:
2
,
numberOfTouchesRequired
:
1
,
selector
:
#selector(
handleTapToExposeGesture
)
)
if
let
v
:
UITapGestureRecognizer
=
tapToFocusGesture
{
v
.
requireGestureRecognizerToFail
(
tapToExposeGesture
!
)
}
...
...
@@ -167,7 +167,7 @@ public class CaptureView : MaterialView, UIGestureRecognizerDelegate {
didSet
{
if
tapToResetEnabled
{
prepareResetLayer
()
prepareTapGesture
(
&
tapToResetGesture
,
numberOfTapsRequired
:
2
,
numberOfTouchesRequired
:
2
,
selector
:
#selector(
handleTapToResetGesture
(_:)
)
)
prepareTapGesture
(
&
tapToResetGesture
,
numberOfTapsRequired
:
2
,
numberOfTouchesRequired
:
2
,
selector
:
#selector(
handleTapToResetGesture
)
)
if
let
v
:
UITapGestureRecognizer
=
tapToFocusGesture
{
v
.
requireGestureRecognizerToFail
(
tapToResetGesture
!
)
}
...
...
Sources/MaterialSwitch.swift
View file @
b864a98b
...
...
@@ -386,9 +386,9 @@ public class MaterialSwitch : UIControl {
private
func
prepareButton
()
{
button
.
pulseColor
=
nil
button
.
addTarget
(
self
,
action
:
#selector(
handleTouchUpInside
)
,
forControlEvents
:
.
TouchUpInside
)
button
.
addTarget
(
self
,
action
:
#selector(
handleTouchDragInside
(_: _:
)
,
forControlEvents
:
.
TouchDragInside
)
button
.
addTarget
(
self
,
action
:
#selector(
handleTouchUpOutsideOrCanceled
(_: _:)
)
,
forControlEvents
:
.
TouchCancel
)
button
.
addTarget
(
self
,
action
:
#selector(
handleTouchUpOutsideOrCanceled
(_: _:)
)
,
forControlEvents
:
.
TouchUpOutside
)
button
.
addTarget
(
self
,
action
:
#selector(
handleTouchDragInside
)
,
forControlEvents
:
.
TouchDragInside
)
button
.
addTarget
(
self
,
action
:
#selector(
handleTouchUpOutsideOrCanceled
)
,
forControlEvents
:
.
TouchCancel
)
button
.
addTarget
(
self
,
action
:
#selector(
handleTouchUpOutsideOrCanceled
)
,
forControlEvents
:
.
TouchUpOutside
)
addSubview
(
button
)
}
...
...
Sources/SideNavigationController.swift
View file @
b864a98b
...
...
@@ -734,7 +734,6 @@ public class SideNavigationController : UIViewController, UIGestureRecognizerDel
/// A method that prepares the mainViewController.
private
func
prepareMainViewController
()
{
prepareViewControllerWithinContainer
(
mainViewController
,
container
:
view
)
mainViewController
.
view
.
frame
=
view
.
bounds
}
/// A method that prepares the leftViewController.
...
...
@@ -809,13 +808,13 @@ public class SideNavigationController : UIViewController, UIGestureRecognizerDel
*/
private
func
prepareGestures
()
{
if
nil
==
panGesture
{
panGesture
=
UIPanGestureRecognizer
(
target
:
self
,
action
:
#selector(
handlePanGesture
(_:)
)
)
panGesture
=
UIPanGestureRecognizer
(
target
:
self
,
action
:
#selector(
handlePanGesture
)
)
panGesture
!.
delegate
=
self
view
.
addGestureRecognizer
(
panGesture
!
)
}
if
nil
==
tapGesture
{
tapGesture
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
handleTapGesture
(_:)
)
)
tapGesture
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
handleTapGesture
)
)
tapGesture
!.
delegate
=
self
tapGesture
!.
cancelsTouchesInView
=
false
view
.
addGestureRecognizer
(
tapGesture
!
)
...
...
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