//
// ViewController.m
// 201401
//
// Created by zhang guoqi on 14-4-5.
// Copyright (c) 2014年 zhang guoqi. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIButton *bbb;
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
[_bbb addTarget:self action:@selector(onButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (void)onButtonClicked:(id)sender {
NSLog(@"%s", __PRETTY_FUNCTION__);
}
- (IBAction)llll:(id)sender {
NSLog(@"%s", __PRETTY_FUNCTION__);
}
- (IBAction)aaa:(id)sender {
NSLog(@"%s", __PRETTY_FUNCTION__);
}
@end
ios log, bind event
最新推荐文章于 2025-08-11 09:02:15 发布
本文介绍了一个简单的iOS视图控制器实现,包括界面加载、内存管理及按钮点击事件处理等基本功能。通过实例展示了如何为按钮添加点击事件并响应。
1176

被折叠的 条评论
为什么被折叠?



