CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Oct 2015 |
Maintained by Di Wu.
Your code usually has less than ten milliseconds to run before it causes a frame drop.1
Injects 4 classes:
UITableViewCell
UICollectionViewCell
UITableViewHeaderFooterView
UICollectionReusableView
(as footers/headers)Monitors 6 time sensitive API calls:
[UIView drawRect:]
tableView:cellForRowAtIndexPath:
tableView:viewForHeaderInSection:
tableView:viewForFooterInSection:
collectionView:cellForItemAtIndexPath:
collectionView:viewForSupplementaryElementOfKind:atIndexPath:
Visualizes bad drawing code in 2 ways:
Step 1: Drop DWURecyclingAlert.m into your project, Swift or ObjC.
Step 2: There's no step 2.
(Optionally) Using CocoaPods and manually start the injection:
pod 'DWURecyclingAlert'
Then manually start injection by running the following function anywhere in your project:
void Inject_DWURecyclingAlert();
It's likely that your project happens to use lots of [UIColor redColor]
here and there. Or, maybe you want to localize the millisecond warning string with your team's first language. Take a look at the UI Configuration section and customize them the way you like.
Method swizzling and associated objects. You could always read the source.
DWURecyclingAlert.m requires the DEBUG macro to compile and run. As a result, it's disabled in Release by default. If you also want to disable it in debug builds, comment out the DWURecyclingAlertEnabled macro at the top of the file.
drawRect:
, if that's the case, DWURecyclingAlert.m will calculate the sum for all the time it takes to go through each drawRect:
call.Inside this repo you can find the RecyclingAlert example project.
DWURecyclingAlert is released under the MIT license. See LICENSE for details.
1: Facebook AsyncDisplayKit Guide. (http://asyncdisplaykit.org/guide)