|
//
// loginHomeController.m
// ThePaperDemo
//
// Created by scar1900 on 14/12/3.
// Copyright (c) 2014年 scar1900. All rights reserved.
//
#import "loginHomeController.h"
#import "loginFrontPageController.h"
@interface loginHomeController ()
@property(nonatomic, strong)loginFrontPageController *loginFrontPageVC;
@end
@implementation loginHomeController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor colorWithHexString:BackGroundColor];
self.titleStr = @"登录";
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(recvBroadcast:) name:HAVELOGIN object:nil];
[self addChildViewController:self.loginFrontPageVC];
[self.view addSubview:self.loginFrontPageVC.view];
[self.loginFrontPageVC didMoveToParentViewController:self];
[self.loginFrontPageVC.view makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.view).with.insets(UIEdgeInsetsMake(self.barHeight, 0, 0, 0));
}];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.navigationController.navigationBarHidden = YES;
}
- (loginFrontPageController*)loginFrontPageVC {
if (!_loginFrontPageVC) {
_loginFrontPageVC = [[loginFrontPageController alloc] init];
}
return _loginFrontPageVC;
}
-(void)recvBroadcast:(NSNotification *)notify {
[self.navigationController popToViewController:self animated:NO];
[self.navigationController popViewControllerAnimated:YES];
}
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self name:HAVELOGIN object:nil];
_loginFrontPageVC = nil;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#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
|