diff --git a/AppKit/CPViewController.j b/AppKit/CPViewController.j index 9445d3c0a..22e30789b 100644 --- a/AppKit/CPViewController.j +++ b/AppKit/CPViewController.j @@ -176,7 +176,7 @@ var CPViewControllerCachedCibs; _view = [CPView new]; } -- (void)loadViewAsynchronously:(Function/*(view, error)*/)aHandler +- (void)loadViewWithCompletionHandler:(Function/*(view, error)*/)aHandler { if (_view) return; diff --git a/Tests/Manual/CPViewController/AppController.j b/Tests/Manual/CPViewController/AppController.j index 2d3f50678..589f707ca 100644 --- a/Tests/Manual/CPViewController/AppController.j +++ b/Tests/Manual/CPViewController/AppController.j @@ -64,12 +64,12 @@ var vc = [[CPViewController alloc] initWithCibName:@"ViewController" bundle:nil]; var vc2 = [[CPViewController alloc] initWithCibName:@"ViewController2" bundle:nil]; - [vc loadViewAsynchronously:function(view1, error) + [vc loadViewWithCompletionHandler:function(view1, error) { [view1 setBackgroundColor:[CPColor redColor]]; [holderView addSubview:view1]; - [vc2 loadViewAsynchronously:function(view2, error) + [vc2 loadViewWithCompletionHandler:function(view2, error) { [view2 setBackgroundColor:[CPColor greenColor]]; [view1 addSubview:view2];