2019-10-16 20:03:47 +03:00
|
|
|
/*
|
2018-09-12 01:27:47 +03:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2015-06-03 19:49:22 +03:00
|
|
|
*
|
2018-02-17 05:24:55 +03:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2015-06-03 19:49:22 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#import "RCTProgressViewManager.h"
|
|
|
|
|
|
|
|
#import "RCTConvert.h"
|
|
|
|
|
|
|
|
@implementation RCTConvert (RCTProgressViewManager)
|
|
|
|
|
2020-03-09 08:58:01 +03:00
|
|
|
RCT_ENUM_CONVERTER(
|
|
|
|
UIProgressViewStyle,
|
|
|
|
(@{
|
|
|
|
@"default" : @(UIProgressViewStyleDefault),
|
2016-09-27 16:19:45 +03:00
|
|
|
#if !TARGET_OS_TV
|
2020-03-09 08:58:01 +03:00
|
|
|
@"bar" : @(UIProgressViewStyleBar),
|
2016-09-27 16:19:45 +03:00
|
|
|
#endif
|
2020-03-09 08:58:01 +03:00
|
|
|
}),
|
|
|
|
UIProgressViewStyleDefault,
|
|
|
|
integerValue)
|
2015-06-03 19:49:22 +03:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation RCTProgressViewManager
|
|
|
|
|
|
|
|
RCT_EXPORT_MODULE()
|
|
|
|
|
|
|
|
- (UIView *)view
|
|
|
|
{
|
2015-08-17 17:35:34 +03:00
|
|
|
return [UIProgressView new];
|
2015-06-03 19:49:22 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
RCT_EXPORT_VIEW_PROPERTY(progressViewStyle, UIProgressViewStyle)
|
|
|
|
RCT_EXPORT_VIEW_PROPERTY(progress, float)
|
|
|
|
RCT_EXPORT_VIEW_PROPERTY(progressTintColor, UIColor)
|
|
|
|
RCT_EXPORT_VIEW_PROPERTY(trackTintColor, UIColor)
|
|
|
|
RCT_EXPORT_VIEW_PROPERTY(progressImage, UIImage)
|
|
|
|
RCT_EXPORT_VIEW_PROPERTY(trackImage, UIImage)
|
|
|
|
|
|
|
|
@end
|