Rename to loadViewWithCompletionHandler:

This commit is contained in:
cacaodev committed 2016-02-07 11:17:53 +01:00
1 parent d547d04277
commit ccdc1eed5a
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -176,7 +176,7 @@ var CPViewControllerCachedCibs;
_view = [CPView new];
}
- (void)loadViewAsynchronously:(Function/*(view, error)*/)aHandler
- (void)loadViewWithCompletionHandler:(Function/*(view, error)*/)aHandler
{
if (_view)
return;
@@ -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];