What is Brick?

Brick is a generic view model for both basic and complex scenarios. Mapping a basic table view cells is as easy as pie, if you have more properties, you can use the meta dictionary to add all additional properties that you might need. It also supports relations so that you can nest view models inside of view models.

  • index Calculated value to determine the index it has inside of the component.
  • title The headline for your data, in a UITableViewCell it is normally used for textLabel.text but you are free to use it as you like.
  • subtitle Same as for the title, in a UITableViewCell it is normally used for detailTextLabel.text.
  • text This is an optional property that can be used for larger amount of text needed to describe your Item
  • image Can be either a URL string or a local string, you can easily determine if it should use a local or remote asset in your view.
  • kind Is used for the reuseIdentifier of your UITableViewCell or UICollectionViewCell.
  • action Action identifier for you to parse and process when a user taps on a list item. We recommend Compass as centralized navigation system.
  • size Can either inherit from the UITableViewCell/UICollectionViewCell, or be manually set by the height calculations inside of your view.
  • meta This is used for extra data that you might need access to inside of your view, it can be a hex color, a unique identifer or additional images for your view.

Overview

  • Pricing: Free
  • Resource Link: https://github.com/hyperoslo/Brick
  • Resource Maker: Hyper
  • Mobile Platform Destination: iOS Apps
  • Mobile Platform Support: Native iOS
  • Programming Languages: Swift
  • CocoaPods: Brick
  • Carthage: hyperoslo/Brick