Protocols
The following protocols are available globally.
-
Protocol for entities able to fulfill in-app navigation requests.
See moreDeclaration
Objective-C
@protocol MMMNavigationHandler <NSObject>
Swift
protocol MMMNavigationHandler : NSObjectProtocol
-
This is the delegate corresponding to each navigation item in the stack. Its main purpose is to be able to handle popping of the corresponding navigation item.
See moreDeclaration
Objective-C
@protocol MMMNavigationStackItemDelegate <NSObject>
Swift
protocol MMMNavigationStackItemDelegate : NSObjectProtocol
-
A token corresponding to a single node (item) of the current UI navigation path. Note that a reference to the token must be stored somewhere or the corresponding item will be popped right away.
See moreDeclaration
Objective-C
@protocol MMMNavigationStackItem <NSObject>
Swift
protocol MMMNavigationStackItem : NSObjectProtocol
-
A view supporting this will be notified when one of the child views indicates potential changes in its contents that might influence its size via
mmm_setPreferredSizeCouldChange
.This is handy with views that do not fully rely on Auto Layout, like UITableView, where a change in the size of a cell would require it to reload this cell.
The implementation is responsible for coalescing notification and avoiding notification loops.
See moreDeclaration
Objective-C
@protocol MMMPreferredSizeChanges <NSObject>
Swift
protocol MMMPreferredSizeChanges : NSObjectProtocol
-
Something that converts dimensions given for one size class (e.g. font sizes from the design made for iPhone 6) into dimensions for another size class (e.g. font size for iPhone 5 that were not explicitely mentioned in the design).
Different converters can be used for different kinds of values. For example, it might make sense to scale paddings proportionally to screen widths, but keep font sizes the same.
See moreDeclaration
Objective-C
@protocol MMMStylesheetConverter <NSObject>
Swift
protocol MMMStylesheetConverter : NSObjectProtocol