session-ios/Session/Shared/OWSBezierPathView.h

29 lines
850 B
C
Raw Normal View History

2017-05-16 17:26:01 +02:00
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import <UIKit/UIKit.h>
2017-06-13 16:42:35 +02:00
typedef void (^ConfigureShapeLayerBlock)(CAShapeLayer *_Nonnull layer, CGRect bounds);
2017-05-16 17:26:01 +02:00
NS_ASSUME_NONNULL_BEGIN
2017-05-16 17:26:01 +02:00
@interface OWSBezierPathView : UIView
// Configure the view with this method if it uses a single Bezier path.
@property (nonatomic) ConfigureShapeLayerBlock configureShapeLayerBlock;
2017-05-16 17:26:01 +02:00
// Configure the view with this method if it uses multiple Bezier paths.
//
// Paths will be rendered in back-to-front order.
@property (nonatomic) NSArray<ConfigureShapeLayerBlock> *configureShapeLayerBlocks;
2017-05-16 17:26:01 +02:00
// This method forces the view to reconstruct its layer content. It shouldn't
// be necessary to call this unless the ConfigureShapeLayerBlocks depend on external
// state which has changed.
- (void)updateLayers;
@end
NS_ASSUME_NONNULL_END