SCRecorder icon indicating copy to clipboard operation
SCRecorder copied to clipboard

swipe gesture of swipeable filter view works weird on iOS 10 betas

Open toddoh opened this issue 8 years ago • 14 comments

On iOS 10 betas, the swipe gesture of swipeablefilterview works very choppy, without any swipe transition at all.

toddoh avatar Aug 10 '16 02:08 toddoh

I don't seem to be experiencing this in IOS 10 Beta 4, could you confirm that when testing on the latest version of IOS 9 this issue doesn't occur?

twomedia avatar Aug 10 '16 03:08 twomedia

It works okay on iOS 9.3.4, but not on iOS 10 Beta 5 (Public beta 4)

toddoh avatar Aug 10 '16 05:08 toddoh

Are you able to upload an example project with the issue? I'll take a look at it.

twomedia avatar Aug 10 '16 05:08 twomedia

I've enabled 'showsHorizontalScrollIndicator' option in SCSwipeableFilterView.m to see what's the reason behind it. Turns out, the scrollView works okay as the scroll bar moves as you drag. However, the filter overlay doesn't follow the offset until it reaches the drag end point.

I've implemented in a very basic way.

_filterSwitcherView = [[SCSwipeableFilterView alloc] initWithFrame:CGRectMake(0,0, self.view.frame.size.width, self.view.frame.size.height)]; _filterSwitcherView.scaleAndResizeCIImageAutomatically = YES; _filterSwitcherView.contentMode = UIViewContentModeScaleAspectFill; [_filterSwitcherView setImageByUIImage:image]; [_filterSwitcherView setClipsToBounds:YES]; [self.view addSubview:_filterSwitcherView];

_filterSwitcherView.filters = @[
                                [SCFilter emptyFilter],
                                [SCFilter filterWithCIFilterName:@"CIPhotoEffectNoir"],
                                [SCFilter filterWithCIFilterName:@"CIPhotoEffectChrome"],
                                [SCFilter filterWithCIFilterName:@"CIPhotoEffectInstant"],
                                [SCFilter filterWithCIFilterName:@"CIPhotoEffectTonal"],
                                [SCFilter filterWithCIFilterName:@"CIPhotoEffectFade"]
                                ];

toddoh avatar Aug 10 '16 05:08 toddoh

This seems like a bug of contentOffset codes in scrollViewDidScroll. Anyone has any solution or idea about this issue?

toddoh avatar Aug 22 '16 03:08 toddoh

I found out that iOS default CIFilters are causing the issue. Custom filters are working OK.

toddoh avatar Aug 30 '16 13:08 toddoh

Can confirm I am having this problem too, it looks to only be linked to the CIPhotoEffect filters, the swipe view works fine for other iOS default filters like CISepiaTone, etc that don't have "PhotoEffect" in the name.

Anyone have any luck with this? iOS 10

UIApplicationMain avatar Sep 14 '16 18:09 UIApplicationMain

I can confirm this happens on Custom Filters as well. I had some LUTs which I have used as CIFilters and faced the same issue. Is there any fix or workaround for this?

mayuur avatar Nov 03 '16 05:11 mayuur

Any luck with this problem?

Amalous avatar Jan 24 '17 19:01 Amalous

@sulamatraore Creating Luts with CoreImageShop and then using them with SCRecorder fixed the issue for me!

mayuur avatar Jan 25 '17 04:01 mayuur

@mayuur Thanks!

Amalous avatar Jan 25 '17 05:01 Amalous

I dug into this and it seems to be a bug with Core Image. Specifically https://github.com/rFlex/SCRecorder/blob/master/Library/Sources/SCSwipeableFilterView.m#L178 where we call [CIImage imageByCroppingToRect:] and then [CIImage imageByCompositingOverImage:] doesn't work with some filters.

ptescher avatar Jan 25 '17 17:01 ptescher

Is there any solution for this problem? The filter swipe action is working in iOS 9, but not in iOS 10.

subinspathilettu avatar May 11 '17 09:05 subinspathilettu

Unfortunately, the swipe action only works when you create custom filters instead of using the CI Effects provided by Apple on iOS 10. You can create these custom filters by using CoreImageShop

Amalous avatar May 13 '17 13:05 Amalous