How to retain data when switching ViewControllers and backHow can I make a UITextField move up when the keyboard is present - on starting to edit?calling setCoordinate on MKPlacemark crashes app with 'unrecognized selector'Swift compiler error on mapView declarationToolbar not displayed when segue back to tabviewcontroller (iOS Swift)redefine outlet mkmapview in viewdidappearMKViewMap custom annotation disappears on clickHow to update annotations when in mapview on zoom?Change annotation pin color on MKMapView when you select annotation pinmacOS: mouse click MKAnnotationView with modifier keyPass annotation title to embedded containerview when selected Swift
Why was the small council so happy for Tyrion to become the Master of Coin?
How old can references or sources in a thesis be?
What are these boxed doors outside store fronts in New York?
Is it legal for company to use my work email to pretend I still work there?
Test whether all array elements are factors of a number
Adding span tags within wp_list_pages list items
Why are electrically insulating heatsinks so rare? Is it just cost?
"to be prejudice towards/against someone" vs "to be prejudiced against/towards someone"
Smoothness of finite-dimensional functional calculus
Why does Kotter return in Welcome Back Kotter?
Collect Fourier series terms
What typically incentivizes a professor to change jobs to a lower ranking university?
How to format long polynomial?
Fencing style for blades that can attack from a distance
Why can't I see bouncing of a switch on an oscilloscope?
Is this a crack on the carbon frame?
Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?
Watching something be written to a file live with tail
Mathematical cryptic clues
Why not use SQL instead of GraphQL?
Which models of the Boeing 737 are still in production?
Do I have a twin with permutated remainders?
How do we improve the relationship with a client software team that performs poorly and is becoming less collaborative?
How does strength of boric acid solution increase in presence of salicylic acid?
How to retain data when switching ViewControllers and back
How can I make a UITextField move up when the keyboard is present - on starting to edit?calling setCoordinate on MKPlacemark crashes app with 'unrecognized selector'Swift compiler error on mapView declarationToolbar not displayed when segue back to tabviewcontroller (iOS Swift)redefine outlet mkmapview in viewdidappearMKViewMap custom annotation disappears on clickHow to update annotations when in mapview on zoom?Change annotation pin color on MKMapView when you select annotation pinmacOS: mouse click MKAnnotationView with modifier keyPass annotation title to embedded containerview when selected Swift
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I am working on an app that uses an MKMapView
populated with MKPlacemarks
. When a user clicks on one of these MKPlacemarks
, they segue to another ViewController
. If they click 'cancel' on this ViewController
, they segue back to the original one. The only issue with this is that when they click 'cancel', I want the original ViewController
to look the same as the instant they clicked on the MKPlacemarks
. What I mean by this is that the MKPlacemarks
should still be selected, views should be in the same positions (one moves up when the MKPlacemarks is clicked before performing the segue), etc. This is what I am using to detect if an MKAnnotation
has been clicked (I don't think it is of any use, but I thought I'd put it just to be safe):
func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView)
guard let ann = view.annotation as? MKPlacemark else return
...
ios swift xcode mapkit mkmapview
add a comment |
I am working on an app that uses an MKMapView
populated with MKPlacemarks
. When a user clicks on one of these MKPlacemarks
, they segue to another ViewController
. If they click 'cancel' on this ViewController
, they segue back to the original one. The only issue with this is that when they click 'cancel', I want the original ViewController
to look the same as the instant they clicked on the MKPlacemarks
. What I mean by this is that the MKPlacemarks
should still be selected, views should be in the same positions (one moves up when the MKPlacemarks is clicked before performing the segue), etc. This is what I am using to detect if an MKAnnotation
has been clicked (I don't think it is of any use, but I thought I'd put it just to be safe):
func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView)
guard let ann = view.annotation as? MKPlacemark else return
...
ios swift xcode mapkit mkmapview
Open the second guy as a modal view over the first one.
– El Tomato
Mar 21 at 23:54
add a comment |
I am working on an app that uses an MKMapView
populated with MKPlacemarks
. When a user clicks on one of these MKPlacemarks
, they segue to another ViewController
. If they click 'cancel' on this ViewController
, they segue back to the original one. The only issue with this is that when they click 'cancel', I want the original ViewController
to look the same as the instant they clicked on the MKPlacemarks
. What I mean by this is that the MKPlacemarks
should still be selected, views should be in the same positions (one moves up when the MKPlacemarks is clicked before performing the segue), etc. This is what I am using to detect if an MKAnnotation
has been clicked (I don't think it is of any use, but I thought I'd put it just to be safe):
func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView)
guard let ann = view.annotation as? MKPlacemark else return
...
ios swift xcode mapkit mkmapview
I am working on an app that uses an MKMapView
populated with MKPlacemarks
. When a user clicks on one of these MKPlacemarks
, they segue to another ViewController
. If they click 'cancel' on this ViewController
, they segue back to the original one. The only issue with this is that when they click 'cancel', I want the original ViewController
to look the same as the instant they clicked on the MKPlacemarks
. What I mean by this is that the MKPlacemarks
should still be selected, views should be in the same positions (one moves up when the MKPlacemarks is clicked before performing the segue), etc. This is what I am using to detect if an MKAnnotation
has been clicked (I don't think it is of any use, but I thought I'd put it just to be safe):
func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView)
guard let ann = view.annotation as? MKPlacemark else return
...
ios swift xcode mapkit mkmapview
ios swift xcode mapkit mkmapview
edited Mar 22 at 10:13
Kaushik Makwana
956623
956623
asked Mar 21 at 23:50
Bob SamuelsBob Samuels
407
407
Open the second guy as a modal view over the first one.
– El Tomato
Mar 21 at 23:54
add a comment |
Open the second guy as a modal view over the first one.
– El Tomato
Mar 21 at 23:54
Open the second guy as a modal view over the first one.
– El Tomato
Mar 21 at 23:54
Open the second guy as a modal view over the first one.
– El Tomato
Mar 21 at 23:54
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55290882%2fhow-to-retain-data-when-switching-viewcontrollers-and-back%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55290882%2fhow-to-retain-data-when-switching-viewcontrollers-and-back%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Open the second guy as a modal view over the first one.
– El Tomato
Mar 21 at 23:54