Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6736561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:08:39+00:00 2026-05-26T11:08:39+00:00

Basically I am creating an app with the main view being a MKMapView where

  • 0

Basically I am creating an app with the main view being a MKMapView where I need to show some annotations(of businesses, schools etc.).The annotations come from KML files that I retrieve ‘dynamically’ from a website.The second view, an UITableView, has the categories that represent annotations in the map.The selection of some categories, will lead to a string with their ID’s and when the Back button is clicked, this view should pass this string to the MapView, where it gets concatenated to another string that holds the other part of the ‘query string’, and so the KML file should be downloaded and its annotations viewed in the map.
There’s a problem,all the cells can be selected (checked), but when I click the Navigation Bar button ‘Back’ to go to the previous view, the app crashes.When I don’t select any cell and click the Back button, the app still crashes, but in the log file it tells me that the string I was passing to the previous view is nil.I have prepared the code for passing the parameter from one view to another, and don’t understand what is going wrong.I am posting code relevant only to the passing of the string between views.

GisListViewController.m :

  - (void)tableView:(UITableView *)tableView
  didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@">>> Entering %s <<<", __PRETTY_FUNCTION__);

[tableView deselectRowAtIndexPath:indexPath animated:YES];
[tableView deselectRowAtIndexPath:[tableView indexPathForSelectedRow] animated:NO];
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];

if (cell.accessoryType == UITableViewCellAccessoryNone ) {
    cell.accessoryType = UITableViewCellAccessoryCheckmark; 
} else if (cell.accessoryType == UITableViewCellAccessoryCheckmark ) {
    cell.accessoryType = UITableViewCellAccessoryNone;
}

NSMutableDictionary * myDictionary = [[NSMutableDictionary alloc] initWithCapacity:60];
int i = 0;
for (i = 0; i < [gisCategoryID count]; i++) {
    [myDictionary setObject:[gisCategoryList objectAtIndex:i] forKey:[gisCategoryID objectAtIndex:i]];
    NSMutableString *paramString2 = [[[NSMutableString alloc] init] autorelease];
    [paramString2 appendFormat:@"%@&", [myDictionary objectForKey:[gisCategoryID objectAtIndex:i]]];

    paramString = paramString2;
}

NSLog(@"<<< Leaving %s >>>", __PRETTY_FUNCTION__);
}

 - (void) viewWillDisappear:(BOOL) animated
{
NSLog(@">>> Entering %s <<<", __PRETTY_FUNCTION__);

NSString *httpString = @"http://www.ikub.al/hartav2/handlers/kmlgenerator.ashx?layerid=";
NSString *finalkmlString = [ httpString stringByAppendingString:paramString ];

[[self delegate] setKmlString:finalkmlString];

NSLog(@"<<< Leaving %s >>>", __PRETTY_FUNCTION__);
}

Hope it helps.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:08:39+00:00Added an answer on May 26, 2026 at 11:08 am

    I guess Autorelease giving the problem.Try like this

    NSMutableString *paramString2 = [[NSMutableString alloc] init];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating an Android app utilising OpenGL ES, and need some help with the
Basically I need to insert a bunch of data to an Excel file. Creating
I am creating an android app that is basically a listing of information on
I'm creating a standalone WPF app with multi-language support. I've found some great resources
I am creating an android app that basically records an applies an Effect on
Ok basically im in the process of creating an app that loads gestures I
Hi all I am creating my first Backbone.js app. It is basically a collection
Hey guys. I'm creating a rails app and being one of the first times
I'm creating an app that is basically an extension of a tutorial (I am
I'm creating an iphone/ipad app that basically reads XML documents and creates tableviews from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.