-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2bd0b13
commit b4e59f8
Showing
11 changed files
with
579 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// RNIBlurView.h | ||
// react-native-ios-visual-effect-view | ||
// | ||
// Created by Dominic Go on 6/6/24. | ||
// | ||
|
||
#import <react-native-ios-utilities/RNIBaseView.h> | ||
|
||
#if RCT_NEW_ARCH_ENABLED | ||
#import <React/RCTViewComponentView.h> | ||
#else | ||
#import <React/RCTView.h> | ||
#endif | ||
|
||
@protocol RNIContentViewParentDelegate; | ||
@protocol RNIContentViewDelegate; | ||
|
||
@class RCTBridge; | ||
|
||
#if RCT_NEW_ARCH_ENABLED | ||
namespace react = facebook::react; | ||
#endif | ||
|
||
@interface RNIBlurView : RNIBaseView | ||
|
||
@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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
// | ||
// RNIBlurView.mm | ||
// react-native-ios-visual-effect-view | ||
// | ||
// Created by Dominic Go on 6/6/24. | ||
// | ||
|
||
#import "RNIBlurView.h" | ||
|
||
#import "react-native-ios-visual-effect-view/Swift.h" | ||
#import <react-native-ios-utilities/RNIBaseView.h> | ||
|
||
#import <react-native-ios-utilities/RNIContentViewParentDelegate.h> | ||
|
||
|
||
#import <react-native-ios-utilities/UIApplication+RNIHelpers.h> | ||
#import <react-native-ios-utilities/RNIObjcUtils.h> | ||
|
||
#if RCT_NEW_ARCH_ENABLED | ||
#include "RNIBlurViewComponentDescriptor.h" | ||
|
||
#include <react-native-ios-utilities/RNIBaseViewState.h> | ||
#include <react-native-ios-utilities/RNIBaseViewProps.h> | ||
|
||
#import <React/RCTConversions.h> | ||
#import <React/RCTFabricComponentsPlugins.h> | ||
#import <React/RCTRootComponentView.h> | ||
#import <React/RCTSurfaceTouchHandler.h> | ||
|
||
#include <react/renderer/core/ComponentDescriptor.h> | ||
#include <react/renderer/core/ConcreteComponentDescriptor.h> | ||
#include <react/renderer/graphics/Float.h> | ||
#include <react/renderer/core/graphicsConversions.h> | ||
|
||
#import <react/renderer/components/RNIVisualEffectViewSpec/EventEmitters.h> | ||
#import <react/renderer/components/RNIVisualEffectViewSpec/RCTComponentViewHelpers.h> | ||
#else | ||
#import <React/RCTTouchHandler.h> | ||
#import <React/RCTInvalidating.h> | ||
#endif | ||
|
||
#ifdef RCT_NEW_ARCH_ENABLED | ||
using namespace facebook::react; | ||
#endif | ||
|
||
|
||
@interface RNIBlurView () < | ||
RNIContentViewParentDelegate, | ||
#ifdef RCT_NEW_ARCH_ENABLED | ||
RCTRNIBlurViewViewProtocol | ||
#else | ||
RCTInvalidating | ||
#endif | ||
> { | ||
// TBA | ||
} | ||
@end | ||
|
||
@implementation RNIBlurView { | ||
} | ||
|
||
// MARK: - Init | ||
// ------------ | ||
|
||
- (void)initCommon { | ||
[super initCommon]; | ||
} | ||
|
||
// MARK: - RNIBaseView | ||
// ------------------- | ||
|
||
+ (Class)viewDelegateClass | ||
{ | ||
return [RNIBlurViewDelegate class]; | ||
} | ||
|
||
// MARK: - Fabric | ||
// -------------- | ||
|
||
#if RCT_NEW_ARCH_ENABLED | ||
+ (ComponentDescriptorProvider)componentDescriptorProvider | ||
{ | ||
return concreteComponentDescriptorProvider<RNIBlurViewComponentDescriptor>(); | ||
} | ||
|
||
Class<RCTComponentViewProtocol> RNIBlurViewCls(void) | ||
{ | ||
return RNIBlurView.class; | ||
} | ||
#else | ||
|
||
// MARK: - Paper | ||
// ------------- | ||
|
||
- (void)invalidate | ||
{ | ||
// to be impl. | ||
} | ||
|
||
#endif | ||
@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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// RNIBlurViewComponentDescriptor.h | ||
// react-native-ios-visual-effect-view | ||
// | ||
// Created by Dominic Go on 6/6/24. | ||
// | ||
|
||
#if __cplusplus | ||
#pragma once | ||
|
||
#include "RNIBlurViewShadowNode.h" | ||
#include "RNIBaseViewComponentDescriptor.h" | ||
|
||
#include <react-native-ios-utilities/RNIBaseViewState.h> | ||
#include <react/renderer/core/ConcreteComponentDescriptor.h> | ||
|
||
|
||
namespace facebook::react { | ||
|
||
class RNIBlurViewComponentDescriptor final | ||
: public RNIBaseViewComponentDescriptor<RNIBlurViewShadowNode> { | ||
|
||
public: | ||
using RNIBaseViewComponentDescriptor::RNIBaseViewComponentDescriptor; | ||
}; | ||
|
||
} // namespace facebook::react | ||
#endif |
Oops, something went wrong.