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
f7279fc6
Unverified
Commit
f7279fc6
authored
Oct 15, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: fixed UILabel Grid resizing
parent
b1f97f5c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
20 deletions
+14
-20
Examples/Programmatic/ImageCard/ImageCard/ViewController.swift
+0
-1
Sources/iOS/Bar.swift
+5
-0
Sources/iOS/Grid.swift
+3
-0
Sources/iOS/NavigationBar.swift
+0
-1
Sources/iOS/Snackbar.swift
+3
-9
Sources/iOS/Toolbar.swift
+3
-9
No files found.
Examples/Programmatic/ImageCard/ImageCard/ViewController.swift
View file @
f7279fc6
...
...
@@ -97,7 +97,6 @@ extension ViewController {
imageCard
.
bottomBar
=
Bar
()
imageCard
.
bottomBarEdgeInsetsPreset
=
.
wideRectangle2
imageCard
.
bottomBarEdgeInsets
.
top
=
0
imageCard
.
bottomBar
?
.
contentViewAlignment
=
.
center
imageCard
.
bottomBar
?
.
leftViews
=
[
favoriteButton
]
imageCard
.
bottomBar
?
.
centerViews
=
[
label
]
...
...
Sources/iOS/Bar.swift
View file @
f7279fc6
...
...
@@ -178,6 +178,11 @@ open class Bar: View {
return
}
reload
()
}
/// Reloads the view.
open
func
reload
()
{
var
lc
=
0
var
rc
=
0
let
l
=
(
CGFloat
(
leftViews
.
count
)
*
interimSpace
)
...
...
Sources/iOS/Grid.swift
View file @
f7279fc6
...
...
@@ -233,6 +233,9 @@ public class Grid {
canvas
.
addSubview
(
child
)
}
// Forces the views to adjust accordingly to size changes, ie: UILabel.
(
child
as?
UILabel
)?
.
sizeToFit
()
switch
axis
.
direction
{
case
.
horizontal
:
let
c
=
0
==
child
.
grid
.
columns
?
axis
.
columns
/
count
:
child
.
grid
.
columns
...
...
Sources/iOS/NavigationBar.swift
View file @
f7279fc6
...
...
@@ -220,7 +220,6 @@ open class NavigationBar: UINavigationBar {
}
item
.
contentView
.
grid
.
begin
()
item
.
contentView
.
grid
.
views
=
item
.
centerViews
if
.
center
==
item
.
contentViewAlignment
{
if
lc
<
rc
{
...
...
Sources/iOS/Snackbar.swift
View file @
f7279fc6
...
...
@@ -76,17 +76,11 @@ open class Snackbar: Bar {
return
super
.
hitTest
(
point
,
with
:
event
)
}
open
override
func
layoutSubviews
()
{
super
.
layoutSubviews
()
guard
willLayout
else
{
return
}
reload
()
}
/// Reloads the view.
open
func
reload
()
{
open
override
func
reload
()
{
super
.
reload
()
centerViews
=
[
textLabel
]
}
...
...
Sources/iOS/Toolbar.swift
View file @
f7279fc6
...
...
@@ -100,17 +100,11 @@ open class Toolbar: Bar {
}
contentViewAlignment
=
.
center
==
titleLabel
.
textAlignment
?
.
center
:
.
any
}
open
override
func
layoutSubviews
()
{
super
.
layoutSubviews
()
guard
willLayout
else
{
return
}
reload
()
}
/// Reloads the view.
open
func
reload
()
{
open
override
func
reload
()
{
super
.
reload
()
if
nil
!=
title
&&
""
!=
title
{
if
nil
==
titleLabel
.
superview
{
contentView
.
addSubview
(
titleLabel
)
...
...
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