This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface UIApplication(Reachability) | |
// This private method is used to push the view controller back up after | |
// double tapping the home button | |
- (void)_deactivateReachability; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import PlaygroundSupport | |
// This playground compares the time spend in `setNeedsDisplay` to the time spend in `draw(rect:)` | |
// From the documentation, `setNeedsDisplay` should return in constant time but as you see here | |
// it grows linear with the time needed in `draw(rect)`. | |
// to compare for yourself, observe the variables `timeInSetNeedsDisplay` and `timeInDrawRect` and start drawing points by panning in | |
// the live view | |
final class PointView: UIView { |