Commit 75995b7c by Daniel Dahan

updated README and example projects

parent 1523f485
......@@ -42,9 +42,9 @@ class ViewController: UIViewController {
*/
private func prepareGeneralMaterialLayerExample() {
let materialLayer: MaterialLayer = MaterialLayer(frame: CGRectMake(132, 132, 150, 150))
materialLayer.image = UIImage(named: "BluePattern")
materialLayer.shape = .Circle
materialLayer.shadowDepth = .Depth2
materialLayer.image = UIImage(named: "BluePattern")
// Add layer to view.
view.layer.addSublayer(materialLayer)
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "CosmicMind.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -42,10 +42,13 @@ class ViewController: UIViewController {
*/
private func prepareGeneralMaterialViewExample() {
let materialView: MaterialView = MaterialView(frame: CGRectMake(132, 132, 150, 150))
materialView.shape = .Circle
materialView.backgroundColor = MaterialColor.blueGrey.darken4
materialView.image = UIImage(named: "StarPattern")
materialView.contentsGravity = .BottomRight
materialView.shape = .Square
materialView.shadowDepth = .Depth2
materialView.image = UIImage(named: "CosmicMind")
materialView.backgroundColor = MaterialColor.teal.darken1
materialView.cornerRadius = .Radius2
// Add view to view controller.
view.addSubview(materialView)
......
......@@ -16,14 +16,26 @@ MaterialLayer is a lightweight CAShapeLayer used throughout MaterialKit. It is d
```swift
let materialLayer: MaterialLayer = MaterialLayer(frame: CGRectMake(132, 132, 150, 150))
materialLayer.image = UIImage(named: "BluePattern")
materialLayer.shape = .Circle
materialLayer.shadowDepth = .Depth2
materialLayer.image = UIImage(named: "BluePattern")
```
### MaterialView
MaterialView is the base UIView class used throughout MaterialKit. Like MaterialLayer, it is designed to easily take shape, depth, and animations. The major difference is that MaterialView has all the added features of the UIView class.
MaterialView is the base UIView class used throughout MaterialKit. Like MaterialLayer, it is designed to easily take shape, depth, and animations. The major difference is that MaterialView has all the added features of the UIView class. Below is an example of setting a MaterialView's cornerRadius, image position, shape, and depth.
![MaterialKitMaterialView](http://www.materialkit.io/MK/MaterialKitMaterialView.gif)
```swift
let materialView: MaterialView = MaterialView(frame: CGRectMake(132, 132, 150, 150))
materialView.backgroundColor = MaterialColor.blueGrey.darken4
materialView.image = UIImage(named: "StarPattern")
materialView.contentsGravity = .BottomRight
materialView.shape = .Square
materialView.shadowDepth = .Depth2
materialView.cornerRadius = .Radius2
```
### MaterialPulseView
......
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