3

I am working on my iOS app, and been trying to figure this out for the past couple of days now and no resources I could find available.

I have an image covering my entire view controller and on top of it, a visual effect view with blur. All things are constrained to the edges and the blur effect is aligned to the background images's edges.

Works perfectly, but during transition between view controllers, the images seems to get show ahead and shows it raw(without the blur on top of it) for a bit before it completes the entire transition.

Any ideas? I tried so many things already and nothing seems to work.

EDIT: More information: By observing, i think my image is coming back to it's normal dimensions during the animation transition instead of just holding up to my screen size. Maybe somebody can show me the way on how to keep this intact?

GIF SAMPLE

phage04
  • 321
  • 1
  • 12
  • add gif if u can ... so we ca understand easily – Sneha Apr 29 '16 at 05:47
  • and add some code please – wm.p1us Apr 29 '16 at 05:51
  • @Sneha updated with GIF. I think the bg image is coming back to its normal size. the ui image view mode is on aspect fill, somehow it loses it and stops following the phone's screen size. – phage04 Apr 29 '16 at 06:20
  • @wm.p1us Sorry there's no code, this is just a simple segue from a button transitioning to another view. I added a few more information that might help. Thanks in advance! – phage04 Apr 29 '16 at 06:21
  • You say that it is a segue to another "view" but can you be more specific on how you set that up? I want to understand you problem as much as possible. – Benjamin Lowry Apr 29 '16 at 06:32
  • @BenjaminLowry VC1 has a button that points to VC2 using a segue. VC2 contains a bg img and on top of it is a visual effect view blur. All are constrained to the screen's edges. During transition from VC1 to VC2, the bg img shows ahead (I think it changes its width for some reason in the process) before it shows the part where it's covered by the blur. I hope this is clearer, let me know if you need more. :) – phage04 Apr 29 '16 at 06:39
  • In which method do you apply the blur? – Gustanas Apr 29 '16 at 07:25
  • @Gusta i applied it in the storyboard. – phage04 Apr 29 '16 at 07:44
  • @phage04 Maybe try to do it programmatically in viewWillAppear() – Gustanas Apr 29 '16 at 07:50

1 Answers1

6

Finally solved it. Realized that the blur was not the problem, it was the image.

In the attributes inspector, I UNCHECKED autoresize subviews and CHECKED clip subviews.

It did the trick! Thanks for contributing to my analysis.

phage04
  • 321
  • 1
  • 12
  • Oh men! you saved my life :). I was struggling with this for two hours with no luck. Thank you! – neteot Aug 30 '18 at 08:11