Problems animating UIView alpha

后端 未结 6 1984
野趣味
野趣味 2020-12-06 19:17

I\'m trying to apply a fade to an UIView I created programmatically on the top of another.

[UIView animateWithDuration:0.5 animations:^(void) {
    [self.vie         


        
6条回答
  •  生来不讨喜
    2020-12-06 19:42

    Try setting opaque to NO explicitly. I had the same problem and setting that solved my problem. Apparently, opaque views just don't seem to play well with alpha.

    Credit goes to Hampus Nilsson's comment though.

提交回复
热议问题