//
|
// subregionViewController.m
|
// BuWanVideo2.0
|
//
|
// Created by apple on 2018/3/13.
|
// Copyright © 2018年 com.yeshi.buwansheque.ios. All rights reserved.
|
//
|
|
#import "subregionViewController.h"
|
#import "subregionView.h"
|
@interface subregionViewController ()
|
@property (nonatomic,strong) subregionView *subrView;
|
@end
|
|
@implementation subregionViewController
|
- (instancetype)init {
|
self = [super init];
|
if (self) {
|
self.title = @"分类";
|
// UITabBarItem *item = [[UITabBarItem alloc]initWithTitle:self.title image:[UIImage imageNamed:@"Camera-拷贝"] selectedImage:[UIImage imageNamed:@"Camera"]];
|
// item.titlePositionAdjustment = UIOffsetMake(0, -5);
|
// self.tabBarItem = item;
|
}
|
return self;
|
}
|
|
- (void)viewWillAppear:(BOOL)animated {
|
[super viewWillAppear:animated];
|
[self.navigationController setNavigationBarHidden:NO animated:animated];
|
self.navigationController.navigationBar.translucent = NO;
|
self.navigationController.navigationBar.backgroundColor=UIColor.whiteColor;
|
}
|
|
- (void)viewWillDisappear:(BOOL)animated {
|
[super viewWillDisappear:animated];
|
}
|
|
- (void)viewDidLoad {
|
[super viewDidLoad];
|
self.view.backgroundColor = [UIColor whiteColor];
|
[self createNavgationBar];
|
[self.view addSubview:self.subrView];
|
UIView *cutLine=[[UIView alloc] init];
|
cutLine.backgroundColor= [UIColor colorWithRed:0.75 green:0.75 blue:0.75 alpha:1];
|
cutLine.frame=CGRectMake(0, 0, KScreenW, 1);
|
[self.view addSubview:cutLine];
|
}
|
|
|
/**
|
设置导航栏
|
*/
|
-(void)createNavgationBar{
|
self.navigationItem.title = @"分类";
|
self.navigationController.navigationBar.titleTextAttributes =@{NSFontAttributeName:[UIFont systemFontOfSize:18],NSForegroundColorAttributeName:[UIColor blackColor]};
|
|
//返回按钮
|
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
|
[button setImage:[[UIImage imageNamed:@"ic_back"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
|
[button addTarget:self action:@selector(back:)
|
forControlEvents:UIControlEventTouchUpInside];
|
button.frame = CGRectMake(0, 0, 32, 32);
|
UIBarButtonItem *iconBarItem=[[UIBarButtonItem alloc] initWithCustomView:button];
|
self.navigationItem.leftBarButtonItem = iconBarItem;
|
|
}
|
|
|
-(void)back:(id)sender{
|
[self.navigationController popViewControllerAnimated:YES];
|
}
|
|
|
|
- (subregionView *)subrView {
|
if (_subrView) {
|
return _subrView;
|
}
|
_subrView = [[subregionView alloc] initWithFrame:CGRectMake(0, 1, KScreenW, KScreenH - kStatusBarH - ALNavBarH - ALTabBar_H)];
|
return _subrView;
|
}
|
|
- (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
|