MTMaterialView

From iPhone Development Wiki
Jump to: navigation, search

MTMaterialView is a UIView subclass in MaterialKit.framework.

Creating an instance

The simplest way to create an instance of this is class is using the following method:

+(id)materialViewWithRecipe:(NSInteger)arg0 configuration:(NSInteger)arg1 ;

In Context:

MTMaterialView *materialVIew = [objc_getClass("MTMaterialView") materialViewWithRecipe:1 configuration:1];

Notes

Options for recipe:

  1. = folder[Dark/Light] (homescreen folders)
  2. = platter (Notifications / Widgets)
  3. = ??? -- can be tested
  4. = ??? -- can be tested
  5. = modules (CCModules)

The meaning of configuration is unknown.

Important properties

Weighting

@property (nonatomic) CGFloat weighting;

weighting is basically the amount of blur/texture on the view, ranging from 0.0 - 1.0.

Other info

The blur and colouring are internally CAFilters on the layer of the view.