Done Button not working in FlipsideViewCOntroller - ios

I'm updating my app form xib files to a storyboard. I'm also upgrading the app to iOS 7.
I have a two page app, like a Utility app. I can create e segue to flip to the second page. However when hitting the done button nothing happens. I've tried several things (the suggestions on SO too) but without result.
Ik started a new project (Utility) an compared the code for the segue and for dismissing the FlipsideViewController. In my project and the new one the code is the same.
I placed an NSLog call in the flipsideViewControllerDidFinish method but no effect.
I am out of ideas, please help.

While posting I got a (last) Idea. I had to check if the segue identifier was correct.
And it wasn't. So I corrected it and it works like a charm.
Thank you.

Related

How to update viewcontroller

I’ve put code in ViewWillAppear and I’ve tried ViewDidAppear but the app only updates when I close it and re-open it. Anyone have any idea on how to fix this? I’m using UserDefaults to update the app with. I’m new to swift and I’m using storyboard so could it have something to do with the hierarchy ? Any help on this would be really appreciated.
I am creating an app with a spinning wheel which updates with options put in a table view, ive added some pictures to help illustrate.
The table view updates fine but when I go back to the main screen nothing happens until I close the app and re-open it
I link my github in case you want to look at full code base.
https://github.com/jamesnjones/Just.Decide
ImageOfTable
ImageOfWheel
solved by including
spinningWheel.setNeedsDisplay()
spinningWheel.setNeedsLayout()
in view will appear

iOS Storyboard ViewController went Blank

I'm working on the code in a project when I suddenly notice the ViewController in Storyboards is greyed out with the name of the VC in the center.
Here's a screenshot..
I was only editing some code on the right and I'm not sure exactly when, but my eyes adjusted and noticed this VC completely greyed out in Storyboards.
I tried deleting Derived Data, cleaning, quitting Xcode, building again, etc.
Nothing seems to work... ANy help with this would be super appreciated. I'm also very new to programming in general.
Well it turns out if you ever run into this problem, it's because you're not paying close attention and haven't realized you've somehow magically deleted your entire view inside the ViewController.
I did this once before by hitting something randomly on my keyboard (don't know what it was) but that time I saw it happen and just hit "undo".
This time I was passed the point of simply hitting "undo" and had to add a view again and rebuild and reconnect all the components in the view. That was basically it. Problem solved...

Storyboard Locked?

Hello and thank you for the help :)
I was working on xcode and everything was working fine.
I dont know what i did but suddenly the storyboard stopped working normaly.
What happens is every time i add a new ViewController or any item to the storyboard it freezes in the position where it was dropped i can add buttons and move the buttons in the view.. but i cant move the view itself on the storyboard.
The curious part is that now every project that i have even the new ones.. the same happens.. i dont know what i did and i tried eveyrthing i found on google to fix it.. but nothing worked. anyone has any idea of what it can be?
thank you very much,
Sérgio
Maybe there's some corrupted file in Xcode. Have you tried to delete and reinstall Xcode? Sometimes, that is a solution.
Good luck!
In addition to #ajpallares answer, did you also clean the cache?

Segue back button disappeared in iOS 9

Before iOS 9 was released, I've developed an app targeting iOS 8.4. I've used some UITableView connected each other via segue of kind "Show (e.g. Push)". It worked perfectly with the right behavior: every time I switched from a UITableView to another, the back button appeared, so the user is able to turn back to the previous scene; the back button appeared also from UITableView to UIViewController, using the same kind of segue. Now I have upgraded to the latest version of Xcode and targeting the app to iOS 9.0, I got this problem: now, if I go from UITableView to another UITableView, the back button doesn't appear anymore, but if I go from UITableView to UIViewController, the back button appears. I've seen other developers has had a similar problem (as you can see here, here and here), but I don't understand how they have solved (except for the third link, but it's not my case). Anyone knows how can I get back button working again? Thanks in advance
It looks like the guy who posted the second link is having the same problem as you. In a comment he said that the way he fixed it was getting rid of the extra navigation controllers:
No need put the navigation controller for each view. put the navigation controller start view only.
So that is what I would suggest doing. Only put a navigation controller on the first view controller. Get rid of all the others.
So, thanks to Caleb's and ogres' suggestions, I solved my problem in this way as you can see in this screenshot, I hope it helps anyone who will have the same problem!
If you have two UITableViews and you want connect them to each other, you just need one NavigationController.

Black screen when I add UINavigationController

I am following the Udacity tutorial on Swift, and for some reason when I added the second view, I usually get a black screen (as in the screen print) right when I open the app. Occasionally I get it working but usually not.
What could be the problem?
Noticed that "Did appear" is printed before "Will appear", is that a bug or did I do something wrong?
I have read this and this but it didn't help much. I also have tried several times to clean the project and rebuild it (nothing changed).
One time I just commented out some code (from the second view that should be loaded) and it worked suddenly. When I uncommented the same code it still worked.
Another time it worked when I disconnected the second view on the story board (it was still there, just no way to reach it).
Both have worked at least one time, and not worked many times.
Sorry this seems like I throw in random pieces of information, but I have no idea what could be the reason.

Resources