iOS 卡片视图:MaterialCardView
                 ybw8
                 10年前
            
                    MaterialCardView 可以简单快捷地创建Material设计卡片。
Usage
Create aMaterialCardView
let c = MaterialCardView ( x: 10, y: StatusBarHeight + 10, w: ScreenWidth-20) view.addSubview (c)
And start to addMaterialCardCells
- Header Cell
 
func addHeader (title: String) func addHeader (view: UIView)
- Cell
 
addCell (text: String, action: (()->Void)? = nil) addCell (view: UIView, action: (()->Void)? = nil) addCell (cell: MaterialCardCell)
- FooterCell
 
func addFooter (title: String) func addFooter (view: UIView)
Material Card will update its frame size when you add or removeMaterialCardCells.
This is why you don't set itsheightvalue when initilize it.
样本: