Declared in UIView+DTDebug.h

Overview

Methods useful for debugging problems with UIView instances.

Class Methods

toggleViewMainThreadChecking

Toggles on/off main thread checking on several methods of UIView.

+ (void)toggleViewMainThreadChecking

Discussion

Currently the following methods are swizzeled and checked:

  • setNeedsDisplay
  • setNeedsDisplayInRect:
  • setNeedsLayout

Those are triggered by a variety of methods in UIView, e.g. setBackgroundColor and thus it is not necessary to swizzle all of them.

Declared In

UIView+DTDebug.h

Instance Methods

methodCalledNotFromMainThread:

Method that gets called if one of the important methods of UIView is not being called on a main queue.

- (void)methodCalledNotFromMainThread:(NSString *)methodName

Parameters

methodName

Symbolic name of the method being called

Discussion

Toggle this on/off with . Break on [UIView methodCalledNotFromMainThread:] to catch it in debugger.

Declared In

UIView+DTDebug.h