简体   繁体   中英

UIView animations: the “beginAnimations:context” method

I'm doing a lot of animations in my app, and I was wondering whether passing nil as the context parameter to [UIView beginAnimations:context] is ok to do.

When would I want to pass anything in as the context param and why?

If you are using the same delegate for several animations, you can use the context to distinguish between them. If you have some temporary value that you want to pass to your delegate, pass it in context. If none of the above then pass nil.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM