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
8577de35
Commit
8577de35
authored
Jun 22, 2018
by
Orkhan Alikhanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applied correct setter and getter convention
parent
a045b498
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
Sources/iOS/Material+UIButton.swift
+3
-3
Sources/iOS/Material+UILabel.swift
+3
-3
No files found.
Sources/iOS/Material+UIButton.swift
View file @
8577de35
...
@@ -36,11 +36,11 @@ import UIKit
...
@@ -36,11 +36,11 @@ import UIKit
public
extension
UIButton
{
public
extension
UIButton
{
/// Convenience way to change titleLabel font size.
/// Convenience way to change titleLabel font size.
var
fontSize
:
CGFloat
{
var
fontSize
:
CGFloat
{
set
{
titleLabel
?
.
font
=
titleLabel
?
.
font
?
.
withSize
(
newValue
)
??
UIFont
.
systemFont
(
ofSize
:
newValue
)
}
get
{
get
{
return
titleLabel
?
.
font
?
.
pointSize
??
UIFont
.
buttonFontSize
return
titleLabel
?
.
font
?
.
pointSize
??
UIFont
.
buttonFontSize
}
}
set
(
value
)
{
titleLabel
?
.
font
=
titleLabel
?
.
font
?
.
withSize
(
value
)
??
UIFont
.
systemFont
(
ofSize
:
value
)
}
}
}
}
}
Sources/iOS/Material+UILabel.swift
View file @
8577de35
...
@@ -36,11 +36,11 @@ import UIKit
...
@@ -36,11 +36,11 @@ import UIKit
public
extension
UILabel
{
public
extension
UILabel
{
/// Convenience way to change font size.
/// Convenience way to change font size.
var
fontSize
:
CGFloat
{
var
fontSize
:
CGFloat
{
set
{
font
=
font
?
.
withSize
(
newValue
)
??
UIFont
.
systemFont
(
ofSize
:
newValue
)
}
get
{
get
{
return
font
?
.
pointSize
??
UIFont
.
labelFontSize
return
font
?
.
pointSize
??
UIFont
.
labelFontSize
}
}
set
(
value
)
{
font
=
font
?
.
withSize
(
value
)
??
UIFont
.
systemFont
(
ofSize
:
value
)
}
}
}
}
}
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