A drop-in code snippet that dynamically detects non-recycled UI elements inside your UITableViewCells.
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 99 commits behind diwu:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



A dead simple drop-in code snippet that detects non-recycled UI elements inside your UITableViewCells. #Usage Step 1: Drop DWURecyclingAlert.m into your project.

Step 2: There's no step 2.

Now launch your app, initialize a UITableView and observe. Anything that are marked with an ugly bold red border are UI stuff that are created on the fly while the user is scrolling. You should consider caching those UI stuff and reusing them whenever possible.

Once you start caching those UI stuff, the ugly red borders will be gone, for good. Because DWURecyclingAlert.m will intelligently detect which is cached and will only mark those that are not cached with a red border. #How It Works DWURecyclingAlert.m dynamically injects a property into every UIView instances so that it has a way to know which is recycled and which is not. #Disabled in Release Builds By Default DWURecyclingAlert.m requires the DEBUG macro to compile and run. If you also want to disable it in debug builds, feel free to comment out the DWURecyclingAlertEnabled macro at the top of the file. #Example Project Inside this repo you can find the RecyclingAlert example project.