GithubHelp home page GithubHelp logo

Comments (5)

ianyh avatar ianyh commented on August 15, 2024

Something more complicated is going on here. I've been doing more diagnosing and I've got it working correctly with both Crashlytics enabled and disabled. I will try to narrow it down more and figure out what the actual problem is. In the mean time I will rename the issue.

from ventouchlock.

ianyh avatar ianyh commented on August 15, 2024

Figured it out. The problem was the background color of the splash view controller. The default background color of a UIView is nil, which is transparent. Usually this doesn't actually matter as the controller is usually part of some presentation context, most notably a UINavigationController which does not have a transparent background by default, or it is generated by a nib file or storyboard, both of which use white backgrounds for views by default.

So if you programmatically generate the splash view controller it will look as if it has a black background. I haven't actually tested this completely, but it seems like the presentation with no animation immediately displays the splash view controller's transparent view on top of the underlying black of the window. If the presentation were animated it would look like a delay in the view being presented and the view it's being presented on disappearing suddenly. But the snapshotting just puts a transparent view on top of the window.

The end result being that it looks like the snapshotting isn't working correctly. The transparent view doesn't actually block the underlying one, but when you open the app it actually refreshes the view to match the presentation so you see the black right before the authentication request happens or the passcode view pops up. It looks like a black splash with no snapshotting.

I thought that presentation didn't remove the presenting view controller's view anymore, so I'm actually not entirely sure why it shows up as black, but that is definitely the behavior I have observed. Regardless, it's worth noting in the docs that you need to set a background color or possibly just giving the splash view controller a default background color.

from ventouchlock.

ianyh avatar ianyh commented on August 15, 2024

I'm not sure what was going on with Crashlytics. Possibly I somehow mucked with things so that the presentation was happening before iOS took the snapshot, but Crashlytics caused the race condition to work out the other way.

from ventouchlock.

dasmer avatar dasmer commented on August 15, 2024

Hey @ianyh

Thanks for looking into that. Do you want to create a PR that sets the default color of VENTouchLockSplashViewController in its init.

from ventouchlock.

ianyh avatar ianyh commented on August 15, 2024

Done!

from ventouchlock.

Related Issues (20)

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.