Giter Site home page Giter Site logo

present-bug's Introduction

presentViewController:animated:completion: bug

Demonstration project of a bug in UIViewController presentViewController:animated:completion: on iOS 8.3.

Usage:

  • Start the app on a device with iOS 8.3 (iOS 8.1 also works, haven't tried w/ older versions)
  • Wait until the app stops producing kCFRunLoop ... log lines (i.e. the main runloop goes to sleep):
   ... more lines
   2015-06-11 18:24:51.214 UIActivityViewControllerTest[526:45580] kCFRunLoopBeforeSources
   2015-06-11 18:24:51.214 UIActivityViewControllerTest[526:45580] kCFRunLoopBeforeWaiting
   2015-06-11 18:25:00.001 UIActivityViewControllerTest[526:45580] kCFRunLoopAfterWaiting
   2015-06-11 18:25:00.008 UIActivityViewControllerTest[526:45580] kCFRunLoopBeforeTimers
   2015-06-11 18:25:00.009 UIActivityViewControllerTest[526:45580] kCFRunLoopBeforeSources
   2015-06-11 18:25:00.010 UIActivityViewControllerTest[526:45580] kCFRunLoopBeforeWaiting

The last line should be kCFRunLoopBeforeWaiting

  • Tap on the first row; this calls presentViewController:animated:completion to present a completely blank view controller w/ red background
  • Notice how the red view controller failed to appear
  • Tap anywhere on the screen, or shake the device, or wait until the clock on the status bar updates: the view controller should appear now
  • Tap anywhere on the red view controller to dismiss it
  • Tap on the second row; this calls presentViewController:animated:completion: and then calls CFRunLoopWakeUp(CFRunLoopGetCurrent())
  • Notice how this time, no matter what the main runloop's state was, the view controller was presented correctly.

Rdar: http://openradar.appspot.com/19563577

Other people encountering the same issue:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.