Commit 448b0318 by Daniel Dahan

development: added updated before release

parent 12fd3d0c
...@@ -89,12 +89,12 @@ public class Capture: NSObject, AVCaptureFileOutputRecordingDelegate { ...@@ -89,12 +89,12 @@ public class Capture: NSObject, AVCaptureFileOutputRecordingDelegate {
public weak var delegate: CaptureDelegate? public weak var delegate: CaptureDelegate?
/** /**
* setupSession * prepareSession
* A helper method that prepares the session with the various available inputs and outputs. * A helper method that prepares the session with the various available inputs and outputs.
* @param preset: String, default: AVCaptureSessionPresetHigh * @param preset: String, default: AVCaptureSessionPresetHigh
* @return A boolean value, true if successful, false otherwise. * @return A boolean value, true if successful, false otherwise.
*/ */
public func setupSession(preset: String = AVCaptureSessionPresetHigh) -> Bool { public func prepareSession(preset: String = AVCaptureSessionPresetHigh) -> Bool {
session.sessionPreset = preset session.sessionPreset = preset
var error: NSError? var error: NSError?
......
...@@ -120,18 +120,18 @@ public class Preview: UIView { ...@@ -120,18 +120,18 @@ public class Preview: UIView {
required public init(coder aDecoder: NSCoder) { required public init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder) super.init(coder: aDecoder)
setupView() prepareView()
} }
public override init(frame: CGRect) { public override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
setupView() prepareView()
} }
public init() { public init() {
super.init(frame: CGRectZero) super.init(frame: CGRectZero)
setTranslatesAutoresizingMaskIntoConstraints(false) setTranslatesAutoresizingMaskIntoConstraints(false)
setupView() prepareView()
} }
// //
...@@ -160,10 +160,10 @@ public class Preview: UIView { ...@@ -160,10 +160,10 @@ public class Preview: UIView {
} }
// //
// :name: setupView // :name: prepareView
// :description: Common setup for view. // :description: Common setup for view.
// //
private func setupView() { private func prepareView() {
let captureLayer: AVCaptureVideoPreviewLayer = layer as! AVCaptureVideoPreviewLayer let captureLayer: AVCaptureVideoPreviewLayer = layer as! AVCaptureVideoPreviewLayer
captureLayer.videoGravity = AVLayerVideoGravityResizeAspectFill captureLayer.videoGravity = AVLayerVideoGravityResizeAspectFill
......
...@@ -24,6 +24,7 @@ public protocol TextDelegate { ...@@ -24,6 +24,7 @@ public protocol TextDelegate {
optional func textStorageDidProcessEdit(text: Text, textStorage: TextStorage, string: String, result: NSTextCheckingResult, flags: NSMatchingFlags, stop: UnsafeMutablePointer<ObjCBool>) optional func textStorageDidProcessEdit(text: Text, textStorage: TextStorage, string: String, result: NSTextCheckingResult, flags: NSMatchingFlags, stop: UnsafeMutablePointer<ObjCBool>)
} }
@objc(Text)
public class Text: NSObject { public class Text: NSObject {
/** /**
:name: searchPattern :name: searchPattern
......
...@@ -33,7 +33,7 @@ public class TextView: UITextView { ...@@ -33,7 +33,7 @@ public class TextView: UITextView {
required public init(coder aDecoder: NSCoder) { required public init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder) super.init(coder: aDecoder)
setupView() prepareView()
} }
override public init(frame: CGRect, textContainer: NSTextContainer?) { override public init(frame: CGRect, textContainer: NSTextContainer?) {
...@@ -41,7 +41,7 @@ public class TextView: UITextView { ...@@ -41,7 +41,7 @@ public class TextView: UITextView {
if CGRectZero == frame { if CGRectZero == frame {
setTranslatesAutoresizingMaskIntoConstraints(false) setTranslatesAutoresizingMaskIntoConstraints(false)
} }
setupView() prepareView()
} }
// //
...@@ -136,10 +136,10 @@ public class TextView: UITextView { ...@@ -136,10 +136,10 @@ public class TextView: UITextView {
} }
// //
// :name: setupView // :name: prepareView
// :description: Sets up the common initilized values. // :description: Sets up the common initilized values.
// //
private func setupView() { private func prepareView() {
backgroundColor = MaterialTheme.clear.color backgroundColor = MaterialTheme.clear.color
textColor = MaterialTheme.black.color textColor = MaterialTheme.black.color
label.font = font label.font = font
......
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