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 8601589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:52:44+00:00 2026-06-12T01:52:44+00:00

I have a class called FlightRecorder and BookmarkTableViewController . Now, I am presenting the

  • 0

I have a class called FlightRecorder and BookmarkTableViewController. Now, I am presenting the BookmarkTableViewController. And now I am dismissing that view controller. Here is what the code looks like:

    [self dismissViewControllerAnimated:YES completion:^{

    FlightRecorder *fl = [[FlightRecorder alloc] init];
    [fl endBookmarkProcessWithBookmarkCollection: dict];

    }

This is getting called after selection of a table view cell. So, FlightRecorder has a method called endBookmarkProcessWithBookmarkCollection: where you pass on an NSDictionary which looks like this:

- (void)endBookmarkProcessWithBookmarkCollection: (NSDictionary *)dict {

NSString *compiledText = @"Random Airline";

NSString *string = [NSString stringWithFormat: @"\nMiles: %.2f\nFlight: %@\nDate: %@", [[dict objectForKey: @"miles"] floatValue], compiledText, [[NSUserDefaults standardUserDefaults] objectForKey:@"tempD"]];

self.bkBookmarkAlertView = [[UIAlertView alloc] initWithTitle:@"Confirmation" message:string delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Add", nil];

[bkBookmarkAlertView show];

}

So as you can see, I use the dictionary and some other variables to piece together the message of an alert view! The alert view has two buttons, Cancel and Add. But the problem is that when you press either of them, they both crash, and the clickedButtonAtIndex: delegate method is not called. I have not had this experience with any other alert views in the exact same view controller.

I looked at some other questions of similar manner, but they’re solutions were using ARC. Bottomline they said that self, the delegate of the alert view, is nil or overreleased or something like that. So I thought, maybe that method is getting called before the view loads, even though it is called on apparent completion (the completion block in BookmarksTableViewController).

So I decided to put NSLog‘s in both viewDidLoad and endBookmarkProcessWithBookmarkCollection:, but viewDidLoad is getting called first, so I am not sure where the problem is.

Thanks for any help!

  • 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-06-12T01:52:45+00:00Added an answer on June 12, 2026 at 1:52 am

    That block has finished executing and f1 has gone out of scope and been deallocated well before you tap the buttons. I’m not familiar with the architecture of your app but you’ll need to find an owner for that object while waiting for the tap.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class called Foo that has a function that looks like the
I have a class called: ComplexNumber and I have a string that I need
I have a class called Trial which has_many results. Now What I want to
I have a class called Flamethrower which naturally has its own ammunition that is
I have a class called Property that I only need to display a few
I have a class called Image and a class that extends it called ImageSheet
I have a class called Object which stores some data. I would like to
I have a class called Shape that is abstract, and a class named Circle
I have a class called GraphView that extends UIView that basically draws a small
I have a class Called MyClass. It lives in app/Lib/MyDir/MyClass. I'd like to use

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.