mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
51990014eb
Summary: Second attempt at adding border properties to `RCTImageView`. Previous attempt can be found at D14875673 which was reverted. 1. `UIImageView` is no longer laid out in in `layoutSubviews`. 2. `updateWithImage` was not being called, I instead of calling `self.image = image` I was calling `_imageView.image = image` directly which skips calling `updateWithImage`. This meant that image's rendering mode was not changed to `template`. Reviewed By: shergin Differential Revision: D14934103 fbshipit-source-id: b74c692f9f8ad520ef1f9c70ec4b4aa68b868cd4
27 lines
783 B
Objective-C
27 lines
783 B
Objective-C
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <UIKit/UIKit.h>
|
|
#import <React/RCTView.h>
|
|
#import <React/RCTResizeMode.h>
|
|
|
|
@class RCTBridge;
|
|
@class RCTImageSource;
|
|
|
|
@interface RCTImageView : RCTView
|
|
|
|
- (instancetype)initWithBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
|
|
|
|
@property (nonatomic, assign) UIEdgeInsets capInsets;
|
|
@property (nonatomic, strong) UIImage *defaultImage;
|
|
@property (nonatomic, assign) UIImageRenderingMode renderingMode;
|
|
@property (nonatomic, copy) NSArray<RCTImageSource *> *imageSources;
|
|
@property (nonatomic, assign) CGFloat blurRadius;
|
|
@property (nonatomic, assign) RCTResizeMode resizeMode;
|
|
|
|
@end
|