Note that there are some explanatory texts on larger screens.

plurals
  1. POUIMapkit Implementation problem
    primarykey
    data
    text
    <p>I have install the app. in ios 4.2 then the map is complete working but this app is crashed in ios 3.2. What can i do?</p> <h1>import "customAnnotation.h"</h1> <p>@implementation customAnnotation @synthesize coordinate, titletext, subtitletext;</p> <p>-(id)initWithCoordinate:(CLLocationCoordinate2D)coords{</p> <pre><code>coordinate = coords; NSLog(@"%f,%f",coords.latitude,coords.longitude); return self; </code></pre> <p>}</p> <ul> <li>(NSString *)subtitle{ return self.subtitletext; }</li> <li>(NSString *)title{ return self.titletext; }</li> </ul> <p>-(void)setTitle:(NSString*)strTitle {<br> self.titletext = strTitle;<br> } </p> <p>-(void)setSubTitle:(NSString*)strSubTitle {<br> self.subtitletext = strSubTitle;<br> }<br> -(void)dealloc { [titletext release]; [subtitletext release]; [super dealloc];</p> <p>}</p> <p>@end</p> <p>in custom annotation class</p> <p>and other class code is here</p> <h1>import "MapExampleViewController.h"</h1> <p>@implementation MapExampleViewController</p> <p>-(void)createAnnotationWithCoords:(CLLocationCoordinate2D)coords{</p> <pre><code>customAnnotation *annotation = [[customAnnotation alloc] initWithCoordinate:coords]; //annotation.title = @"Gandhinagar"; //annotation.subtitle = @"Indroda Park"; [annotation setTitle:@"Main Title"]; [annotation setSubTitle:@"Sub Title"]; [myMapView addAnnotation:annotation]; [annotation release]; </code></pre> <p>}</p> <p>// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad {</p> <pre><code>[super viewDidLoad]; myMapView = [[MKMapView alloc] initWithFrame:[self.view bounds]]; CLLocationCoordinate2D coords = CLLocationCoordinate2DMake(23.216667, 72.683333); float zoomLevel = 0.2; MKCoordinateRegion region = MKCoordinateRegionMake(coords, MKCoordinateSpanMake(zoomLevel, zoomLevel)); [myMapView setRegion:[myMapView regionThatFits:region] animated:YES]; myMapView.delegate = self; [self createAnnotationWithCoords:coords]; [self.view addSubview:myMapView]; </code></pre> <p>}</p> <p>when I am install the app. in ios 3.2 then it gives below error</p> <p>[Switching to thread 11779] [Switching to thread 11779] sharedlibrary apply-load-rules all continue Program received signal: “EXC_BAD_ACCESS”. warning: check_safe_call: could not restore current frame</p> <p>warning: check_safe_call: could not restore current frame</p> <p>warning: Unable to restore previously selected frame. warning: check_safe_call: could not restore current frame</p> <p>warning: Unable to restore previously selected frame. warning: Unable to restore previously selected frame. warning: Unable to restore previously selected frame. kill quit</p> <p>The Debugger has exited with status 0.(gdb) please help! thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload