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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:23:10+00:00 2026-05-22T22:23:10+00:00

In my iPhone app I have a UIScrollView with custom content views. At some

  • 0

In my iPhone app I have a UIScrollView with custom content views. At some points, a custom popup view is dynamically added to the content with a zoom animation on appear and disappear. I’m using block-based animations with a completion handler that calls [self removeFromSuperView] as follows:

- (void)dismissPopup {
    CGRect rect = self.frame;
    rect.origin.y += rect.size.height/2 * (pointingDown ? 1 : -1);
    [UIView animateWithDuration:kZoomDuration
                     animations:^{
                         self.frame = rect;
                         self.transform = CGAffineTransformMakeScale(0.01, 0.01);
                     }
                     completion:^(BOOL finished) {
                         [self removeFromSuperview];
                     }];
}

Mostly this works, but now and again following this animation the UI completely locks up and is unresponsive to any touch. I’m pretty sure this animation the source of the problem as with the animation code commented out I haven’t been able to reproduce it. Breaking in with the debugger, all three threads appear to be idle:

Thread-1
#0  0x32fd1c98 in mach_msg_trap
#1  0x32fd3d6a in mach_msg
#2  0x34432c3e in __CFRunLoopServiceMachPort
#3  0x344324c8 in __CFRunLoopRun
#4  0x34432276 in CFRunLoopRunSpecific
#5  0x3443217e in CFRunLoopRunInMode
#6  0x3026b5f2 in GSEventRunModal
#7  0x3026b69e in GSEventRun
#8  0x31ad0122 in -[UIApplication _run]
#9  0x31ace12e in UIApplicationMain
#10 0x00002b06 in main at main.m:14

Thread-2
#0  0x32ffe330 in kevent
#1  0x330a7b74 in _dispatch_mgr_invoke
#2  0x330a75c4 in _dispatch_queue_invoke
#3  0x330a7764 in _dispatch_worker_thread2
#4  0x3304b680 in _pthread_wqthread

Thread-3
#0  0x32fd1c98 in mach_msg_trap
#1  0x32fd3d6a in mach_msg
#2  0x34432c3e in __CFRunLoopServiceMachPort
#3  0x344324c8 in __CFRunLoopRun
#4  0x34432276 in CFRunLoopRunSpecific
#5  0x3443217e in CFRunLoopRunInMode
#6  0x34b524e8 in RunWebThread
#7  0x3304b284 in _pthread_start

Instruments shows that my app is taking no CPU time, so it’s some kind of deadlock. Can anyone shed any light on this behaviour, and how to avoid it?

Update: I’ve done some more digging and using the traditional animation API the bug also seems to have disappeared. Could this be a bug in the new animation framework?

- (void)dismissPopup {
    CGRect rect = self.frame;
    rect.origin.y += rect.size.height/2 * (pointingDown ? 1 : -1);
    [UIView beginAnimations:@"dismissPopup" context:nil];
    [UIView setAnimationDuration:kZoomDuration];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
    self.frame = rect;
    self.transform = CGAffineTransformMakeScale(0.01, 0.01);
    [UIView commitAnimations];
}

- (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {
    [self removeFromSuperview];
}
  • 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-22T22:23:11+00:00Added an answer on May 22, 2026 at 10:23 pm

    You should probably try this method for your animation:
    +animateWithDuration:delay:options:animations:completion:

    with options: UIViewAnimationOptionAllowUserInteraction

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

Sidebar

Related Questions

I have an iPhone app that hides the status bar. However, my main view
I currently have a simple iPhone app that loads a custom subclass of UIView.
I have a iphone app where I want to present one of the views
I am looking to distribute an open source iPhone app and I have a
I have a simple iphone app that's based on the CrashLanding sample app. So
I have an iPhone app that compiles and runs fine in the Simulator on
I have an iphone app where I call these three functions in appDidFinishLaunching: glMatrixMode(GL_PROJECTION);
In my iPhone app, I have put a UIBarBUtton of type UIBarButtonSystemItemTrash in my
I'm working on a simple iPhone app. I have 1 UINavigationController and 2 subclasses
I'm writing server-side programs in PHP for an iPhone app. And I have no

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.