|
//
// pointsMallController.m
// ThePaperBase
//
// Created by Huixin on 15/10/22.
// Copyright © 2015年 scar1900. All rights reserved.
//
#import "pointsMallController.h"
#import "pointsMallTableController.h"
@interface pointsMallController ()
@property(nonatomic, strong)pointsMallTableController *pointsMallTableVC;
@end
@implementation pointsMallController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.titleStr = @"我的海贝";
self.view.backgroundColor = [UIColor colorWithHexString:BackGroundColor];
[self.view addSubview:self.pointsMallTableVC.view];
[self addChildViewController:self.pointsMallTableVC];
[self.pointsMallTableVC didMoveToParentViewController:self];
[self layoutViews];
}
- (void)layoutViews {
[self.pointsMallTableVC.view makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.naviBar.bottom);
make.left.equalTo(self.view.left);
make.right.equalTo(self.view.right);
make.bottom.equalTo(self.view.bottom);
}];
}
#pragma mark - get and set method
- (pointsMallTableController*)pointsMallTableVC {
if (!_pointsMallTableVC) {
_pointsMallTableVC = [pointsMallTableController new];
}
return _pointsMallTableVC;
}
#pragma mark - naviBar
- (void)tapNaviBar:(id)sender {
if (![self.pointsMallTableVC.tableView isHidden]) {
[self.pointsMallTableVC.tableView setContentOffset:CGPointZero animated:YES];
return;
}
}
- (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
|