Commit b864a98b by Daniel Dahan

updated last selector issues

parent 8d47964e
......@@ -39,7 +39,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let bottomNavigationController: BottomNavigationController = BottomNavigationController()
bottomNavigationController.viewControllers = [AppMenuViewController(mainViewController: AppNavigationController(rootViewController: RecipesViewController())), VideoViewController(), PhotoViewController()]
bottomNavigationController.viewControllers = [AppNavigationController(rootViewController: RecipesViewController()), VideoViewController(), PhotoViewController()]
bottomNavigationController.selectedIndex = 0
bottomNavigationController.tabBar.tintColor = MaterialColor.lightBlue.base
bottomNavigationController.tabBar.backgroundColor = MaterialColor.grey.darken4
......
......@@ -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";
......
......@@ -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.
......
......@@ -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";
......
......@@ -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!)
}
......
......@@ -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)
}
......
......@@ -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!)
......
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