#import "QHChatRedBagView.h"
#import "QHRedPacketGetingViewController.h"
@interface QHChatRedBagView ()
@end
@implementation QHChatRedBagView
#pragma mark 点击红包领取
- (IBAction)clickRedBag:(id)sender {
QHRedPacketGetingViewController *redViewCtrl = [[QHRedPacketGetingViewController alloc]initWithNibName:@"QHRedPacketGetingViewController" bundle:nil];
UIViewController *vc = [self obtainVisible];
[vc.navigationController pushViewController:redViewCtrl animated:YES];
}
- (UIViewController *)obtainVisible {
UITabBarController *tabCtrl = (UITabBarController *)[UIApplication sharedApplication].keyWindow.rootViewController;
UINavigationController *navi = tabCtrl.selectedViewController;
UIViewController *vc = [navi visibleViewController];
return vc;
}
@end