UIButton UIView 视图分层的运用
我的思路:
将主界面设置为一个可以点击的UIButton 点击后显示被隐藏的左侧栏UIView(再次点击再次隐藏)
代码:
根控制器
//
// RootViewController.m
// UI-tqh-work-2
//
// Created by lanqs on 15/1/4.
// Copyright (c) 2015年 Tanqihong. All rights reserved.
//
#import "RootViewController.h"
#import "NextViewController.h"
@interface RootViewController (){
NSInteger chose;
UIView *_leftview;
}
- (void)initializeUserInterface;
@end
@implementation RootViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self initializeUserInterface];
}
-(void)initializeUserInterface{
self.view.backgroundColor = [UIColor whiteColor];
//设置刚进入界面显示的lable
UILabel *label1 = [[UILabel alloc]init];