ecstasy2/toast-notifications-ios

iOS 7, errors logged when using [UIView beginAnimations:nil context:nil]

lpotherat opened this issue · 0 comments

The toast animations made with [UIView beginAnimations:nil context:nil]; trigger log in the console when using in ios 7 simulator, here is the log :

Error: CGContextTranslateCTM: invalid context 0x0. This is a serious error. 
This application, or a library it uses, is using an invalid context  and is thereby 
contributing to an overall degradation of system stability and reliability. 
This notice is a courtesy: please fix this problem. It will become a fatal 
error in an upcoming update.

My correction is to use this instead :

[UIView animateWithDuration:0.3 animations:^{
    v.alpha = 1;
}];

Since it's available on iOS 4.0 I think it's a good correction.