Interface Class Name | Description |
TAVEditor | SDK operation entry class. |
SDK gesture operation base class. |
Interface Name | Description |
Delegate to determine whether sticker and PIP touches should respond. | |
Delegate for sticker editing view operation responses. | |
Factory for creating custom widget editing views. |
Name | Description |
contentView:shouldTouchSticker: | Ask the delegate whether the sticker is allowed to respond to touch. |
contentView:ShouldTouchPipItem: | Ask the delegate whether the PIP is allowed to respond to touch. |
Name | Description |
stickerViewDidReachToEnd: | Notify delegate that sticker playback has ended. |
stickerView:shouldHideAtTime: | Ask the delegate whether the sticker should be hidden at the current time. |
stickerViewStartPanning: | Notify delegate that sticker started panning. |
stickerViewChangePanning: | Notify delegate that sticker is changing panning. |
stickerViewEndPanning: | Notify delegate that sticker ended panning. |
stickerViewOnDelete: | Notify delegate that sticker was deleted. |
stickerViewOnClicked: | Notify delegate that sticker was tapped. |
Name | Description |
pipView:shouldHideAtTime: | Ask the delegate whether the PIP should be hidden at the current time. |
pipViewStartPanning: | Notify delegate that PIP started panning. |
pipViewChangePanning: | Notify delegate that PIP is changing panning. |
pipViewEndPanning: | Notify delegate that PIP ended panning. |
pipViewOnDelete: | Notify delegate that PIP was deleted. |
pipViewOnClicked: | Notify delegate that PIP was tapped. |
Name | Description |
activeView | The currently active view. |
isNoFocusGestureEnabled | Set whether widgets can be dragged directly without selecting them first. |
registerDelegate: | Register delegate. |
unregisterDelegate: | Unregister delegate. |
filterStickerWithPoint: | Return all valid stickers at the tap location. |
filterPipItemWithPoint: | Return all valid PIP items (PipItem) at the tap location. |
// Inherit and extend TAVWidgetContentView@interface MYWidgetContentView : TAVWidgetContentView@property (nonatomic, weak) TAVEditor *editor;@end@implementation MYWidgetContentView- (instancetype)initWithFrame:(CGRect)frame{self = [super initWithFrame:frame];if (self) {[self setupUI];}return self;}- (void)setupUI {// Custom UI}@end
// Inherit and extend TAVStickerView@interface MyStickerView : TAVStickerView// Add an edit button@property (nonatomic, strong, readonly) UIButton *editButton;@end@implementation MyStickerView- (instancetype)initWithFrame:(CGRect)frame{self = [super initWithFrame:frame];if (self) {[self setupUI];}return self;}- (void)setupUI{_editButton = [UIButton buttonWithType:UIButtonTypeCustom];_editButton.imageView.contentMode = UIViewContentModeScaleAspectFit;[_editButton setImage:[UIImage imagedName:@"icon_pip_edit"] forState:UIControlStateNormal];[_editButton addTarget:self action:@selector(didClickEditItem) forControlEvents:UIControlEventTouchUpInside];[self addSubview:_editButton];}// Override interface to customize hiding buttons when dragging view- (void)handlePanRecognizer:(UIPanGestureRecognizer *)recognizer {[super handlePanRecognizer:recognizer];[self handleRecognizer:recognizer];}- (void)handleRecognizer:(UIGestureRecognizer *)recognizer {switch (recognizer.state) {case UIGestureRecognizerStateBegan:self.editButton.hidden = YES;break;case UIGestureRecognizerStateChanged:self.editButton.hidden = YES;break;case UIGestureRecognizerStateCancelled:case UIGestureRecognizerStateEnded:case UIGestureRecognizerStateFailed:{self.editButton.hidden = NO;break;}default:break;}}@end
フィードバック