Ciechan / BCMeshTransformView

Mesh transforms for UIView
MIT License
1.24k stars 126 forks source link

Will it work on iOS6? #2

Closed garudaonekh closed 10 years ago

garudaonekh commented 10 years ago

Hi, very Interesting animation. Will it work on ios6 also?

Thanks;

Ciechan commented 10 years ago

In its present form it doesn't as it makes use of iOS7 specific APIs. In theory you could replace this line of BCMeshTexture.m file:

[view drawViewHierarchyInRect:view.layer.bounds afterScreenUpdates:NO];

with that one:

[view.layer renderInContext:context];

I'm not 100% sure, but I think this is the only iOS7 call in the project and replacing the mentioned line should work.

pcjbird commented 10 years ago

It works fine use

 [view.layer renderInContext:context];

or

[view.layer.presentationLayer renderInContext:context];

However, in iOS6 or before, label or other control's background seems to be white default. As a result, if you want to show the container's background color, you should set the background color of all the subviews to be [UIColor clearColor].