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
7f7f160b
Commit
7f7f160b
authored
Mar 27, 2019
by
Orkhan Alikhanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved size method to a related extension
parent
dd38b17d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
Sources/iOS/Layout/Layout.swift
+11
-11
No files found.
Sources/iOS/Layout/Layout.swift
View file @
7f7f160b
...
...
@@ -390,17 +390,7 @@ public extension Layout {
func
height
(
offset
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
height
,
constant
:
offset
)
}
/**
The width and height of the view to its parent's.
- Parameter _ size: A CGSize offset.
- Returns: A Layout instance to allow chaining.
*/
@discardableResult
func
size
(
_
size
:
CGSize
)
->
Layout
{
return
width
(
size
.
width
)
.
height
(
size
.
height
)
}
/**
Constraints edges of the view to its parent's.
- Parameter top: A CGFloat offset for top.
...
...
@@ -435,6 +425,16 @@ public extension Layout {
func
height
(
_
height
:
CGFloat
)
->
Layout
{
return
constraint
(
.
constantHeight
,
constants
:
height
)
}
/**
The width and height of the view to its parent's.
- Parameter _ size: A CGSize offset.
- Returns: A Layout instance to allow chaining.
*/
@discardableResult
func
size
(
_
size
:
CGSize
)
->
Layout
{
return
width
(
size
.
width
)
.
height
(
size
.
height
)
}
}
public
extension
Layout
{
...
...
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