Run CLANGFORMAT on plugins
Summary: This diff runs CLANGFORMAT lint on plugins. I have added CLANGFORMAT as the lint engined for objc files in xplat/sonar. Right now the iOS folder is not formatted according to CLANGFORMAT. Ran `arc lint -a --paths-cmd "find ./iOS/Plugins -type f" --verbose` Reviewed By: passy Differential Revision: D19942173 fbshipit-source-id: 8b975b0a344df073b02d69cd1f9ee5629af2799d
This commit is contained in:
committed by
Facebook Github Bot
parent
a19a430eee
commit
e8b20d5b15
@@ -20,34 +20,42 @@ FB_LINKABLE(UIView_SKInvalidation)
|
||||
+ (void)enableInvalidation {
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
swizzleMethods([self class], @selector(setHidden:), @selector(swizzle_setHidden:));
|
||||
swizzleMethods([self class], @selector(addSubview:), @selector(swizzle_addSubview:));
|
||||
swizzleMethods([self class], @selector(removeFromSuperview), @selector(swizzle_removeFromSuperview));
|
||||
swizzleMethods(
|
||||
[self class], @selector(setHidden:), @selector(swizzle_setHidden:));
|
||||
swizzleMethods(
|
||||
[self class], @selector(addSubview:), @selector(swizzle_addSubview:));
|
||||
swizzleMethods(
|
||||
[self class],
|
||||
@selector(removeFromSuperview),
|
||||
@selector(swizzle_removeFromSuperview));
|
||||
});
|
||||
}
|
||||
|
||||
- (void)swizzle_setHidden:(BOOL)hidden {
|
||||
[self swizzle_setHidden: hidden];
|
||||
[self swizzle_setHidden:hidden];
|
||||
|
||||
id<SKInvalidationDelegate> delegate = [SKInvalidation sharedInstance].delegate;
|
||||
id<SKInvalidationDelegate> delegate =
|
||||
[SKInvalidation sharedInstance].delegate;
|
||||
if (delegate != nil) {
|
||||
[delegate invalidateNode: self.superview];
|
||||
[delegate invalidateNode:self.superview];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)swizzle_addSubview:(UIView *)view {
|
||||
[self swizzle_addSubview: view];
|
||||
- (void)swizzle_addSubview:(UIView*)view {
|
||||
[self swizzle_addSubview:view];
|
||||
|
||||
id<SKInvalidationDelegate> delegate = [SKInvalidation sharedInstance].delegate;
|
||||
id<SKInvalidationDelegate> delegate =
|
||||
[SKInvalidation sharedInstance].delegate;
|
||||
if (delegate != nil) {
|
||||
[delegate invalidateNode: view];
|
||||
[delegate invalidateNode:view];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)swizzle_removeFromSuperview {
|
||||
id<SKInvalidationDelegate> delegate = [SKInvalidation sharedInstance].delegate;
|
||||
id<SKInvalidationDelegate> delegate =
|
||||
[SKInvalidation sharedInstance].delegate;
|
||||
if (delegate != nil && self.superview != nil) {
|
||||
[delegate invalidateNode: self.superview];
|
||||
[delegate invalidateNode:self.superview];
|
||||
}
|
||||
|
||||
[self swizzle_removeFromSuperview];
|
||||
|
||||
Reference in New Issue
Block a user