Swift - Push Segue - xcode

I have a setup like this:
All the segues are sit to Push, right now if i move from SignupView to LoginView it seems like it duplicates the LoginView, because the back button takes me to LoginView again, and then the SignupView, and when i try to add a segue from LoginView to the tableViewController the app crashes.
How exactly should i implement this ?
PS: the segue to the LoginView, is coming from the Login Button in the SignUp view. And to the tableview is doing from the Login Button in the LoginView

Hmm, I just set up a Storyboard to mimic your setup and when I move to Login view, the back button takes me right back to the SignUp view. I would check the Connections inspector for each view and make sure nothing extra is in there.

Related

Slack modal is not cleared from a Updated view

I have modal flow in my Slack App. I have some issues with the end of the flow however.
Basic idea of the flow. You get a Modal, you do a selection, you get another modal, you perform an action and then Modal disappears.
I have tried two different ways both with problems but with different result
Flow 1: response_action: "update"
You press a button on home tab that opens a modal with bot.views.open
You make a selection
In the response I send {response_action: 'update', view: }
User gets the new Modal without any errors. They then click a button.
Now I would like the modal to disappear. So on the result of the action I send {response_action: 'clear'}
Nothing happens :(. I would like the modal to disappear of course :)
Flow 2: bot.views.update
You press a button on home tab that opens a modal with bot.views.open
You make a selection
I create the same view as above but I run bot.views.update{view_id: , view: }
New view comes up however it has an error in the top: We had some trouble connecting. Try again?
Now I would like the modal to disappear. So on the result of the action I send {response_action: 'clear'}
Nothing happens :(. I would like the modal to disappear of course :)
So second flow has annoying error but same result with not disappearing.
Feels like Im missing something here.
Somebody have an Idea what Im missing?

Back Button will not connect with action

I have a back button that I want to connect to an action (Back) that is in a file (ShopController.swift). When I control+drag the button to the function, it does not connect. I read that I need to give a class to the button, but when I type one in in the side bar it automatically deletes.
http://i.stack.imgur.com/gOmlf.png
You have to set the ShopController as the class of the viewController to be able to connect the button action.
To do that, click on the tiny yellow icon on the top of the viewController. Then open the Identity Inspector and enter your class name there:

reload/refresh viewcontroller in Xcode 6 with Swift

I'm using OpenTok to implement WEBRTC. When i start the current view where you can live chat first time the subscriber view doens't appear, but when i navigate back to another view and then back to the live chat view it works - and this is the issue all time... Is there a way i can refresh or reload my current viewcontroller. I was thinking to make a button in the live chat view which can refresh or reload the view?
#IBAction func RefreshButton(sender: AnyObject)
{
//Refresh
}

How to add a URL link using storyboard

I have created via Storyboard, a Navigation Controller connected to a Table View Controller where each table cell is linked to a different View Controller. One one of these View Controller I would like to put a URL, can I do this in Storyboard ?
Thank you.
You mean you want to click on one table cell so it takes you to a website directly outside of your app ? or to a web view inside your app ?
Since you're asking about a way to do this using Storyboard, I suggest putting a WebView inside your View Controller.

Adding a UINavigationController built with IB

Building an iPhone application. The delegate loads a SplashScreenView which sits there until the user taps the screen. When the user is done tapping the screen, I release that view and I want to load my custom Navigation Controller. I can't figure out how to load the Navigation Controller I designed in IB...it's currently loading a blank instance of UINavigationController.
I'm running this from my delegate:
mnc = [[MyNavigationController alloc] initWithNibName:#"MyNavigation" bundle:nil];
[self.window addSubview:mnc.view];
MyNavigation is a XIB I created which only has File's Owner/First Responder/a Navigation Controller I added. I set the class of File's Owner to MyNavigationController but I'm not sure how to tell it that I want the view "MyNavigationController" uses to be the one I designed. When I try to drag the "view" outlet of File's Owner in IB to my designed Navigation Controller, it doesn't seem to like it.
I'm just not sure how to connect the dots here. Any help would be incredibly appreciated.
What is the root controller of your navigation controller? The "blank" thing that you see is probably your navigation controller loaded with no controllers for it to navigate.
Update
You don't need "two controllers" per se. It's just that navigation controller is the one that controls the stack of other controllers you provide it with. First you init your navigation controller with root view controller (with initWithRootViewController method you mentioned), then you can push (pushViewController:animated:) or pop (popViewController:animated:) other controllers to or off of the stack of navigation controller.
Apple developer documentation provides plenty information in view controller programming guide on how different types of view controllers interact.

Resources