iOS UI 03 事件和手势

来源:互联网 发布:买口红热 知乎 编辑:程序博客网 时间:2024/06/06 03:52


//

//  RootViewController.m

//  UI - 04 事件,手势

//

//  Created by dllo on 15/11/11.

//  Copyright (c) 2015 dllo. All rights reserved.

//


#import "RootViewController.h"


@interface RootViewController ()

@property (nonatomic,retain) UILabel *label1;

@end


@implementation RootViewController

- (void)dealloc

{

    [_label1 release];

    [super dealloc];

}

- (void)viewDidLoad {

    [superviewDidLoad];

    self.view.backgroundColor = [UIColorwhiteColor];

    

    //轻拍手势

//    UITapGestureRecognizer * tapGR = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapAction:)];

    //为某一视图添加手势

//    [self.view addGestureRecognizer:tapGR];

//    [tapGR release];

    

    

    

    self.label1 = [[UILabelalloc]initWithFrame:CGRectMake(100, 180, 300, 300)];

    

    self.label1.text =@"

0 0
原创粉丝点击