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
d8232bb7
Commit
d8232bb7
authored
Oct 05, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updating README
parent
01b4a6d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
README.md
+3
-5
Source/ImageCardView.swift
+4
-3
No files found.
README.md
View file @
d8232bb7
...
...
@@ -200,9 +200,9 @@ A BasicCardView can easily add an image as its background, below is the code tha

```
swift
let
v
:
BasicCardView
=
BasicCardView
(
titleLabel
:
UILabel
(),
detailLabel
:
UI
Label
())
!
let
v
:
BasicCardView
=
BasicCardView
(
titleLabel
:
MaterialLabel
(),
detailLabel
:
Material
Label
())
!
v
.
spotlight
=
true
v
.
image
=
UIImage
(
named
:
"img
3
"
)
v
.
image
=
UIImage
(
named
:
"img
4
"
)
v
.
titleLabel
!.
textColor
=
MaterialColor
.
white
v
.
titleLabel
!.
font
=
RobotoFont
.
regularWithSize
(
18
)
...
...
@@ -229,12 +229,10 @@ An ImageCardView is a great way to enclose many components into a single and pre

```
swift
let
v
:
ImageCardView
=
ImageCardView
(
)
let
v
:
ImageCardView
=
ImageCardView
(
image
:
UIImage
(
named
:
"img4"
))
!
v
.
pulseColor
=
MaterialColor
.
blueGrey
.
lighten4
v
.
pulseFill
=
true
v
.
image
=
UIImage
(
named
:
"space"
)
v
.
titleLabel
=
MaterialLabel
()
v
.
titleLabel
!.
textColor
=
MaterialColor
.
white
v
.
titleLabel
!.
font
=
RobotoFont
.
regularWithSize
(
24
)
...
...
Source/ImageCardView.swift
View file @
d8232bb7
...
...
@@ -286,9 +286,9 @@ public class ImageCardView : MaterialPulseView {
/**
:name: init
*/
public
convenience
init
?(
titleLabel
:
UILabel
?
=
nil
,
detailLabel
:
UILabel
?
=
nil
,
leftButtons
:
Array
<
UIButton
>
?
=
nil
,
rightButtons
:
Array
<
UIButton
>
?
=
nil
)
{
public
convenience
init
?(
image
:
UIImage
?
=
nil
,
titleLabel
:
UILabel
?
=
nil
,
detailLabel
:
UILabel
?
=
nil
,
leftButtons
:
Array
<
UIButton
>
?
=
nil
,
rightButtons
:
Array
<
UIButton
>
?
=
nil
)
{
self
.
init
(
frame
:
CGRectNull
)
prepareProperties
(
titleLabel
,
detailLabel
:
detailLabel
,
leftButtons
:
leftButtons
,
rightButtons
:
rightButtons
)
prepareProperties
(
image
,
titleLabel
:
titleLabel
,
detailLabel
:
detailLabel
,
leftButtons
:
leftButtons
,
rightButtons
:
rightButtons
)
}
/**
...
...
@@ -483,7 +483,8 @@ public class ImageCardView : MaterialPulseView {
//
// :name: prepareProperties
//
internal
func
prepareProperties
(
titleLabel
:
UILabel
?,
detailLabel
:
UILabel
?,
leftButtons
:
Array
<
UIButton
>
?,
rightButtons
:
Array
<
UIButton
>
?)
{
internal
func
prepareProperties
(
image
:
UIImage
?,
titleLabel
:
UILabel
?,
detailLabel
:
UILabel
?,
leftButtons
:
Array
<
UIButton
>
?,
rightButtons
:
Array
<
UIButton
>
?)
{
self
.
image
=
image
self
.
titleLabel
=
titleLabel
self
.
detailLabel
=
detailLabel
self
.
leftButtons
=
leftButtons
...
...
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