当前位置:   article > 正文

ios开发仿写微信视频聊天界面_ios 微信视频播放ui

ios 微信视频播放ui

自己开发时需求要求,就自己开发了一个,个人思路:

1、创建View放在window上

self = [super initWithFrame:CGRectMake(0,  SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT)];
    self.backgroundColor = [UIColor purpleColor];
    id <UIApplicationDelegate> delegate = [[UIApplication sharedApplication] delegate];
    if ([delegate respondsToSelector:@selector(window)])
    {
        self.window = [delegate performSelector:@selector(window)];
    }
    else
    {
        self.window = [[UIApplication sharedApplication] keyWindow];
    }
    [self.window addSubview:self];
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

2、添加拖拽和显示手势

 UIPanGestureRecognizer *gesture = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(panGestureRecognizer:)];
    gesture.delegate = self;
    [self addGestureRecognizer:gesture];
    UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapGestureRecognizer:)];
    [self addGestureRecognizer:tapGesture];
    [UIView setAnim
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/652263
推荐阅读
相关标签
  

闽ICP备14008679号