Skip to content

Commit 74669ce

Browse files
committed
Clone ViewManager files
1 parent 4c0305d commit 74669ce

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

ios/RNCProgressViewManager.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
#import <React/RCTViewManager.h>
9+
10+
@interface RNCProgressViewManager : RCTViewManager
11+
12+
@end

ios/RNCProgressViewManager.m

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
#import "RNCProgressViewManager.h"
9+
10+
#import <React/RCTConvert.h>
11+
12+
@implementation RCTConvert (RNCProgressViewManager)
13+
14+
RCT_ENUM_CONVERTER(UIProgressViewStyle, (@{
15+
@"default": @(UIProgressViewStyleDefault),
16+
#if !TARGET_OS_TV
17+
@"bar": @(UIProgressViewStyleBar),
18+
#endif
19+
}), UIProgressViewStyleDefault, integerValue)
20+
21+
@end
22+
23+
@implementation RNCProgressViewManager
24+
25+
RCT_EXPORT_MODULE()
26+
27+
- (UIView *)view
28+
{
29+
return [UIProgressView new];
30+
}
31+
32+
RCT_EXPORT_VIEW_PROPERTY(progressViewStyle, UIProgressViewStyle)
33+
RCT_EXPORT_VIEW_PROPERTY(progress, float)
34+
RCT_EXPORT_VIEW_PROPERTY(progressTintColor, UIColor)
35+
RCT_EXPORT_VIEW_PROPERTY(trackTintColor, UIColor)
36+
RCT_EXPORT_VIEW_PROPERTY(progressImage, UIImage)
37+
RCT_EXPORT_VIEW_PROPERTY(trackImage, UIImage)
38+
39+
@end

0 commit comments

Comments
 (0)