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
2e247729
Commit
2e247729
authored
May 10, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
latest changes that remove MateriaLayout translate* property
parent
4dbaa51d
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
40 additions
and
37 deletions
+40
-37
Examples/Programmatic/App/App/AppLeftViewController.swift
+0
-4
Examples/Programmatic/App/App/AppMenuViewController.swift
+0
-1
Examples/Programmatic/App/App/AppNavigationController.swift
+0
-1
Examples/Programmatic/App/App/ItemViewController.swift
+0
-1
Examples/Programmatic/App/App/RecipesViewController.swift
+0
-2
Examples/Programmatic/App/App/RecommendationViewController.swift
+0
-2
Sources/iOS/BottomTabBar.swift
+0
-1
Sources/iOS/CardView.swift
+0
-12
Sources/iOS/ImageCardView.swift
+0
-12
Sources/iOS/MaterialCollectionView.swift
+40
-0
Sources/iOS/TextView.swift
+0
-1
No files found.
Examples/Programmatic/App/App/AppLeftViewController.swift
View file @
2e247729
...
...
@@ -98,12 +98,9 @@ class AppLeftViewController: UIViewController {
nameLabel
.
font
=
RobotoFont
.
mediumWithSize
(
18
)
view
.
addSubview
(
nameLabel
)
profileView
.
translatesAutoresizingMaskIntoConstraints
=
false
MaterialLayout
.
alignFromTopLeft
(
view
,
child
:
profileView
,
top
:
30
,
left
:
(
view
.
bounds
.
width
-
72
)
/
2
)
MaterialLayout
.
size
(
view
,
child
:
profileView
,
width
:
72
,
height
:
72
)
nameLabel
.
translatesAutoresizingMaskIntoConstraints
=
false
MaterialLayout
.
alignFromTop
(
view
,
child
:
nameLabel
,
top
:
130
)
MaterialLayout
.
alignToParentHorizontally
(
view
,
child
:
nameLabel
,
left
:
20
,
right
:
20
)
}
...
...
@@ -118,7 +115,6 @@ class AppLeftViewController: UIViewController {
// Use MaterialLayout to easily align the tableView.
view
.
addSubview
(
tableView
)
tableView
.
translatesAutoresizingMaskIntoConstraints
=
false
MaterialLayout
.
alignToParent
(
view
,
child
:
tableView
,
top
:
170
)
}
}
...
...
Examples/Programmatic/App/App/AppMenuViewController.swift
View file @
2e247729
...
...
@@ -140,7 +140,6 @@ class AppMenuViewController: MenuViewController {
menuView
.
menu
.
views
=
[
menuButton
,
blueButton
,
greenButton
,
yellowButton
]
view
.
addSubview
(
menuView
)
menuView
.
translatesAutoresizingMaskIntoConstraints
=
false
MaterialLayout
.
size
(
view
,
child
:
menuView
,
width
:
baseViewSize
.
width
,
height
:
baseViewSize
.
height
)
MaterialLayout
.
alignFromBottomRight
(
view
,
child
:
menuView
,
bottom
:
menuViewInset
,
right
:
menuViewInset
)
}
...
...
Examples/Programmatic/App/App/AppNavigationController.swift
View file @
2e247729
...
...
@@ -52,7 +52,6 @@ class AppNavigationController: NavigationController {
statusBarView
!.
backgroundColor
=
MaterialColor
.
blue
.
darken2
view
.
addSubview
(
statusBarView
!
)
statusBarView
!.
translatesAutoresizingMaskIntoConstraints
=
false
MaterialLayout
.
alignFromTop
(
view
,
child
:
statusBarView
!
)
MaterialLayout
.
alignToParentHorizontally
(
view
,
child
:
statusBarView
!
)
MaterialLayout
.
height
(
view
,
child
:
statusBarView
!
,
height
:
20
)
...
...
Examples/Programmatic/App/App/ItemViewController.swift
View file @
2e247729
...
...
@@ -159,7 +159,6 @@ class ItemViewController: UIViewController {
imageCardView
.
image
=
image
scrollView
.
addSubview
(
imageCardView
)
imageCardView
.
translatesAutoresizingMaskIntoConstraints
=
false
}
}
}
Examples/Programmatic/App/App/RecipesViewController.swift
View file @
2e247729
...
...
@@ -261,7 +261,6 @@ class RecipesViewController: UIViewController {
// Use MaterialLayout to easily align the tableView.
view
.
addSubview
(
tableView
)
tableView
.
translatesAutoresizingMaskIntoConstraints
=
false
MaterialLayout
.
alignToParent
(
view
,
child
:
tableView
)
}
}
...
...
@@ -308,7 +307,6 @@ extension RecipesViewController: UITableViewDataSource {
label
.
text
=
"Favorites"
header
.
addSubview
(
label
)
label
.
translatesAutoresizingMaskIntoConstraints
=
false
MaterialLayout
.
alignToParent
(
header
,
child
:
label
,
left
:
24
)
return
header
...
...
Examples/Programmatic/App/App/RecommendationViewController.swift
View file @
2e247729
...
...
@@ -71,7 +71,6 @@ class RecommendationViewController: UIViewController {
// Use MaterialLayout to easily align the tableView.
view
.
addSubview
(
tableView
)
tableView
.
translatesAutoresizingMaskIntoConstraints
=
false
MaterialLayout
.
alignToParent
(
view
,
child
:
tableView
)
}
}
...
...
@@ -118,7 +117,6 @@ extension RecommendationViewController: UITableViewDataSource {
label
.
text
=
"Recommendations"
header
.
addSubview
(
label
)
label
.
translatesAutoresizingMaskIntoConstraints
=
false
MaterialLayout
.
alignToParent
(
header
,
child
:
label
,
left
:
24
)
return
header
...
...
Sources/iOS/BottomTabBar.swift
View file @
2e247729
...
...
@@ -233,7 +233,6 @@ public class BottomTabBar : UITabBar {
super
.
didMoveToSuperview
()
if
autoLayoutToSuperview
{
if
let
v
:
UIView
=
superview
{
translatesAutoresizingMaskIntoConstraints
=
false
MaterialLayout
.
alignFromBottom
(
v
,
child
:
self
)
MaterialLayout
.
alignToParentHorizontally
(
v
,
child
:
self
)
}
...
...
Sources/iOS/CardView.swift
View file @
2e247729
...
...
@@ -113,7 +113,6 @@ public class CardView : MaterialPulseView {
*/
@IBInspectable
public
var
titleLabel
:
UILabel
?
{
didSet
{
titleLabel
?
.
translatesAutoresizingMaskIntoConstraints
=
false
reloadView
()
}
}
...
...
@@ -141,7 +140,6 @@ public class CardView : MaterialPulseView {
*/
@IBInspectable
public
var
contentView
:
UIView
?
{
didSet
{
contentView
?
.
translatesAutoresizingMaskIntoConstraints
=
false
reloadView
()
}
}
...
...
@@ -169,11 +167,6 @@ public class CardView : MaterialPulseView {
*/
public
var
leftButtons
:
Array
<
UIButton
>
?
{
didSet
{
if
let
v
=
leftButtons
{
for
b
in
v
{
b
.
translatesAutoresizingMaskIntoConstraints
=
false
}
}
reloadView
()
}
}
...
...
@@ -201,11 +194,6 @@ public class CardView : MaterialPulseView {
*/
public
var
rightButtons
:
Array
<
UIButton
>
?
{
didSet
{
if
let
v
=
rightButtons
{
for
b
in
v
{
b
.
translatesAutoresizingMaskIntoConstraints
=
false
}
}
reloadView
()
}
}
...
...
Sources/iOS/ImageCardView.swift
View file @
2e247729
...
...
@@ -206,7 +206,6 @@ public class ImageCardView : MaterialPulseView {
*/
@IBInspectable
public
var
titleLabel
:
UILabel
?
{
didSet
{
titleLabel
?
.
translatesAutoresizingMaskIntoConstraints
=
false
reloadView
()
}
}
...
...
@@ -234,7 +233,6 @@ public class ImageCardView : MaterialPulseView {
*/
@IBInspectable
public
var
contentView
:
UIView
?
{
didSet
{
contentView
?
.
translatesAutoresizingMaskIntoConstraints
=
false
reloadView
()
}
}
...
...
@@ -262,11 +260,6 @@ public class ImageCardView : MaterialPulseView {
*/
public
var
leftButtons
:
Array
<
UIButton
>
?
{
didSet
{
if
let
v
=
leftButtons
{
for
b
in
v
{
b
.
translatesAutoresizingMaskIntoConstraints
=
false
}
}
reloadView
()
}
}
...
...
@@ -294,11 +287,6 @@ public class ImageCardView : MaterialPulseView {
*/
public
var
rightButtons
:
Array
<
UIButton
>
?
{
didSet
{
if
let
v
=
rightButtons
{
for
b
in
v
{
b
.
translatesAutoresizingMaskIntoConstraints
=
false
}
}
reloadView
()
}
}
...
...
Sources/iOS/MaterialCollectionView.swift
View file @
2e247729
...
...
@@ -32,6 +32,46 @@ import UIKit
@IBDesignable
public
class
MaterialCollectionView
:
UICollectionView
{
/// A property that accesses the layer.frame.origin.x property.
@IBInspectable
public
var
x
:
CGFloat
{
get
{
return
layer
.
frame
.
origin
.
x
}
set
(
value
)
{
layer
.
frame
.
origin
.
x
=
value
}
}
/// A property that accesses the layer.frame.origin.y property.
@IBInspectable
public
var
y
:
CGFloat
{
get
{
return
layer
.
frame
.
origin
.
y
}
set
(
value
)
{
layer
.
frame
.
origin
.
y
=
value
}
}
/// A property that accesses the layer.frame.size.width property.
@IBInspectable
public
var
width
:
CGFloat
{
get
{
return
layer
.
frame
.
size
.
width
}
set
(
value
)
{
layer
.
frame
.
size
.
width
=
value
}
}
/// A property that accesses the layer.frame.size.height property.
@IBInspectable
public
var
height
:
CGFloat
{
get
{
return
layer
.
frame
.
size
.
height
}
set
(
value
)
{
layer
.
frame
.
size
.
height
=
value
}
}
/// A preset wrapper around contentInset.
public
var
contentInsetPreset
:
MaterialEdgeInset
{
get
{
...
...
Sources/iOS/TextView.swift
View file @
2e247729
...
...
@@ -479,7 +479,6 @@ public class TextView: UITextView {
/// prepares the placeholderLabel property.
private
func
preparePlaceholderLabel
()
{
if
let
v
:
UILabel
=
placeholderLabel
{
v
.
translatesAutoresizingMaskIntoConstraints
=
false
v
.
font
=
font
v
.
textAlignment
=
textAlignment
v
.
numberOfLines
=
0
...
...
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