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
85205879
Commit
85205879
authored
Oct 27, 2018
by
Orkhan Alikhanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made bottom and right constants negative
parent
7862f082
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
Sources/iOS/Layout.swift
+16
-16
No files found.
Sources/iOS/Layout.swift
View file @
85205879
...
@@ -96,7 +96,7 @@ public extension Layout {
...
@@ -96,7 +96,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
right
(
_
offset
:
CGFloat
=
0
)
->
Layout
{
func
right
(
_
offset
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
right
,
constant
:
offset
)
return
constraint
(
.
right
,
constant
:
-
offset
)
}
}
/**
/**
...
@@ -106,7 +106,7 @@ public extension Layout {
...
@@ -106,7 +106,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
bottom
(
_
offset
:
CGFloat
=
0
)
->
Layout
{
func
bottom
(
_
offset
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
bottom
,
constant
:
offset
)
return
constraint
(
.
bottom
,
constant
:
-
offset
)
}
}
/**
/**
...
@@ -128,7 +128,7 @@ public extension Layout {
...
@@ -128,7 +128,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
topRight
(
top
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
func
topRight
(
top
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
topRight
,
constants
:
top
,
right
)
return
constraint
(
.
topRight
,
constants
:
top
,
-
right
)
}
}
/**
/**
...
@@ -139,7 +139,7 @@ public extension Layout {
...
@@ -139,7 +139,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
bottomLeft
(
bottom
:
CGFloat
=
0
,
left
:
CGFloat
=
0
)
->
Layout
{
func
bottomLeft
(
bottom
:
CGFloat
=
0
,
left
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
bottomLeft
,
constants
:
bottom
,
left
)
return
constraint
(
.
bottomLeft
,
constants
:
-
bottom
,
left
)
}
}
/**
/**
...
@@ -150,7 +150,7 @@ public extension Layout {
...
@@ -150,7 +150,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
bottomRight
(
bottom
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
func
bottomRight
(
bottom
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
bottomRight
,
constants
:
bottom
,
right
)
return
constraint
(
.
bottomRight
,
constants
:
-
bottom
,
-
right
)
}
}
/**
/**
...
@@ -161,7 +161,7 @@ public extension Layout {
...
@@ -161,7 +161,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
leftRight
(
left
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
func
leftRight
(
left
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
leftRight
,
constants
:
left
,
right
)
return
constraint
(
.
leftRight
,
constants
:
left
,
-
right
)
}
}
/**
/**
...
@@ -172,7 +172,7 @@ public extension Layout {
...
@@ -172,7 +172,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
topBottom
(
top
:
CGFloat
=
0
,
bottom
:
CGFloat
=
0
)
->
Layout
{
func
topBottom
(
top
:
CGFloat
=
0
,
bottom
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
topBottom
,
constants
:
top
,
bottom
)
return
constraint
(
.
topBottom
,
constants
:
top
,
-
bottom
)
}
}
/**
/**
...
@@ -236,7 +236,7 @@ public extension Layout {
...
@@ -236,7 +236,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
edges
(
top
:
CGFloat
=
0
,
left
:
CGFloat
=
0
,
bottom
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
func
edges
(
top
:
CGFloat
=
0
,
left
:
CGFloat
=
0
,
bottom
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
edges
,
constants
:
top
,
left
,
bottom
,
right
)
return
constraint
(
.
edges
,
constants
:
top
,
left
,
-
bottom
,
-
right
)
}
}
}
}
...
@@ -293,7 +293,7 @@ public extension Layout {
...
@@ -293,7 +293,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
right
(
_
anchor
:
LayoutAnchor
,
_
offset
:
CGFloat
=
0
)
->
Layout
{
func
right
(
_
anchor
:
LayoutAnchor
,
_
offset
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
right
,
to
:
anchor
,
constant
:
offset
)
return
constraint
(
.
right
,
to
:
anchor
,
constant
:
-
offset
)
}
}
/**
/**
...
@@ -304,7 +304,7 @@ public extension Layout {
...
@@ -304,7 +304,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
bottom
(
_
anchor
:
LayoutAnchor
,
_
offset
:
CGFloat
=
0
)
->
Layout
{
func
bottom
(
_
anchor
:
LayoutAnchor
,
_
offset
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
bottom
,
to
:
anchor
,
constant
:
offset
)
return
constraint
(
.
bottom
,
to
:
anchor
,
constant
:
-
offset
)
}
}
/**
/**
...
@@ -328,7 +328,7 @@ public extension Layout {
...
@@ -328,7 +328,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
topRight
(
_
anchor
:
LayoutAnchor
,
top
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
func
topRight
(
_
anchor
:
LayoutAnchor
,
top
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
topRight
,
to
:
anchor
,
constants
:
top
,
right
)
return
constraint
(
.
topRight
,
to
:
anchor
,
constants
:
top
,
-
right
)
}
}
/**
/**
...
@@ -340,7 +340,7 @@ public extension Layout {
...
@@ -340,7 +340,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
bottomLeft
(
_
anchor
:
LayoutAnchor
,
bottom
:
CGFloat
=
0
,
left
:
CGFloat
=
0
)
->
Layout
{
func
bottomLeft
(
_
anchor
:
LayoutAnchor
,
bottom
:
CGFloat
=
0
,
left
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
bottomLeft
,
to
:
anchor
,
constants
:
bottom
,
left
)
return
constraint
(
.
bottomLeft
,
to
:
anchor
,
constants
:
-
bottom
,
left
)
}
}
/**
/**
...
@@ -352,7 +352,7 @@ public extension Layout {
...
@@ -352,7 +352,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
bottomRight
(
_
anchor
:
LayoutAnchor
,
bottom
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
func
bottomRight
(
_
anchor
:
LayoutAnchor
,
bottom
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
bottomRight
,
to
:
anchor
,
constants
:
bottom
,
right
)
return
constraint
(
.
bottomRight
,
to
:
anchor
,
constants
:
-
bottom
,
-
right
)
}
}
/**
/**
...
@@ -364,7 +364,7 @@ public extension Layout {
...
@@ -364,7 +364,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
leftRight
(
_
anchor
:
LayoutAnchor
,
left
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
func
leftRight
(
_
anchor
:
LayoutAnchor
,
left
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
leftRight
,
to
:
anchor
,
constants
:
left
,
right
)
return
constraint
(
.
leftRight
,
to
:
anchor
,
constants
:
left
,
-
right
)
}
}
/**
/**
...
@@ -376,7 +376,7 @@ public extension Layout {
...
@@ -376,7 +376,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
topBottom
(
_
anchor
:
LayoutAnchor
,
top
:
CGFloat
=
0
,
bottom
:
CGFloat
=
0
)
->
Layout
{
func
topBottom
(
_
anchor
:
LayoutAnchor
,
top
:
CGFloat
=
0
,
bottom
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
topBottom
,
to
:
anchor
,
constants
:
top
,
bottom
)
return
constraint
(
.
topBottom
,
to
:
anchor
,
constants
:
top
,
-
bottom
)
}
}
/**
/**
...
@@ -446,7 +446,7 @@ public extension Layout {
...
@@ -446,7 +446,7 @@ public extension Layout {
*/
*/
@discardableResult
@discardableResult
func
edges
(
_
anchor
:
LayoutAnchor
,
top
:
CGFloat
=
0
,
left
:
CGFloat
=
0
,
bottom
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
func
edges
(
_
anchor
:
LayoutAnchor
,
top
:
CGFloat
=
0
,
left
:
CGFloat
=
0
,
bottom
:
CGFloat
=
0
,
right
:
CGFloat
=
0
)
->
Layout
{
return
constraint
(
.
edges
,
to
:
anchor
,
constants
:
top
,
left
,
bottom
,
right
)
return
constraint
(
.
edges
,
to
:
anchor
,
constants
:
top
,
left
,
-
bottom
,
-
right
)
}
}
}
}
...
...
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