« first day  last day (14 days later) » 

9:03 AM
@anishparajuli Hi
 
 
2 hours later…
10:44 AM
hello
i told you it was just a simple thing
try this :
func addAnnotation(gesture: UIGestureRecognizer) {

    if gesture.state == UIGestureRecognizerState.Ended {

        var touch = gesture.locationInView(self.mapView)
        var coordinate = mapView.convertPoint(touch, toCoordinateFromView: self.mapView)

        var response:Dictionary<String, Double>?
        response = ["longitude":coordinate.longitude,"latitude":coordinate.latitude]

        let defaults = NSUserDefaults.standardUserDefaults()
        var result: NSMutableArray? = defaults.objectForKey("coordinateObject") as? NSMutableArray
i have just changed two lines perhaps...good luck
it took me nearly 2 mins..so keep on trying on your own
 
11:17 AM
@anishparajuli are you here for a sec?
 
11:36 AM
oope i missed it
wait for a second..i tested it on the previos code and was working
but when i reset simulator it didnot
wait working on it
 
But in my project i have UIGestureRecognizerState.Began
 
that doesnot matter
 
okey
 
well you can change the state..it wil call after starting the gesture
where ended will be called after gesture going to end
 
so it doesnt matter?
I was called away so if you can post code here and I'll check it later..
 
11:56 AM
here is the modified project
no that matters in case when you want the gesture action to fire....on the starting of gesture or ending period of gesture..
but overall for you it doesnot matter...but to choose began state is good
or may be ended too
does that work..reply fast..otherwise i may not be able to help you again :p
 
 
2 hours later…
2:25 PM
@anishparajuli nope :/
 
2:44 PM
why it didnot work?
 
3:13 PM
It isnt showing palcemark
placemark with title
after relaunch
You cant tap on pin
@anishparajuli
 
3:33 PM
do the annotaions show?
 
Yes
But I can't tap on them after relaunch
 
yes..that is only what has done
you have not set any info about the title
so how are you gonna get it then...
 
Remove button, Detail button and title
sec
and then annotation.title = self.adresa! + " " + self.cislo!
and for this buttons pastebin.com/zUPZ85eL
 
so your data is large..so its better to keep the data in database or in plist file then
 
And adresa and cislo is defined
                self.cislo = placemark.subThoroughfare != nil ? placemark.subThoroughfare : ""
                self.adresa = placemark.thoroughfare != nil ? placemark.thoroughfare : ""
 
3:37 PM
i though there would be just address define
please dont paste code here
 
Okey
 
are you getting now..you have a whole bunch of information to display on the annotation..so consider using sqlite data base..where you will be putting information about the annotation in the form of tuple?
you can ask for your project teacher..on whats the best way to do it?
 
We can do it how we want..
Just it must work how he said
Show your current location where in placemark will be shown Address and Address number, You can add pin and that pin will be shown after relaunch with title of Address and Address number and also pins will have Remove Button and Detail Button where Detail button will be pushed to another view where all infos will be displayed
All these things I have. Only What I need to show buttons, title after Relaunch
Because When I Add Pin its showing title, after relaunch dont..
I can upload my project so you can see how it works
 
so then where am i going to see it..in windows
?
if i had mac i would really love to help you
you are doing good just repeat the same process for the title and button
its really the same but using userdefaults for that is messy
so i recommend you to use sqlite
 
I never worked with sqlite :/
 
3:48 PM
thats your problem
do it now
you will be working in couple of hours
 
Okey. Anyway thanks for you time helping me! Appreciate it
 
you can do it by userdefaults too..but the code will be messy
i though this is your project ..not assignment?is it true?
 
Nope.. This is assignment.. But I have my own project..
But I'm doing with CoreData, TableViews...
 
okok
best of luck
 
Thanks u 2
 
3:52 PM
see you ..catch you later....remember me if you got some problem
i have always to help you and gain some knowledge
bye
u r wc
 
I think
I know where will be problem
I need to put title in loadAnnotationFromUserDefaults. I tried to put title "Test" and after relaunch Its showing title "Test" with buttons but detail button push to view where show adress of current location
Okey I fixed title.. But when i press detail button I'm getting to detailview with current location :D
And remove button doesnt work.. When i delete it. Relaunch pin is still there @anishparajuli
 

« first day  last day (14 days later) »