-
Notifications
You must be signed in to change notification settings - Fork 1
How To Enable Binding Support
Michael edited this page May 1, 2016
·
2 revisions
Beacon currently offers two ways to enable binding support.
The default mechanism is to add the Beacon binding behavior to your view controller. You do that in viewDidLoad
- (void)viewDidLoad {
[super viewDidLoad];
[AKABindingBehavior addToViewController:self];
}
if your view controller also serves as view model (and maybe delegate) or
- (void)viewDidLoad {
[super viewDidLoad];
[AKABindingBehavior addToViewController:self
withDataContext:self.myViewModel
delegate:myBindingBehaviorDelegate];
}
to explicitly specify the view model and binding delegate.
This is all you have to do to enable binding support for your view controller and from then on, you can just assign binding expressions to views from the properties inspector of Xcode's interface builder.