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

  • Home
  • SEARCH
  • 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 6117419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:19:06+00:00 2026-05-23T15:19:06+00:00

I have a UIViewController (call it NumberTwo) which I presented as a modal view

  • 0

I have a UIViewController (call it NumberTwo) which I presented as a modal view controller from another UIViewController (call it NumberOne). NumberTwo contains a touchesBegan method which listens for touches, and it also has an accelerometer method which listens for device orientation changes in the x, y, or z direction. NumberTwo has a button called “Done” which, when tapped, dismisses itself as a modal view controller:

[self dismissModalViewControllerAnimated:NO];

But it seems as though it’s still listening for touches, and it’s still listening for accelerations. How can I completely free up NumberTwo when I dismiss it? I tried adding a release call as follows:

[self dismissModalViewControllerAnimated:NO];
[self release];

but that caused a EXEC_BAD_ACCESS.

  • 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-23T15:19:07+00:00Added an answer on May 23, 2026 at 3:19 pm

    Did you release the controller after you presented it? E.g. in your method in NumberOneController that presents it, do you have something like:

    NumberTwoController * controller = [NumberTwoController alloc] init];
    // do stuff to config controller
    [self presentModalViewController: controller];
    [controller release];
    

    Unless you want to hang on to NumberTwoController for re-use, this would be the usual pattern. The presentModalViewController method ensures that the controller is retained while it’s in use. It should then get tidied up when, within NumberTwoController, you call [self dismissModalViewControllerAnimated: NO].

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

Sidebar

Related Questions

I have a UIViewController which presents a modal view controller and when I rotate
I have a UIViewController (MyViewController) and another view controller i'm presenting modally though MyViewController
I have differents UIViewController that contains components that appear and disappear from the view
I have my view controller class MyVC extending from UIViewController class. In the designated
I have a UIViewController — let's call it FormController — which is simply a
I have a UIViewController and in that controller, i am fetching an image from
i have view based application, and i want to call a method in superview(parentview)
I have a problem with data in UITableView. I have UIViewController, that contains UITableView
I have a UIViewController which when it loads it loads up this.. MapViewController *mapController
I have a UIViewController (which sits inside a tabUIController). Within this UIViewController, I want

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.