Fix for UIScrollView instances not scrolling properly in iOS apps that don't use SDL_iPhoneSetAnimationCallback
authorDavidLudwig <dludwig@pobox.com>
Mon, 23 Jul 2012 00:10:19 -0400
changeset 6684 992268e65626
parent 6683 b1124b32b07d
child 6685 8faee8f46165
Fix for UIScrollView instances not scrolling properly in iOS apps that don't use SDL_iPhoneSetAnimationCallback
src/video/uikit/SDL_uikitevents.m
--- a/src/video/uikit/SDL_uikitevents.m	Thu Nov 22 11:55:11 2012 -0800
+++ b/src/video/uikit/SDL_uikitevents.m	Mon Jul 23 00:10:19 2012 -0400
@@ -61,6 +61,11 @@
         do {
             result = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, TRUE);
         } while (result == kCFRunLoopRunHandledSource);
+		
+		/* Make sure UIScrollView objects scroll properly. */
+		do {
+			result = CFRunLoopRunInMode((CFStringRef)UITrackingRunLoopMode, 0, TRUE);
+		} while(result == kCFRunLoopRunHandledSource);
     }
 }