iOS 卡片視圖:MaterialCardView

ybw8 9年前發布 | 25K 次閱讀 iOS開發 移動開發 MaterialCardView

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.

樣本:

iOS 卡片視圖:MaterialCardView

項目主頁:http://www.baiduhome.net/lib/view/home/1433401476416

 本文由用戶 ybw8 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!