Transition from tableView to another View shines through - ios

In my app I have posts in a tableview and when I click on a post, a segue brings in another view controller with a detailed view of the post. When my background color is any other color than black, everything works fine. But when I use a black background, you can always see the tableview shine through during the process of transitioning. After like a second the transparent part goes away and everything is good, but that makes the transition look very bad. I have a picture of what I mean, this is the detailed view. All pics and text are random and just for testing the app (so no my posts don't get 2.302 comments :D)
Detailed ViewController Screenshot

Set the opacity in the segue function as desired.

No worries. Maybe next time print the value out in viewDidLoad, and then again in the segue. Then you can see how its messing with you :-)

Related

How to add a view that overlaps a tableview in iOS

I want to make a tutorial in my iOS application and I have a tableview with a drawer.
For the first time that the user enters in this screen, a tutorial overlaps the screen first, and disappears after the user taps OK.
Like this
I've tried this tutorial:
http://swiftdeveloperblog.com/creating-custom-user-interface-files-with-xib-in-xcode-6-and-swift/
in which I can use in a UIView but not in a tableview.
I hope someone can give me a hint on how to do it or what to use.
Try this for tutorial view Controller
https://github.com/ariok/BWWalkthrough
In your FirstView controller,
1) Create instance of tutorial ViewController
2) Present that Tutorial ViewController
There is a close button delegate method in BWWalkthrough, i.e. walkthroughCloseButtonPressed() in this method dismiss your tutorial viewController.
I just made a temporary solution to my problem.
I made an image like this:
Create a ViewController and put the image, then add label and button (edit cross dissolve as transition type).
Show this view controller for first time users and go to the next view controller if the button is clicked which is the real view controller(the one that has table view and sliding menu)
The problem here is I need to have different images for different screen size if I really want that the user wont notice the tableview spacing, but it still looks fine.

Show (Push) Segue Leaving Imprint of Previous View

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.
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.
Go through the below Solution:
Click on "Second View Controller"
Select the top UIView
Now change it's background color to Default
This will solve your problem!

Slide out menu - When switching back to original controller, Nav bar disappears

I have a slide out menu in my app, and just to let you know, I'm new to iOS/Swift, so if I don't explain it well, or use the correct terms, that's why.
I use the SWRevealViewController library for my sliding out menu.
The only code i use from that for all my View Controllers is
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
The issue basically is, when the app first opens, it shows my navigation item's title and all that on ViewController1(default view), but when using the slide out menu to go to ViewController2 or 3, and then going back to the ViewController1, the whole navigation bar/item disappears.
I tried to use something like nav_item.title = "whatever" within viewDidLoad(), but that doesn't work, as far as when i switch back to the first view. The funny thing is, if i programmatically change the title doing that, it changes when it first loads but when i change to View2 and change back to View1, just disappears.
Here are a few images of what i mean, if i didn't explain it well enough, because like i said i'm still new. The development of my app is coming along pretty well because i'm going off my android version i've had done for a while.
Here is when it first loads, title and all. Notice, my background color doesn't overlap or change the top part for the time and battery, which becomes a problem with the later view.
Switched to a different view using my slide out menu.
Switching back to to the original view, the nav item disappears and the background color extends to the full view, overlapping the battery status and time
How does your Storyboard look like? This is how I usually do it.

nested segues app performance

i want to use a tab bar on top of the view controller not in the bottom. after searching, i found out it's against Apple's UI Interface Guidelines and it should always be at the bottom. However, my app has to have also one at the top. Anyway, i was thinking of using nested segues. For example, if we have three view controllers that each has 3 buttons on top that resemble the tab bar items, and i'm positioned on the first VC (hence, the first button is highlighted). When i press on the second button it gets highlighted and segues to the second VC. Then if i press of the first button, i'll be taken back to the first VC. My question here is if i worked using this paradigm, will the VC's be stacked? will the performance of the app decrease? can i achieve this in a better way in case the answer of the previous questions were negative?
try these projects
MHCustomTabBarController
ICViewPager
JCMSegmentPageController
QMBTabs

Weird segue transition after disabling autolayout

I don't know how to explain this, it's really strange.
Ok think about two view controllers, the first one is a tableview controller and has a button in his navigation bar connected via push segue to the second view controller.
When pushing the button, the second view controller comes in from the right and at the same time pushes the first view controller out, to the left.
I wasn't using auto layout for my project but I've activated it to test something (I've just activated two constraints for two labels in the prototype cell). Then I've disabled the auto layout and now when I push the button on the first controller the second one comes in, but instead of pushing out the first controller, it slides on the back of the first one, that disappears only when the animation ends.
It's like if all the cells in my first controller become transparent during the transition.
I can't see anything strange in my settings so I don't know how to solve this.
Well, as Ryan said, it was one of those annoying problems where you dig around for 30 (for me it's been 90) minutes with no success and then find out how to fix it with a single click.
It turns out that the second view controller had a transparent background (don't know why), so reverting it to white solved the problem.
Thanks God I din't delete the storyboard to make it ex-novo.

Resources