-
Notifications
You must be signed in to change notification settings - Fork 479
水印视图
changsanjiang edited this page Oct 22, 2020
·
5 revisions
- 导入头文件
#import <SJBaseVideoPlayer/SJWatermarkView.h>
- 设置水印视图
UIImage *watermark = [UIImage imageNamed:@"watermark"];
SJWatermarkView *watermarkView = [SJWatermarkView.alloc initWithImage:watermark];
_player.watermarkView = watermarkView;
设置完毕后, 水印视图将在播放器准备好播放时显示.
- 如何修改水印视图的位置?
// 修改为右下角
watermarkView.layoutPosition = SJWatermarkLayoutPositionBottomRight;
// 修改后更新布局
[self.player updateWatermarkViewLayout];
- 如何修改水印视图的高度?
// 修改高度
watermarkView.layoutHeight = 80;
// 修改后更新布局
[self.player updateWatermarkViewLayout];