iOS 按钮设置图片和事件

[btn addTarget:self action:@selector(searchButtonClick) forControlEvents:UIControlEventTouchUpInside];

[btn setImage:[UIImage imageNamed:@"Icon"] forState:UIControlStateNormal];

[btn setImage:[UIImage imageNamed:@"Icon"] forState:UIControlStateSelected];

posted on 2015-12-16 16:04  大木哥  阅读(549)  评论(0编辑  收藏  举报

导航