Commit 9cfba910 by Daniel Dahan

development: added @objc to selectors and removed Navigation automatically…

development: added @objc to selectors and removed Navigation automatically disable alignment constraints
parent 09fdc471
......@@ -168,6 +168,7 @@
96BCB8571CB4115200C806FE /* View.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96BCB78C1CB40DC500C806FE /* View.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96BCB8591CB4118E00C806FE /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96334EF51C8B84660083986B /* Assets.xcassets */; };
96C1C8811D42C62800E6608F /* Material+Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96C1C8801D42C62800E6608F /* Material+Array.swift */; };
96C9CDBC1D7B1040006A4154 /* Reminder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96C9CDBB1D7B1040006A4154 /* Reminder.swift */; };
96D88C321C1328D800B91418 /* Material.h in Headers */ = {isa = PBXBuildFile; fileRef = 96D88C091C1328D800B91418 /* Material.h */; settings = {ATTRIBUTES = (Public, ); }; };
96E3C3941D397AE90086A024 /* Material+UIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96E3C3931D397AE90086A024 /* Material+UIView.swift */; };
96E3C3951D3A1CC20086A024 /* IconButton.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9658F2161CD6FA4700B902C1 /* IconButton.swift */; settings = {ATTRIBUTES = (Public, ); }; };
......@@ -291,6 +292,7 @@
96BCB7F11CB40DE900C806FE /* Roboto-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Roboto-Regular.ttf"; sourceTree = "<group>"; };
96BCB7F21CB40DE900C806FE /* Roboto-Thin.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Roboto-Thin.ttf"; sourceTree = "<group>"; };
96C1C8801D42C62800E6608F /* Material+Array.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Material+Array.swift"; sourceTree = "<group>"; };
96C9CDBB1D7B1040006A4154 /* Reminder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Reminder.swift; sourceTree = "<group>"; };
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>"; };
......@@ -524,14 +526,15 @@
96BCB80A1CB410A100C806FE /* Extension */,
96BCB8071CB4101C00C806FE /* Font */,
96BCB8081CB4105E00C806FE /* Icon */,
963FBF021D6696D0008F8512 /* Menu */,
962864601D5410FD00690B69 /* JSON */,
968C99431D36ECBB000074FF /* Label */,
96BCB80D1CB410FD00C806FE /* Layer */,
96BCB8041CB40F6C00C806FE /* Layout */,
963FBF021D6696D0008F8512 /* Menu */,
96BCB8011CB40F1700C806FE /* Navigation */,
962DDD071D6FBBB7001C307C /* Page */,
96EA9A411D4E68E60052C74D /* PhotoLibrary */,
96C9CDBA1D7B101C006A4154 /* Reminder */,
963FBF031D6696EF008F8512 /* SearchBar */,
963FBEFB1D6694E8008F8512 /* Snackbar */,
967A48171D0F424B00B8CEB7 /* StatusBar */,
......@@ -737,6 +740,14 @@
name = Text;
sourceTree = "<group>";
};
96C9CDBA1D7B101C006A4154 /* Reminder */ = {
isa = PBXGroup;
children = (
96C9CDBB1D7B1040006A4154 /* Reminder.swift */,
);
name = Reminder;
sourceTree = "<group>";
};
96D88BF41C1328D800B91418 /* Sources */ = {
isa = PBXGroup;
children = (
......@@ -1046,6 +1057,7 @@
96BCB7CA1CB40DC500C806FE /* Layout.swift in Sources */,
96BCB7D11CB40DC500C806FE /* Switch.swift in Sources */,
96BCB7BA1CB40DC500C806FE /* CollectionView.swift in Sources */,
96C9CDBC1D7B1040006A4154 /* Reminder.swift in Sources */,
96BCB7A31CB40DC500C806FE /* CapturePreview.swift in Sources */,
96BCB7BC1CB40DC500C806FE /* CollectionViewDataSource.swift in Sources */,
96EA9A4B1D4E7A430052C74D /* PhotoLibraryController.swift in Sources */,
......
......@@ -381,6 +381,7 @@ open class Capture: View, UIGestureRecognizerDelegate {
Handler for the flashButton.
- Parameter button: A UIButton that is associated with the event.
*/
@objc
internal func handleFlashButton(button: UIButton) {
delegate?.captureDidPressFlashButton?(capture: self, button: button)
}
......@@ -389,6 +390,7 @@ open class Capture: View, UIGestureRecognizerDelegate {
Handler for the switchCameraButton.
- Parameter button: A UIButton that is associated with the event.
*/
@objc
internal func handleSwitchCamerasButton(button: UIButton) {
captureSession.switchCameras()
delegate?.captureDidPressSwitchCamerasButton?(capture: self, button: button)
......@@ -398,6 +400,7 @@ open class Capture: View, UIGestureRecognizerDelegate {
Handler for the captureButton.
- Parameter button: A UIButton that is associated with the event.
*/
@objc
internal func handleCaptureButton(button: UIButton) {
if .photo == captureMode {
captureSession.captureStillImage()
......@@ -417,6 +420,7 @@ open class Capture: View, UIGestureRecognizerDelegate {
Handler for the cameraButton.
- Parameter button: A UIButton that is associated with the event.
*/
@objc
internal func handleCameraButton(button: UIButton) {
captureMode = .photo
delegate?.captureDidPressCameraButton?(capture: self, button: button)
......@@ -426,6 +430,7 @@ open class Capture: View, UIGestureRecognizerDelegate {
Handler for the videoButton.
- Parameter button: A UIButton that is associated with the event.
*/
@objc
internal func handleVideoButton(button: UIButton) {
captureMode = .video
delegate?.captureDidPressVideoButton?(capture: self, button: button)
......
......@@ -51,6 +51,7 @@ open class DynamicFontType: NSObject {
prepare()
}
@objc
internal func handleContentSizeChange() {
delegate?.dynamicFontType(dynamicFontType: self)
}
......
......@@ -115,7 +115,6 @@ open class NavigationController: UINavigationController {
view.clipsToBounds = true
view.backgroundColor = Color.white
view.contentScaleFactor = Device.scale
automaticallyAdjustsScrollViewInsets = false
// This ensures the panning gesture is available when going back between views.
if let v = interactivePopGestureRecognizer {
......@@ -147,6 +146,7 @@ extension NavigationController: UINavigationBarDelegate {
}
/// Handler for the back button.
@objc
internal func handleBackButton() {
popViewController(animated: true)
}
......
......@@ -32,7 +32,7 @@ import UIKit
open class PhotoLibraryController: UIViewController, PhotoLibraryDelegate {
/// A reference to a PhotoLibrary.
public private(set) var photoLibrary: PhotoLibrary!
public private(set) lazy var photoLibrary: PhotoLibrary = PhotoLibrary()
open override func viewDidLoad() {
super.viewDidLoad()
......@@ -55,7 +55,6 @@ open class PhotoLibraryController: UIViewController, PhotoLibraryDelegate {
/// Prepares the photoLibrary.
private func preparePhotoLibrary() {
photoLibrary = PhotoLibrary()
photoLibrary.delegate = self
}
}
//
// Reminder.swift
// Material
//
// Created by Daniel Dahan on 2016-09-03.
// Copyright © 2016 CosmicMind, Inc. All rights reserved.
//
import Foundation
......@@ -154,8 +154,6 @@ open class RootController: UIViewController {
view.clipsToBounds = true
view.backgroundColor = Color.white
view.contentScaleFactor = Device.scale
automaticallyAdjustsScrollViewInsets = false
edgesForExtendedLayout = []
prepareRootViewController()
}
......
......@@ -145,6 +145,7 @@ open class SearchBar: BarView {
}
/// Clears the textField text.
@objc
internal func handleClearButton() {
textField.text = nil
}
......
......@@ -324,18 +324,21 @@ open class TextField: UITextField {
}
/// Handles the text editing did begin state.
@objc
open func handleEditingDidBegin() {
dividerEditingDidBeginAnimation()
placeholderEditingDidBeginAnimation()
}
/// Handles the text editing did end state.
@objc
open func handleEditingDidEnd() {
dividerEditingDidEndAnimation()
placeholderEditingDidEndAnimation()
}
/// Handles the clearIconButton TouchUpInside event.
@objc
open func handleClearIconButton() {
if false == delegate?.textFieldShouldClear?(self) {
return
......@@ -344,6 +347,7 @@ open class TextField: UITextField {
}
/// Handles the visibilityIconButton TouchUpInside event.
@objc
open func handleVisibilityIconButton() {
isSecureTextEntry = !isSecureTextEntry
if !isSecureTextEntry {
......
......@@ -171,11 +171,13 @@ public class TextView: UITextView {
}
/// Notification handler for when text editing began.
@objc
internal func handleTextViewTextDidBegin() {
titleLabel?.textColor = titleLabelActiveColor
}
/// Notification handler for when text changed.
@objc
internal func handleTextViewTextDidChange() {
if let p = placeholderLabel {
p.isHidden = !(true == text?.isEmpty)
......@@ -194,6 +196,7 @@ public class TextView: UITextView {
}
/// Notification handler for when text editing ended.
@objc
internal func handleTextViewTextDidEnd() {
guard let t = text else {
hideTitleLabel()
......
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