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
55c12730
Commit
55c12730
authored
Aug 30, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor updates
parent
23212a21
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
8 deletions
+22
-8
MaterialKit.xcodeproj/project.pbxproj
+1
-1
Source/Info.plist
+1
-1
Source/Layout.swift
+18
-4
Source/MaterialButton.swift
+1
-1
Source/MaterialCard.swift
+1
-1
Source/SideNavController.swift
+0
-0
No files found.
MaterialKit.xcodeproj/project.pbxproj
View file @
55c12730
...
...
@@ -328,7 +328,7 @@
isa
=
PBXProject
;
attributes
=
{
LastUpgradeCheck
=
0640
;
ORGANIZATIONNAME
=
"GraphKit Inc."
;
ORGANIZATIONNAME
=
"GraphKit
,
Inc."
;
TargetAttributes
=
{
963832351B88DFD80015F710
=
{
CreatedOnToolsVersion
=
6.4
;
...
...
Source/Info.plist
View file @
55c12730
...
...
@@ -15,7 +15,7 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
FMWK
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.
5
.0
<
/string
>
<
string
>
1.
7
.0
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
...
...
Source/Layout.swift
View file @
55c12730
...
...
@@ -46,18 +46,32 @@ public struct Layout {
}
/**
:name: expandToParent
Size
:name: expandToParent
*/
public
static
func
expandToParent
Size
(
parent
:
UIView
,
child
:
UIView
)
{
public
static
func
expandToParent
(
parent
:
UIView
,
child
:
UIView
)
{
let
views
:
Dictionary
<
String
,
AnyObject
>
=
[
"child"
:
child
]
parent
.
addConstraints
(
constraint
(
"H:|[child]|"
,
options
:
nil
,
metrics
:
nil
,
views
:
views
))
parent
.
addConstraints
(
constraint
(
"V:|[child]|"
,
options
:
nil
,
metrics
:
nil
,
views
:
views
))
}
/**
:name: expandToParent
Size
WithPad
:name: expandToParent
Horizontally
WithPad
*/
public
static
func
expandToParentSizeWithPad
(
parent
:
UIView
,
child
:
UIView
,
left
:
CGFloat
,
bottom
:
CGFloat
,
right
:
CGFloat
,
top
:
CGFloat
)
{
public
static
func
expandToParentHorizontallyWithPad
(
parent
:
UIView
,
child
:
UIView
,
left
:
CGFloat
,
right
:
CGFloat
)
{
parent
.
addConstraints
(
constraint
(
"H:|-(left)-[child]-(right)-|"
,
options
:
nil
,
metrics
:
[
"left"
:
left
,
"right"
:
right
],
views
:
[
"child"
:
child
]))
}
/**
:name: expandToParentVerticallyWithPad
*/
public
static
func
expandToParentVerticallyWithPad
(
parent
:
UIView
,
child
:
UIView
,
top
:
CGFloat
,
bottom
:
CGFloat
)
{
parent
.
addConstraints
(
constraint
(
"V:|-(top)-[child]-(bottom)-|"
,
options
:
nil
,
metrics
:
[
"bottom"
:
bottom
,
"top"
:
top
],
views
:
[
"child"
:
child
]))
}
/**
:name: expandToParentWithPad
*/
public
static
func
expandToParentWithPad
(
parent
:
UIView
,
child
:
UIView
,
left
:
CGFloat
,
bottom
:
CGFloat
,
right
:
CGFloat
,
top
:
CGFloat
)
{
let
views
:
Dictionary
<
String
,
AnyObject
>
=
[
"child"
:
child
]
parent
.
addConstraints
(
constraint
(
"H:|-(left)-[child]-(right)-|"
,
options
:
nil
,
metrics
:
[
"left"
:
left
,
"right"
:
right
],
views
:
views
))
parent
.
addConstraints
(
constraint
(
"V:|-(top)-[child]-(bottom)-|"
,
options
:
nil
,
metrics
:
[
"bottom"
:
bottom
,
"top"
:
top
],
views
:
views
))
...
...
Source/MaterialButton.swift
View file @
55c12730
...
...
@@ -174,7 +174,7 @@ public class MaterialButton : UIButton {
backgroundColorView
.
clipsToBounds
=
true
backgroundColorView
.
userInteractionEnabled
=
false
insertSubview
(
backgroundColorView
,
atIndex
:
0
)
Layout
.
expandToParent
Size
(
self
,
child
:
backgroundColorView
)
Layout
.
expandToParent
(
self
,
child
:
backgroundColorView
)
}
//
...
...
Source/MaterialCard.swift
View file @
55c12730
...
...
@@ -170,7 +170,7 @@ public class MaterialCard : UIView {
backgroundColorView
.
clipsToBounds
=
true
backgroundColorView
.
userInteractionEnabled
=
false
insertSubview
(
backgroundColorView
,
atIndex
:
0
)
Layout
.
expandToParent
Size
(
self
,
child
:
backgroundColorView
)
Layout
.
expandToParent
(
self
,
child
:
backgroundColorView
)
}
//
...
...
Source/SideNavController.swift
View file @
55c12730
This diff is collapsed.
Click to expand it.
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