Animating custom UIView in swift static error

前端 未结 1 899
野趣味
野趣味 2021-01-28 09:20

I\'m trying to animate a custom UIView but it gives me the error: Static member \'animate\' cannot be used on instance of type \'Tyle\'

This is my class:



        
相关标签:
1条回答
  • 2021-01-28 09:54

    animate is a static method. So it should be

    UIView.animate(withDuration: 0.5, delay: 0.3, options: [.repeat, .curveEaseOut, .autoreverse], animations: {
    
        }, completion: nil)
    
    0 讨论(0)
提交回复
热议问题