//button添加高亮
switch (i) {
case 0:
{
title = @"默认变淡";
[button addHighlightedFadeAlpha];
}
break;
case 1:
{
title = @"自定变淡";
[button addHighlightedFadeAlpha:0.3f];
}
break;
case 2:
{
title = @"变白";
[button addHighlightedFadeWhite];
}
break;
case 3:
{
title = @"变黑";
[button addHighlightedFadeBlack];
}
break;
case 4:
{
title = @"变灰";
[button addHighlightedFadeGray];
}
break;
case 5:
{
title = @"变紫";
button.diffusionAnimated = YES;
[button addHighlightedFadeColor:[UIColor purpleColor] alpha:0.5f];
}
break;
case 6:
{
title = @"变红";
button.diffusionAnimated = YES;
[button addHighlightedFadeColor:[UIColor redColor] alpha:1.0f];
}
break;
case 7:
{
title = @"变蓝";
[button addHighlightedFadeColor:[UIColor blueColor] alpha:0.5f];
}
break;
case 8:
{
title = @"变绿";
[button addHighlightedFadeColor:[UIColor greenColor] alpha:0.5f];
}
break;
case 9:
{
title = @"变黄";
[button addHighlightedFadeColor:[UIColor yellowColor] alpha:0.5f];
}
break;
default:
break;
}
-
Notifications
You must be signed in to change notification settings - Fork 0
amin178671750/ButtonHighlightedFade
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
按钮添加高亮变色
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published