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
1fc740e4
Unverified
Commit
1fc740e4
authored
Oct 08, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storyboard-examples: initial changes to Switch
parent
ddc4fd85
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
Examples/Programmatic/ToolbarController/ToolbarController/RootViewController.swift
+4
-1
Sources/iOS/Bar.swift
+3
-3
Sources/iOS/NavigationBar.swift
+4
-4
Sources/iOS/Switch.swift
+0
-0
No files found.
Examples/Programmatic/ToolbarController/ToolbarController/RootViewController.swift
View file @
1fc740e4
...
...
@@ -36,6 +36,7 @@ class RootViewController: UIViewController {
private
var
menuButton
:
IconButton
!
private
var
starButton
:
IconButton
!
private
var
searchButton
:
IconButton
!
private
var
switchControl
:
Switch
!
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -74,8 +75,10 @@ class RootViewController: UIViewController {
tc
.
toolbar
.
detail
=
"Build Beautiful Software"
tc
.
toolbar
.
detailLabel
.
textAlignment
=
.
left
switchControl
=
Switch
(
state
:
.
off
,
style
:
.
light
,
size
:
.
small
)
tc
.
toolbar
.
leftViews
=
[
menuButton
]
tc
.
toolbar
.
rightViews
=
[
starButton
,
searchButton
]
tc
.
toolbar
.
rightViews
=
[
s
witchControl
,
s
tarButton
,
searchButton
]
}
}
Sources/iOS/Bar.swift
View file @
1fc740e4
...
...
@@ -94,7 +94,7 @@ open class Bar: View {
/// Grid cell factor.
@IBInspectable
open
var
gridFactor
:
CGFloat
=
24
{
open
var
gridFactor
:
CGFloat
=
12
{
didSet
{
assert
(
0
<
gridFactor
,
"[Material Error: gridFactor must be greater than 0.]"
)
layoutSubviews
()
...
...
@@ -242,8 +242,8 @@ open class Bar: View {
open
override
func
prepare
()
{
super
.
prepare
()
autoresizingMask
=
.
flexibleWidth
interimSpacePreset
=
.
interimSpace
3
contentEdgeInsetsPreset
=
.
square1
interimSpacePreset
=
.
interimSpace
4
contentEdgeInsetsPreset
=
.
wideRectangle2
prepareContentView
()
}
...
...
Sources/iOS/NavigationBar.swift
View file @
1fc740e4
...
...
@@ -92,7 +92,7 @@ open class NavigationBar: UINavigationBar {
/// Grid cell factor.
@IBInspectable
open
var
gridFactor
:
CGFloat
=
24
{
open
var
gridFactor
:
CGFloat
=
12
{
didSet
{
assert
(
0
<
gridFactor
,
"[Material Error: gridFactor must be greater than 0.]"
)
layoutSubviews
()
...
...
@@ -294,9 +294,9 @@ open class NavigationBar: UINavigationBar {
barStyle
=
.
black
isTranslucent
=
false
depthPreset
=
.
depth1
interimSpacePreset
=
.
interimSpace3
contentEdgeInsetsPreset
=
.
square1
contentScaleFactor
=
Device
.
scale
interimSpacePreset
=
.
interimSpace4
contentEdgeInsetsPreset
=
.
wideRectangle2
contentScaleFactor
=
Device
.
scale
backButtonImage
=
Icon
.
cm
.
arrowBack
let
image
=
UIImage
.
imageWithColor
(
color
:
Color
.
clear
,
size
:
CGSize
(
width
:
1
,
height
:
1
))
shadowImage
=
image
...
...
Sources/iOS/Switch.swift
View file @
1fc740e4
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