Commit d8232bb7 by Daniel Dahan

updating README

parent 01b4a6d2
......@@ -200,9 +200,9 @@ A BasicCardView can easily add an image as its background, below is the code tha
![MKPreview](http://www.materialkit.io/github/img8.gif)
```swift
let v: BasicCardView = BasicCardView(titleLabel: UILabel(), detailLabel: UILabel())!
let v: BasicCardView = BasicCardView(titleLabel: MaterialLabel(), detailLabel: MaterialLabel())!
v.spotlight = true
v.image = UIImage(named: "img3")
v.image = UIImage(named: "img4")
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
![MKPreview](http://www.materialkit.io/github/img10.gif)
```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)
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment