Closed fabiocaccamo closed 3 years ago
I look forward to a pull request with your solutions, thanks!
Where do you force the transparent background using view.backgroundColor = [UIColor clearColor]; ??
thanks
I set the view background color just after having created it...
I also needed this and sent a pull request in MPFlipViewController that does it. You can find it here: https://github.com/mpospese/MPFlipViewController/pull/8.
I've done it in MPFlipViewController because this is the project I use.
Note that I needed to set flippingPageShadowOpacity and coveredPageShadowOpacity property to 0 to have a clear transition.
If I use this style: (MPFoldStyleHorizontal | MPFoldStyleUnfold | MPFoldStyleCubic) and 'toView' has a transparent background, the 'fromView' should not be visible (after it has been flipped) behind the 'toView'.
I think a possible solution could be stop to render 'fromView' if it has been flipped: (right < left || top < bottom)
if I use this style: (MPFoldStyleHorizontal | MPFoldStyleUnfold) and 'fromView' has a transparent background, a black background is added to 'fromView' when the transition starts.
This problem is in: [MPAnimation renderImageFromView:...] and can be fixed forcing a non-opaque background if the view.backgroundColor == UIColor clearColor ... (maybe there's a better solution):
UIGraphicsBeginImageContextWithOptions(imageSizeWithBorder, FALSE, 0);
Thanks for this great library.