@property(nonatomic ,strong) UIButton * weiXinButton;
@property(nonatomic ,strong) UIButton * phoneButton;
@property(nonatomic ,assign) BOOL isClick;
{
[super viewDidLoad];
//self.view.backgroundColor = [UIColor redColor];
_landButton = [UIButton buttonWithType:UIButtonTypeCustom];
_landButton.frame = CGRectMake(150, 100, 60, 60);
[_landButton setBackgroundImage:[UIImage imageNamed:@"after.jpg"] forState:UIControlStateNormal];
_landButton.tag = 110;
[_landButton addTarget:self action:@selector(aa:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:_landButton];
_weiXinButton = [UIButton buttonWithType:UIButtonTypeCustom];
_weiXinButton.frame = CGRectMake(150, 200, 60, 60);
[_weiXinButton setBackgroundImage:[UIImage imageNamed:@"before.jpg"] forState:UIControlStateNormal];
[_weiXinButton addTarget:self action:@selector(aa:) forControlEvents:UIControlEventTouchUpInside];
_weiXinButton.tag = 111;
[self.view addSubview:_weiXinButton];
_phoneButton = [UIButton buttonWithType:UIButtonTypeCustom];
_phoneButton.frame = CGRectMake(150, 300, 60, 60);
[_phoneButton setBackgroundImage:[UIImage imageNamed:@"before.jpg"] forState:UIControlStateNormal];
[_phoneButton addTarget:self action:@selector(aa:) forControlEvents:UIControlEventTouchUpInside];
_phoneButton.tag = 112;
[self.view addSubview:_phoneButton];
}
_isClick =YES;
switch (sender.tag) {
case 110:
{
[_landButton setBackgroundImage: [UIImage imageNamed:@"after.jpg"] forState:UIControlStateNormal];
[_weiXinButton setBackgroundImage: [UIImage imageNamed:@"beafore.jpg"] forState:UIControlStateNormal];
[_phoneButton setBackgroundImage: [UIImage imageNamed:@"before.jpg"] forState:UIControlStateNormal];
}
break;
case 111:
{
_isClick =YES;
[_weiXinButton setBackgroundImage: [UIImage imageNamed:@"after.jpg"] forState:UIControlStateNormal];
[_landButton setBackgroundImage: [UIImage imageNamed:@"before.jpg"] forState:UIControlStateNormal];
[_phoneButton setBackgroundImage: [UIImage imageNamed:@"before.jpg"] forState:UIControlStateNormal];
}
break;
case 112:
{
_isClick =YES;
[_phoneButton setBackgroundImage: [UIImage imageNamed:@"after.jpg"] forState:UIControlStateNormal];
[_landButton setBackgroundImage: [UIImage imageNamed:@"before.jpg"] forState:UIControlStateNormal];
[_weiXinButton setBackgroundImage: [UIImage imageNamed:@"before.jpg"] forState:UIControlStateNormal];
}
break;
default:
break;
}
}