//
//  UIViewController+pushURL.m
//  Pods
//
//  Created by wangyang on 16/8/2.
//
//

#import "UIViewController+pushURL.h"
#import "GMediator.h"

@implementation UIViewController (pushURL)
- (BOOL)pushURL:(NSString *)url {
    return [[GMediator sharedInstance] performActionWithUrl:url completion:^(NSDictionary *dic) {
        UIViewController *controller = dic[@"result"];
        if ([controller isKindOfClass:[UIViewController class]]) {
            [self.navigationController pushViewController:controller animated:YES];
        }
    }];
}
@end
