Skip to content

roostr/WebViewWarmer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebViewWarmer

Description

Have you ever wished that a UIWebView wouldn't take a few extra frames to load the first time you access it?

This simple utility waits for your app to go completely idle on the main thread for a short duration of time (by default, 0.5 seconds). "Completely idle" means that there have been no animations, no UI updates, and no touch events. When this idle period is detected, it performs a simple operation to load a UIWebView off-screen. This operation ensures that the next time you display a UIWebView, it will be ready to load without any stutter.

Example

Usage

Obj-C

[WebViewWarmer requestWarmingWhenIdle];

Swift

WebViewWarmer.requestWarmingWhenIdle()

Supported Platforms

  • iOS
  • Swift 4.2

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages