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
a3146a47
Commit
a3146a47
authored
Jul 21, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated left and right controls to UIViews
parent
71bdc3ea
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
13 deletions
+15
-13
Sources/Info.plist
+2
-0
Sources/iOS/BarView.swift
+1
-1
Sources/iOS/ControlView.swift
+10
-10
Sources/iOS/SearchBar.swift
+1
-1
Sources/iOS/Toolbar.swift
+1
-1
No files found.
Sources/Info.plist
View file @
a3146a47
...
...
@@ -2,6 +2,8 @@
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
LSApplicationCategoryType
<
/k
e
y
>
<
string
><
/string
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
en
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
...
...
Sources/iOS/BarView.swift
View file @
a3146a47
...
...
@@ -54,7 +54,7 @@ public class BarView : ControlView {
- 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
override
init
(
leftControls
:
Array
<
UIControl
>
?
=
nil
,
rightControls
:
Array
<
UIControl
>
?
=
nil
)
{
public
override
init
(
leftControls
:
[
UIView
]?
=
nil
,
rightControls
:
[
UIView
]
?
=
nil
)
{
super
.
init
(
leftControls
:
leftControls
,
rightControls
:
rightControls
)
}
...
...
Sources/iOS/ControlView.swift
View file @
a3146a47
...
...
@@ -85,15 +85,15 @@ public class ControlView : View {
public
private(set)
var
contentView
:
View
!
/// Left side UIControls.
public
var
leftControls
:
Array
<
UIControl
>
?
{
public
var
leftControls
:
[
UIView
]
?
{
didSet
{
if
let
v
:
Array
<
UIControl
>
=
oldValue
{
if
let
v
=
oldValue
{
for
b
in
v
{
b
.
removeFromSuperview
()
}
}
if
let
v
:
Array
<
UIControl
>
=
leftControls
{
if
let
v
=
leftControls
{
for
b
in
v
{
addSubview
(
b
)
}
...
...
@@ -103,15 +103,15 @@ public class ControlView : View {
}
/// Right side UIControls.
public
var
rightControls
:
Array
<
UIControl
>
?
{
public
var
rightControls
:
[
UIView
]
?
{
didSet
{
if
let
v
:
Array
<
UIControl
>
=
oldValue
{
if
let
v
=
oldValue
{
for
b
in
v
{
b
.
removeFromSuperview
()
}
}
if
let
v
:
Array
<
UIControl
>
=
rightControls
{
if
let
v
=
rightControls
{
for
b
in
v
{
addSubview
(
b
)
}
...
...
@@ -149,7 +149,7 @@ public class ControlView : View {
- 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
init
(
leftControls
:
Array
<
UIControl
>
?
=
nil
,
rightControls
:
Array
<
UIControl
>
?
=
nil
)
{
public
init
(
leftControls
:
[
UIView
]?
=
nil
,
rightControls
:
[
UIView
]
?
=
nil
)
{
super
.
init
(
frame
:
CGRect
.
zero
)
frame
.
size
=
intrinsicContentSize
()
prepareProperties
(
leftControls
:
leftControls
,
rightControls
:
rightControls
)
...
...
@@ -169,7 +169,7 @@ public class ControlView : View {
contentView
.
grid
.
columns
=
columns
// leftControls
if
let
v
:
Array
<
UIControl
>
=
leftControls
{
if
let
v
=
leftControls
{
for
c
in
v
{
let
w
:
CGFloat
=
c
.
intrinsicContentSize
()
.
width
(
c
as?
UIButton
)?
.
contentEdgeInsets
=
UIEdgeInsets
.
zero
...
...
@@ -189,7 +189,7 @@ public class ControlView : View {
grid
.
views
?
.
append
(
contentView
)
// rightControls
if
let
v
:
Array
<
UIControl
>
=
rightControls
{
if
let
v
=
rightControls
{
for
c
in
v
{
let
w
:
CGFloat
=
c
.
intrinsicContentSize
()
.
width
(
c
as?
UIButton
)?
.
contentEdgeInsets
=
UIEdgeInsets
.
zero
...
...
@@ -238,7 +238,7 @@ public class ControlView : View {
- Parameter leftControls: An Array of UIControls that go on the left side.
- Parameter rightControls: An Array of UIControls that go on the right side.
*/
internal
func
prepareProperties
(
leftControls
:
Array
<
UIControl
>
?,
rightControls
:
Array
<
UIControl
>
?)
{
internal
func
prepareProperties
(
leftControls
:
[
UIView
]?,
rightControls
:
[
UIView
]
?)
{
self
.
leftControls
=
leftControls
self
.
rightControls
=
rightControls
}
...
...
Sources/iOS/SearchBar.swift
View file @
a3146a47
...
...
@@ -116,7 +116,7 @@ public class SearchBar : BarView {
- 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
override
init
(
leftControls
:
Array
<
UIControl
>
?
=
nil
,
rightControls
:
Array
<
UIControl
>
?
=
nil
)
{
public
override
init
(
leftControls
:
[
UIView
]?
=
nil
,
rightControls
:
[
UIView
]
?
=
nil
)
{
super
.
init
(
leftControls
:
leftControls
,
rightControls
:
rightControls
)
}
...
...
Sources/iOS/Toolbar.swift
View file @
a3146a47
...
...
@@ -123,7 +123,7 @@ public class Toolbar : BarView {
- 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
override
init
(
leftControls
:
Array
<
UIControl
>
?
=
nil
,
rightControls
:
Array
<
UIControl
>
?
=
nil
)
{
public
override
init
(
leftControls
:
[
UIView
]?
=
nil
,
rightControls
:
[
UIView
]
?
=
nil
)
{
super
.
init
(
leftControls
:
leftControls
,
rightControls
:
rightControls
)
}
...
...
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