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;








0















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
...










share|improve this question
























  • Open the second guy as a modal view over the first one.

    – El Tomato
    Mar 21 at 23:54


















0















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
...










share|improve this question
























  • Open the second guy as a modal view over the first one.

    – El Tomato
    Mar 21 at 23:54














0












0








0








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
...










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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


















  • 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













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
);



);













draft saved

draft discarded


















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















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현