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:
Related
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?
I am using a template for adding/editing an event. What I would like to do is be able to add an event but keep the window open and retain the entered data so the user can change a couple of fields and save that other event. There are 2 save buttons, "SAVE", and "SAVE and ADD NEW". The first button will save the entered event and close the dialog window. The second button will save the entered event but will keep the window open, user changes one or more fields, then save that new event (repeat as necessary).
Any advice or pointing me in the right direction is appreciated.
You can try using the "save" event of the Scheduler to make copy of current event and then call the "addEvent" method of the Scheduler with it. Check the Scheduler API below:
Scheduler: API
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.
I have a modal window that shows a panel which contains a form that has some textfields and a submit button
on submit an insert into the database occurs and then I have some ajax behaviour that i want to activate on the modal windows containing page on click of the button.
So flow is at present:
click link
modal window appears
user fills out form
user submits form
form data persisted to db
modal window closes
I need it to do this in addition:
activate some ajax behaviour on the page that contains the panel
any help on how best to do this in the wicket way is appreciated.
I resolved this by passing an instance of the page containing the panel to the panel (i.e. - in the constructor), then calling a method on the page from the panel to perform the Ajax update.
I would be interested to see what others have done or to hear if there are issues with the approach I have taken.
Set up a WindowClose callback.
In the WicketStuff project called ModelX (Disclaimer: I'm the developer of that) I have created an IWindowClosedListener interface which has a method:
void windowClosed(Panel panel, AjaxRequestTarget target)
So then any Page or Panel that can open a modal that needs to do something when that modal is closed simply implements that interface and its windowClosed method gets called at the right time.
I'm trying to develop an application and am stuck at this specific part. I was previously taking a different approach through a web form displayed in UIWebView, but was having issues getting it to open how I wanted. I changed the UI and would now like to take this approach:
Background
User needs to be able to get directions to a specific shop location. The UI contains an instance of UIText Field and a round rect button. The User should be able to click the button and the default Maps application will pop up for the user.
How I imagine this being coded:
1) User enters address in textField
- textField stores address as variable (%var%)
2) User presses Go button
- Button adds variable (%var%) from textField to URL string (see below)
- Button submits full URL to be opened in Safari
3) Safari opens request in Maps application
Image Example of UI: http://i55.tinypic.com/vnjc41.jpg
http://maps.google.com/?saddr=%var%&daddr=123+Road+St%2C+Town%2C+CA+90210&hl=en
Found a better way to do this using a button to open the maps application:
-(IBAction)hbgdirButton:(id)sender{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://maps.google.com/maps?q=Harrisburg+PA&hl=en"]];
}