Ver código fonte

Simplify the view property KVO tracking.

If things are changing and animating on screen, our outlines may get out of sync with the underlying view being tracked. Without tracking the entire view hierarchy, this will be hard to avoid. Previously we tried to catch some changes by observing the view’s superview, but since we don’t strongly retain the tracked view’s superview, it may go away while we’re observing it. Rather than trying to patch this incomplete solution, we’re simplifying and only observing the frames of the tracked views.
Ryan Olson 12 anos atrás
pai
commit
a597c98897

+ 1 - 3
Classes/Explorer Toolbar/FLEXExplorerViewController.m

@@ -326,10 +326,8 @@ typedef NS_ENUM(NSUInteger, FLEXExplorerMode) {
     static NSArray *trackedViewKeyPaths = nil;
     static dispatch_once_t onceToken;
     dispatch_once(&onceToken, ^{
-        NSString *superviewKeyPath = NSStringFromSelector(@selector(superview));
         NSString *frameKeyPath = NSStringFromSelector(@selector(frame));
-        NSString *superviewFrameKeyPath = [NSString stringWithFormat:@"%@.%@", superviewKeyPath, frameKeyPath];
-        trackedViewKeyPaths = @[frameKeyPath, superviewKeyPath, superviewFrameKeyPath];
+        trackedViewKeyPaths = @[frameKeyPath];
     });
     return trackedViewKeyPaths;
 }