https://github.com/nathanwalker/materialcard
iOS Material Design Card View.
https://github.com/nathanwalker/materialcard
Last synced: about 1 year ago
JSON representation
iOS Material Design Card View.
- Host: GitHub
- URL: https://github.com/nathanwalker/materialcard
- Owner: NathanWalker
- License: mit
- Created: 2016-03-21T04:56:48.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-01-04T16:56:02.000Z (over 6 years ago)
- Last Synced: 2025-04-15T14:05:28.172Z (about 1 year ago)
- Language: Swift
- Size: 137 KB
- Stars: 16
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MaterialCard
[](http://cocoapods.org/pods/MaterialCard)
[](http://cocoapods.org/pods/MaterialCard)
[](http://cocoapods.org/pods/MaterialCard)
An iOS CocoaPod that provides a MaterialCard class for creating Card Views based on the Material Design spec.
| Screenshot |
| :---: |
|  |
## Installation
MaterialCard is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod "MaterialCard"
```
## Usage
To run the example project, clone the repo, and run `pod install` from the Example directory first.
```
let card = MaterialCard(frame: CGRect(x: 10, y: UIApplication.shared.statusBarFrame.size.height + 10, width: UIApplication.shared.statusBarFrame.size.width - 20, height: 100))
let label = UILabel(frame: CGRect(x: 0, y: 37, width: card.frame.size.width, height: 21))
label.textAlignment = NSTextAlignment.center
label.text = "MaterialCard Demo"
card.backgroundColor = UIColor.white
card.shadowOpacity = 0.2
card.shadowOffsetHeight = 0
card.cornerRadius = 0
card.addSubview(label)
self.view.addSubview(card)
```
## Authors
* Andrew Clissold, andrewclissold@gmail.com
* Nathan Walker, walkerrunpdx@gmail.com
## License
MaterialCard is available under the MIT license. See the LICENSE file for more info.