last day (15 days later) » 

11:26 AM
0
A: Showing drop pin after relaunch app?

anish parajulii would save the data into userdefaults as func addAnnotation(gesture: UIGestureRecognizer) { if gesture.state == UIGestureRecognizerState.Began { var touch = gesture.locationInView(self.Mapa) var coordinate = Mapa.convertPoint(touch, toCoordinateFromView: self.Mapa) ...

 
in //-- defaults.setFloatt(coordinate.longitude, forKey: "longitudeNameKey") --// I'm getting error Cannot invoke 'setFloat' with an argument list of type '(CLLocationDegrees, forKey: String)'
 
use Double instead of Float defaults.setDouble(coordinate.longitude, forKey: "longitudeNameKey")..checkout my updated answer then
 
Not working man. Annotations are not saving
 
you dont save the annotations..only coordinates that you are going to add annotation to it..after you get the coordinates again add annotations in this method loadAnnotationFromUserDefaults()..which is missing in the answer
 
From which part i need to add annotations?
 
11:26 AM
after eou got the coordinates back in loadAnnotationFromUserDefaults() which you loosed terminating your application..So you must make a mechanism that adds annotations to this let long= defaults.doubleForKey("longitudeNameKey") let lat = defaults.doubleForKey("latitudeNameKey") so you can put your adding annotation code after this
 
Do you have time to create for me example? I tried it many ways but unsuccessfully.
 
ok...will do tomorrow...
 
thanks mate!! appreciate it
 
do you get the coordinates that is printed inside loadAnnotationFromUserDefaults() ...is that matching with the one you saved ?
 
I'm getting coordinates from my actual location
 
11:26 AM
notice that...you are getting coordinates of the last gesture done..so what you need to do is..put all the tapped coordinates in userdefaults..wait i will do it for you after some hrs
 
okey. I'm waiting thanks!
lol? bad project?
 
why is that so?
 
nothing with pins or saving in project lol
 
OMG my bad..i send you the wrong project...sorry..will post the real one....
lol that was really insane...checkout the update answer..i posted the real link
 
great it's saving! but it isnt showing placemark after relaunch (title etc..)
 
11:30 AM
please see the last comment....you just need to do some little work...put your mind on
 
hm
I never do it before
but I'll ask
can i use code something like in add annotation?
 
you know i also havenot done this before...just tried and happened...so you can also do it...
 
I'm programming only 6 months but only simple projects.. but i'll try something :D
 
chill out..i have started programming 2 months....and dont have a mac at home
i just experiment with things in office
glad i learned something from your question
anyway you just try..if it doesnot happen..i am always free to put my mind on and help you
 
Can I have your email?
 
11:41 AM
yeah sure..anish.parajuli555@gmail.com
if you have linkedIn ...just throw me the link..lets be in touch yeah
bye..tc....
 
@anishparajuli I have no idea how to do it lol :D
 
ok then...i will do it...tomorrow from office..is that ok?but you keep on trying
 
Trying something. But for now no idea... Its task to school.. and have 2 hours to submission
ohhh
 
i am sorry...i dont have a mac at home
if i had i would really help you
if you had replied me earlier i could have done....but you replied late...?
 
Okey so can you do it for me tomorrow?
If i dont do it myself?
 
11:46 AM
yeah..i will give a try
and will tell you ok?
bye...tc
 
okey. bye
 

  last day (15 days later) »