1

I have two views. Upon clicking a button, the other view should be segued onto the screen with a show (previously called push) segue. This works flawlessly, however, for some strange reason when transitioning a short imprint of the previous view is left behind. This seems to be happening only for these 2 views, I can not reproduce it with others, and the bug occurs both on the simulator and an actual device. Here is a GIF of what is happening: https://gyazo.com/662a813de15ba90d6581976f55866289

(Stackoverflow doesn't support direct Gif's in post as far as I'm aware, so sorry for the external link)

Sorry for the low quality.

I simply control-dragged from the "Signup" button to the other screen to create the segue. This seems to be the only transition that is doing this throughout my entire app. This is what it looks like in storyboard. I'm doing nothing programmatically before/after the segue sends.

enter image description here

I've tried programmatically creating the segue as well, however the same effect is occurring. I could not find any similar stackoverflow posts.

Any clues on why this is happening and any possible fixes would be great. If you need more information please let me know.

Edit: I am not doing anything to resource extensive on the view initialization (I'm simply making the nav bar translucent and modifying a few outlets). I feel it is important to note that the background (The blue) and the sonus logo are both Image Views. I've attempted programmatically setting the background image, however this made no effect on the outcome of the problem.

Aaron
  • 757
  • 5
  • 18
  • I suspect you might be doing something in your view controller that is getting loaded, that is choking main thread? – Shripada Dec 08 '15 at 05:52
  • I would have to agree with Shripada here. In your view did load you must be doing some thread heavy initialization. Is there anything you're doing that's excessively lengthy? – pbush25 Dec 08 '15 at 06:02
  • @pbush25 This was my initial thought as well. However, the only thing I'm doing in initialization is making the nav bar translucent and changing a few minor properties of some outlets. Even after commenting all this out, I'm getting the same effect. One thing that just struck me is both the blue background and the "Sonus" logo are Image Views. Am I perhaps missing something here? I've tried programmatically setting the background but the same thing is still happening. – Aaron Dec 08 '15 at 06:11
  • What code are you using to make the transition? – pbush25 Dec 08 '15 at 06:14
  • @pbush25 I currently have the segue setup through the storyboard. When I attempted programmatically segueing I was using the following code (where vc was my RegisterViewController): self.navigationController?.pushViewController(vc, animated: true) – Aaron Dec 08 '15 at 06:21
  • Can you confirm you have ran this in a device and not in simulator alone and coming to this conclusion? Just want this to be clarified. – Shripada Dec 08 '15 at 08:59
  • @Shripada I can confirm this. I attempted on a iPhone 5s and it still occured. – Aaron Dec 08 '15 at 18:23

1 Answers1

2

Go through the below Solution:

  1. Click on "Second View Controller"
  2. Select the top UIView
  3. Now change it's background color to Default

This will solve your problem!

Sohil R. Memon
  • 9,404
  • 1
  • 31
  • 57
  • Unfortunately, this did not solve the problem. Both views already had default background color. Thanks for taking the time to comment though! – Aaron Dec 08 '15 at 06:13
  • 1
    So I was messing around with this method again, and it seemed as if the problem was that my background image (for some reason) was transparent to some extent. In order to solve the problem, I had to change the background color to a SOLID color. It did not work under Default. However, since I got the general idea from this answer, I accepted it. Thanks! – Aaron Dec 09 '15 at 05:01
  • @Aaron Thanks! This is the very common problem everyone faces! – Sohil R. Memon Dec 09 '15 at 05:04