Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Commit

Permalink
Fixed BlurEffectWithAmount linker collission on iOS/Xcode
Browse files Browse the repository at this point in the history
  • Loading branch information
IjzerenHein committed Feb 8, 2019
1 parent 9332f47 commit 9f726c1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import <UIKit/UIKit.h>

@interface BlurEffectWithAmount : UIBlurEffect
@interface RCTMagicMoveBlurEffectWithAmount : UIBlurEffect
@property (nonatomic, strong) NSNumber *blurAmount;

+ (instancetype)effectWithStyle:(UIBlurEffectStyle)style andBlurAmount:(NSNumber*)blurAmount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// See: http://stackoverflow.com/a/30744777/304706
//

#import "BlurEffectWithAmount.h"
#import "RCTMagicMoveBlurEffectWithAmount.h"
#import <objc/runtime.h>

@interface UIBlurEffect (Protected)
Expand All @@ -12,7 +12,7 @@ @interface UIBlurEffect (Protected)

@end

@implementation BlurEffectWithAmount
@implementation RCTMagicMoveBlurEffectWithAmount
@dynamic blurAmount;

+ (instancetype)effectWithStyle:(UIBlurEffectStyle)style
Expand All @@ -24,7 +24,7 @@ + (instancetype)effectWithStyle:(UIBlurEffectStyle)style

+ (instancetype)effectWithStyle:(UIBlurEffectStyle)style andBlurAmount:(NSNumber*)blurAmount
{
BlurEffectWithAmount *effect = (BlurEffectWithAmount*)[self effectWithStyle:style];
RCTMagicMoveBlurEffectWithAmount *effect = (RCTMagicMoveBlurEffectWithAmount*)[self effectWithStyle:style];
effect.blurAmount = blurAmount;
return effect;
}
Expand Down
4 changes: 2 additions & 2 deletions ios/RCTMagicMoveClone.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import <React/UIView+React.h>
#import "RCTMagicMoveClone.h"
#import "RCTMagicMoveCloneDataManager.h"
#import "BlurEffectWithAmount.h"
#import "RCTMagicMoveBlurEffectWithAmount.h"

#ifdef DEBUG
#define DebugLog(...) NSLog(__VA_ARGS__)
Expand Down Expand Up @@ -103,7 +103,7 @@ - (void)setBlurRadius:(CGFloat)blurRadius
//[self.layer setNeedsDisplay];

if (blurRadius) {
BlurEffectWithAmount* blurEffect = [BlurEffectWithAmount effectWithStyle:UIBlurEffectStyleLight andBlurAmount:@(blurRadius)];
RCTMagicMoveBlurEffectWithAmount* blurEffect = [RCTMagicMoveBlurEffectWithAmount effectWithStyle:UIBlurEffectStyleLight andBlurAmount:@(blurRadius)];
if (_blurEffectView == nil) {
_blurEffectView = [[UIVisualEffectView alloc] init];
_blurEffectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
Expand Down
12 changes: 6 additions & 6 deletions ios/RNMagicMove.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
21B64D5722073E540034B27D /* BlurEffectWithAmount.m in Sources */ = {isa = PBXBuildFile; fileRef = 21B64D4D22073E540034B27D /* BlurEffectWithAmount.m */; };
21B64D5722073E540034B27D /* RCTMagicMoveBlurEffectWithAmount.m in Sources */ = {isa = PBXBuildFile; fileRef = 21B64D4D22073E540034B27D /* RCTMagicMoveBlurEffectWithAmount.m */; };
21B64D5822073E540034B27D /* RCTMagicMoveCloneData.m in Sources */ = {isa = PBXBuildFile; fileRef = 21B64D4F22073E540034B27D /* RCTMagicMoveCloneData.m */; };
21B64D5922073E540034B27D /* RCTMagicMoveClone.m in Sources */ = {isa = PBXBuildFile; fileRef = 21B64D5422073E540034B27D /* RCTMagicMoveClone.m */; };
21B64D5A22073E540034B27D /* RCTMagicMoveCloneDataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 21B64D5522073E540034B27D /* RCTMagicMoveCloneDataManager.m */; };
Expand All @@ -28,10 +28,10 @@

/* Begin PBXFileReference section */
134814201AA4EA6300B7C361 /* libRNMagicMove.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNMagicMove.a; sourceTree = BUILT_PRODUCTS_DIR; };
21B64D4D22073E540034B27D /* BlurEffectWithAmount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BlurEffectWithAmount.m; sourceTree = "<group>"; };
21B64D4D22073E540034B27D /* RCTMagicMoveBlurEffectWithAmount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTMagicMoveBlurEffectWithAmount.m; sourceTree = "<group>"; };
21B64D4E22073E540034B27D /* RCTMagicMoveCloneManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTMagicMoveCloneManager.h; sourceTree = "<group>"; };
21B64D4F22073E540034B27D /* RCTMagicMoveCloneData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTMagicMoveCloneData.m; sourceTree = "<group>"; };
21B64D5022073E540034B27D /* BlurEffectWithAmount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlurEffectWithAmount.h; sourceTree = "<group>"; };
21B64D5022073E540034B27D /* RCTMagicMoveBlurEffectWithAmount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTMagicMoveBlurEffectWithAmount.h; sourceTree = "<group>"; };
21B64D5122073E540034B27D /* RCTMagicMoveClone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTMagicMoveClone.h; sourceTree = "<group>"; };
21B64D5222073E540034B27D /* RCTMagicMoveCloneData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTMagicMoveCloneData.h; sourceTree = "<group>"; };
21B64D5322073E540034B27D /* RCTMagicMoveCloneDataManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTMagicMoveCloneDataManager.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -62,8 +62,8 @@
58B511D21A9E6C8500147676 = {
isa = PBXGroup;
children = (
21B64D5022073E540034B27D /* BlurEffectWithAmount.h */,
21B64D4D22073E540034B27D /* BlurEffectWithAmount.m */,
21B64D5022073E540034B27D /* RCTMagicMoveBlurEffectWithAmount.h */,
21B64D4D22073E540034B27D /* RCTMagicMoveBlurEffectWithAmount.m */,
21B64D5122073E540034B27D /* RCTMagicMoveClone.h */,
21B64D5422073E540034B27D /* RCTMagicMoveClone.m */,
21B64D5222073E540034B27D /* RCTMagicMoveCloneData.h */,
Expand Down Expand Up @@ -136,7 +136,7 @@
21B64D5A22073E540034B27D /* RCTMagicMoveCloneDataManager.m in Sources */,
21B64D5922073E540034B27D /* RCTMagicMoveClone.m in Sources */,
21B64D5822073E540034B27D /* RCTMagicMoveCloneData.m in Sources */,
21B64D5722073E540034B27D /* BlurEffectWithAmount.m in Sources */,
21B64D5722073E540034B27D /* RCTMagicMoveBlurEffectWithAmount.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down

0 comments on commit 9f726c1

Please sign in to comment.