Commit e2322500 by Daniel Dahan

updated ControlView to have a default frame of screen width and 44 points height

parent 59fc39a9
......@@ -36,7 +36,7 @@ in text to be detected.
import UIKit
import Material
class ViewController: UIViewController, TextDelegate, TextViewDelegate {
class ViewController: UIViewController, TextDelegate {
/// A Text storage object that monitors the changes within the textView.
lazy var text: Text = Text()
......@@ -64,7 +64,6 @@ class ViewController: UIViewController, TextDelegate, TextViewDelegate {
text.textStorage.addLayoutManager(layoutManager)
textView = TextView(textContainer: textContainer)
textView.delegate = self
textView.font = RobotoFont.regular
textView.placeholderLabel = UILabel()
......
......@@ -101,7 +101,7 @@ public class ControlView : MaterialView {
- Parameter rightControls: An Array of UIControls that go on the right side.
*/
public convenience init?(leftControls: Array<UIControl>? = nil, rightControls: Array<UIControl>? = nil) {
self.init(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, 64))
self.init(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, 44))
prepareProperties(leftControls, rightControls: rightControls)
}
......
......@@ -41,6 +41,16 @@ public class StatusBarView : ControlView {
}
}
/**
A convenience initializer with parameter settings.
- Parameter leftControls: An Array of UIControls that go on the left side.
- Parameter rightControls: An Array of UIControls that go on the right side.
*/
public convenience init?(leftControls: Array<UIControl>? = nil, rightControls: Array<UIControl>? = nil) {
self.init(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, 64))
prepareProperties(leftControls, rightControls: rightControls)
}
/// A convenience initializer.
public convenience init() {
self.init(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, 64))
......
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