From 17ddd2c3b79cbf259ceb564252b967a9e022d1d5 Mon Sep 17 00:00:00 2001 From: Igor Kislyuk Date: Sun, 12 Nov 2017 01:30:41 +0300 Subject: [PATCH] Fix access level --- .../Source/EditableTextField.swift | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/UIAnimatedTextField/Source/EditableTextField.swift b/UIAnimatedTextField/Source/EditableTextField.swift index 41fb7ef..a6d3787 100644 --- a/UIAnimatedTextField/Source/EditableTextField.swift +++ b/UIAnimatedTextField/Source/EditableTextField.swift @@ -24,26 +24,26 @@ import Foundation -enum EditableActionType { +public enum EditableActionType { case selectAll case select case cut case copy case paste - static let allActions = [EditableActionType.selectAll, .select, .cut, .paste, .copy] + public static let allActions = [EditableActionType.selectAll, .select, .cut, .paste, .copy] } -public class EditableTextField: UITextField { +open class EditableTextField: UITextField { /// Actions, that will be disabled for this textField. /// By default no actions are disabled. - var disabledActions: [EditableActionType] = [] + open var disabledActions: [EditableActionType] = [] /// Allows to disable moving cursor for user - var pinCursorToEnd: Bool = false + open var pinCursorToEnd: Bool = false - var getType: (() -> TextType?)? + open var getType: (() -> TextType?)? // MARK: - Private @@ -61,7 +61,7 @@ public class EditableTextField: UITextField { // MARK: - Overriden - override public func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool { + override open func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool { if disabledSelectors.contains(action) { return false } @@ -79,7 +79,7 @@ public class EditableTextField: UITextField { return super.canPerformAction(action, withSender: sender) } - override public func caretRect(for position: UITextPosition) -> CGRect { + override open func caretRect(for position: UITextPosition) -> CGRect { guard let type = getType?() else { return super.caretRect(for: position) } @@ -91,7 +91,7 @@ public class EditableTextField: UITextField { return super.caretRect(for: position) } - override public func closestPosition(to point: CGPoint) -> UITextPosition? { + override open func closestPosition(to point: CGPoint) -> UITextPosition? { if pinCursorToEnd { return endOfDocument }