澎湃iPad上线版本

gambitCenterHomeController.m 3.7KB

    // // gambitCenterHomeController.m // ThePaperHD // // Created by liyuan on 15/4/17. // Copyright (c) 2015年 scar1900. All rights reserved. // #import "gambitCenterHomeController.h" #import "MLNavigationController.h" #import "myGambitCenterController.h" @interface gambitCenterHomeController ()<myGambitCenterDelegate>{ NSInteger index; } @property(nonatomic,strong) MLNavigationController *navigationController; @property(nonatomic,strong)myGambitCenterController *homeVC; @end @implementation gambitCenterHomeController @synthesize delegate; @synthesize isNeedHold; - (void)viewDidLoad { [super viewDidLoad]; [MobClick event:@"41"]; self.view.backgroundColor =[UIColor clearColor]; self.homeVC = [[myGambitCenterController alloc]init]; self.homeVC.gambitCenterDelegate = self; [self addChildViewController:self.homeVC]; self.navigationController = [[MLNavigationController alloc]initWithRootViewController:self.homeVC]; self.navigationController.view.backgroundColor = [UIColor clearColor]; self.navigationController.view.frame = self.view.bounds; [self.view addSubview:self.navigationController.view]; [self addChildViewController:self.navigationController]; // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pushToDetailContent:) name:PUSHTODETAILCONTENT object:nil]; // Do any additional setup after loading the view. } - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; self.isNeedHold = NO; } //- (void)pushToDetailContent:(NSNotification*)noti { // self.isNeedHold = YES; // // NSDictionary *dic = noti.userInfo; // id data = dic[@"data"]; // if ([self.delegate respondsToSelector:@selector(goToContent:)]) { // [self.delegate goToContent:data]; // } //} -(void)gotoAskVC{ self.isNeedHold = YES; if ([self.delegate respondsToSelector:@selector(goToTopicList)]) { [self.delegate goToTopicList]; } } -(void)gotoCreateVC:(TopicInfoBO *)topicInfo tag:(NSString *)tag{//【需求】话题:话题修改(bug:4313) self.isNeedHold = YES; if ([self.delegate respondsToSelector:@selector(goToCreateList:tag:)]) { [self.delegate goToCreateList:topicInfo tag:tag]; } } //-(void) gotoCreateVC:(TopicInfoBO *)topicInfo{ // self.isNeedHold = YES; // if ([self.delegate respondsToSelector:@selector(goToCreateList:)]) { // [self.delegate goToCreateList:topicInfo]; // } //} -(void)gotoInfoVc:(TopicInfoBO *)topicInfo{ self.isNeedHold = YES; if ([self.delegate respondsToSelector:@selector(goTopicInfo:)]) { [self.delegate goTopicInfo:topicInfo]; } } - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; self.isNeedHold = NO; NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithDictionary:[TPUserDefault instance].msgMark]; [dic setValue:@(0) forKey:@"createdTopicMark"]; [dic setValue:@(0) forKey:@"attendTopicMark"]; [TPUserDefault instance].msgMark = dic; if ([self.delegate respondsToSelector:@selector(hasAppearMyGambitCenter)]) { [self.delegate hasAppearMyGambitCenter]; } } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } -(void)setCurrentPageIndex:(NSInteger)current{ self.homeVC.currentIndex = current; } /* #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. } */ @end