• 汪洋's avatar
    - 使用onPageStart与onPageEnd都替换为onPVStart,onPVEnd · 0e425556
    汪洋 authored
    - 优化onPageStart,让其真正有用
    - PV参数使用协议,这样view也可以使用这些PV属性。例子:GMWelfarePopView
    - selectedNavigationController的安全性,已经优化为visibleController
    - 优化了referer的获取
    - netStatus获取优化
    - GMPhobosPV 优化
    - GPS优化
    - 精简了handlePVEventAppInForeground、handlePVEventAppInBackgound
    - onPVStart真正变得有用途
    - 添加catchNullInAttributes
    0e425556
GMPhobosController.m 1.03 KB
//
//  GMPhobosController.m
//  GMPhobos
//
//  Created by wangyang on 2017/2/7.
//  Copyright © 2017年 licong. All rights reserved.
//

#import "GMPhobosController.h"

@interface GMPhobosController ()

@end

@implementation GMPhobosController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];

    // 导航栏隐藏在 viewWillAppear 里控制的原因是在viewDidLoad时,有可能 navigationController 与 self 并没有关系
    self.navigationController.navigationBarHidden = YES;
    [[Phobos sharedClient] onPVStart:self];
}

- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];

    // 如果栈内的层级小于等于两个,取消隐藏下面的tabbar
    if (self.navigationController.childViewControllers.count <= 2) {
        [self setHidesBottomBarWhenPushed:NO];
    }

    if (self.pageName.length > 0) {
        [[Phobos sharedClient] onPVEnd:self];
    }
}

@end