CatZanButton iOS 点赞按钮 项目简介
CatZanButton 是一个点赞效果的按钮,使用非常方便使用:#import "CatZanButton"
CatZanButton *zanBtn=[[CatZanButton alloc] initWithFrame:CGRectMake(0, 0, 50, 50) zanImage:[UIImage imageNamed:@"Zan"] unZanImage:[UIImage imageNamed:@"UnZan"]];
[zanBtn setCenter:self.view.center];
[self.view addSubview:zanBtn];
[zanBtn setClickHandler:^(CatZanButton *zanButton) {
if (zanButton.isZan) {
//Do something
}else{
//Do something
}
}];
CatZanButton *zanBtn=[[CatZanButton alloc] initWithFrame:CGRectMake(0, 0, 50, 50) zanImage:[UIImage imageNamed:@"Zan"] unZanImage:[UIImage imageNamed:@"UnZan"]];
[zanBtn setCenter:self.view.center];
[self.view addSubview:zanBtn];
[zanBtn setClickHandler:^(CatZanButton *zanButton) {
if (zanButton.isZan) {
//Do something
}else{
//Do something
}
}];