开发者

How can I fade in/out a UILabel on a UITableViewCell?

开发者 https://www.devze.com 2023-03-30 17:11 出处:网络
I want to be able to fade in/out a couple UILabel\'s on my UITableView cell.开发者_如何学C How can I achieve this using CoreAnimation or an animation block?[UIView beginAnimations:nil context:nil];

I want to be able to fade in/out a couple UILabel's on my UITableView cell.开发者_如何学C How can I achieve this using CoreAnimation or an animation block?


[UIView beginAnimations:nil context:nil];
someLabel.alpha = 0;
[UIView commitAnimations];

More specifically, if you've got your labels added to the cell’s content view with a particular tag set for each one, you can do something like

[cell.contentView viewWithTag:2].alpha = 0;
[cell.contentView viewWithTag:1].alpha = 1;
0

精彩评论

暂无评论...
验证码 换一张
取 消