Commit 6d917815 by Daniel Dahan

updated MaterialView example

parent 975085e3
{
"images" : [
{
"idiom" : "universal",
"filename" : "ChakraIcon.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ChakraIcon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ChakraIcon@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -41,13 +41,11 @@ class ViewController: UIViewController {
:description: General usage example.
*/
private func prepareGeneralMaterialViewExample() {
let materialView: MaterialView = MaterialView(frame: CGRectMake(7, 100, 400, 400))
materialView.backgroundColor = MaterialColor.deepPurple.lighten1
materialView.image = UIImage(named: "ChakraIcon")
materialView.contentsGravity = .BottomRight
let materialView: MaterialView = MaterialView(frame: CGRectMake(107, 107, 200, 200))
materialView.image = UIImage(named: "Flower")
materialView.shape = .Square
materialView.shadowDepth = .Depth2
materialView.cornerRadius = .Radius2
materialView.shadowDepth = .Depth5
materialView.cornerRadius = .Radius3
// Add view to view controller.
......
......@@ -23,18 +23,16 @@ materialLayer.shadowDepth = .Depth2
### 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. Below is an example of setting a MaterialView's cornerRadius, image position, shape, and depth.
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, shape, and depth.
![MaterialKitMaterialView](http://www.materialkit.io/MK/MaterialKitMaterialView.gif)
```swift
let materialView: MaterialView = MaterialView(frame: CGRectMake(7, 100, 400, 400))
materialView.backgroundColor = MaterialColor.deepPurple.lighten1
materialView.image = UIImage(named: "ChakraIcon")
materialView.contentsGravity = .BottomRight
let materialView: MaterialView = MaterialView(frame: CGRectMake(107, 107, 200, 200))
materialView.image = UIImage(named: "Flower")
materialView.shape = .Square
materialView.shadowDepth = .Depth2
materialView.cornerRadius = .Radius2
materialView.shadowDepth = .Depth5
materialView.cornerRadius = .Radius3
```
### 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