yy20111011659 / route-me

Automatically exported from code.google.com/p/route-me
0 stars 0 forks source link

tapOnMarker with UIAlertView #142

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  attempt to show a UIAlertView or UIActionSheet view when the 
tapOnMarker:onMap: method is called.

What is the expected output? What do you see instead?

the UIAlertView or UIActionSheet view should be displayed; however, instead 
tapOnMarker:onMap: seems to be called repeatedly until the program crashes.

What subversion release are you using? Does the behavior occur on the
simulator, a real iPhone/iPod Touch, or both?

version 0.5.  iOS versions prior to 4.0 do not produce the problem.  problem 
occurs with both simulator and real devices running iOS 4.

If you can reproduce your bug, please provide the source code for a
reproducing case. The best place to start is with the SampleMap project.

for example, add the following code to the MainViewController.m file in the 
MarkerMurder project:

- (void) tapOnMarker:(RMMarker *)marker onMap:(RMMapView *)map {
    NSLog(@"tapped on marker: %@", [marker description]);
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle: @"Marker" message: [marker description] delegate: self cancelButtonTitle: @"OK" otherButtonTitles: nil];
    [alert show];
    [alert release];
}

then build/run project and tap on a marker in the map view.

Please don't send patches/diffs. Post source code directly to the issue
tracker, noting your suggested revisions. If they are extensive, use a
branch in subversion with the same name as your issue number (e.g.
branches/issue59).

Please provide any additional information below.

Original issue reported on code.google.com by jmatchet...@gtempaccount.com on 11 Jul 2010 at 9:24

GoogleCodeExporter commented 8 years ago
Workaround:

Using [alert performSelector:@selector(show) withObject:nil afterDelay:0.01]; 
instead of [alert show]; works for me.

Original comment by winkler....@gmail.com on 28 Sep 2010 at 9:23