高于IOS7的场合
UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(5, 100,30, 30)];
[btn setImage:[UIImage imageNamed:@"logo"] forState:UIControlStateNormal];
IOS7的场合
UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(5, 100,30, 30)];
[btn setImage:[UIImage imageNamed:@"logo.png"] forState:UIControlStateNormal];
网友评论