The iOS framework that grows only as fast as its documentation
Nimbus Launcher Model

Classes

class  NILauncherViewModel
 A launcher view model that complies to the NILauncherDataSource protocol. More...
 
protocol  <NILauncherViewModelDelegate>
 The delegate for NILauncherViewModel. More...
 
protocol  <NILauncherViewObject>
 The minimal amount of information required to configure a button view. More...
 
protocol  <NILauncherViewObjectView>
 A protocol that a launcher button view can implement to allow itself to be configured. More...
 
class  NILauncherViewObject
 An implementation of the NILauncherViewObject protocol. More...
 

Overview

The Nimbus Launcher provides a model object that can store all of the launcher data.

This model object works similarly to NITableViewModel.

Presented below is an example of subclassing a NILauncherViewController and using a NILauncherViewModel to supply the data source information.

@implementation CustomLauncherViewController()
@property (nonatomic, retain) NILauncherViewModel* model;
@end
@interface CustomLauncherViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
NSArray* contents =
[NSArray arrayWithObjects:
[NSArray arrayWithObjects:
nil],
[NSArray arrayWithObjects:
nil],
[NSArray arrayWithObjects:
nil],
nil];
_model = [[NILauncherViewModel alloc] initWithArrayOfPages:contents delegate:nil];
}
return self;
}
- (void)viewDidLoad {
[super viewDidLoad];
self.launcherView.dataSource = self.model;
}
@end