Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
e2322500
Commit
e2322500
authored
Feb 23, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated ControlView to have a default frame of screen width and 44 points height
parent
59fc39a9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
Examples/Programmatic/TextView/TextView/ViewController.swift
+1
-2
Sources/ControlView.swift
+1
-1
Sources/StatusBarView.swift
+10
-0
No files found.
Examples/Programmatic/TextView/TextView/ViewController.swift
View file @
e2322500
...
@@ -36,7 +36,7 @@ in text to be detected.
...
@@ -36,7 +36,7 @@ in text to be detected.
import
UIKit
import
UIKit
import
Material
import
Material
class
ViewController
:
UIViewController
,
TextDelegate
,
TextViewDelegate
{
class
ViewController
:
UIViewController
,
TextDelegate
{
/// A Text storage object that monitors the changes within the textView.
/// A Text storage object that monitors the changes within the textView.
lazy
var
text
:
Text
=
Text
()
lazy
var
text
:
Text
=
Text
()
...
@@ -64,7 +64,6 @@ class ViewController: UIViewController, TextDelegate, TextViewDelegate {
...
@@ -64,7 +64,6 @@ class ViewController: UIViewController, TextDelegate, TextViewDelegate {
text
.
textStorage
.
addLayoutManager
(
layoutManager
)
text
.
textStorage
.
addLayoutManager
(
layoutManager
)
textView
=
TextView
(
textContainer
:
textContainer
)
textView
=
TextView
(
textContainer
:
textContainer
)
textView
.
delegate
=
self
textView
.
font
=
RobotoFont
.
regular
textView
.
font
=
RobotoFont
.
regular
textView
.
placeholderLabel
=
UILabel
()
textView
.
placeholderLabel
=
UILabel
()
...
...
Sources/ControlView.swift
View file @
e2322500
...
@@ -101,7 +101,7 @@ public class ControlView : MaterialView {
...
@@ -101,7 +101,7 @@ public class ControlView : MaterialView {
- Parameter rightControls: An Array of UIControls that go on the right side.
- Parameter rightControls: An Array of UIControls that go on the right side.
*/
*/
public
convenience
init
?(
leftControls
:
Array
<
UIControl
>
?
=
nil
,
rightControls
:
Array
<
UIControl
>
?
=
nil
)
{
public
convenience
init
?(
leftControls
:
Array
<
UIControl
>
?
=
nil
,
rightControls
:
Array
<
UIControl
>
?
=
nil
)
{
self
.
init
(
frame
:
CGRectMake
(
0
,
0
,
UIScreen
.
mainScreen
()
.
bounds
.
width
,
6
4
))
self
.
init
(
frame
:
CGRectMake
(
0
,
0
,
UIScreen
.
mainScreen
()
.
bounds
.
width
,
4
4
))
prepareProperties
(
leftControls
,
rightControls
:
rightControls
)
prepareProperties
(
leftControls
,
rightControls
:
rightControls
)
}
}
...
...
Sources/StatusBarView.swift
View file @
e2322500
...
@@ -41,6 +41,16 @@ public class StatusBarView : ControlView {
...
@@ -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.
/// A convenience initializer.
public
convenience
init
()
{
public
convenience
init
()
{
self
.
init
(
frame
:
CGRectMake
(
0
,
0
,
UIScreen
.
mainScreen
()
.
bounds
.
width
,
64
))
self
.
init
(
frame
:
CGRectMake
(
0
,
0
,
UIScreen
.
mainScreen
()
.
bounds
.
width
,
64
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment