当前位置: 首页 > wzjs >正文

那些小网站是哪里人做的wordpress心得体会

那些小网站是哪里人做的,wordpress心得体会,海南公司注册网站,wordpress分类信息接上文 Flutter PIP 插件 ---- 新增PipActivity,Android 11以下支持自动进入PIP Mode 项目地址 PIP, pub.dev也已经同步发布 pip 0.0.3,你的加星和点赞,将是我继续改进最大的动力 在之前的界面设计中,还原动画等体验一…

接上文 Flutter PIP 插件 ---- 新增PipActivity,Android 11以下支持自动进入PIP Mode

项目地址 PIP, pub.dev也已经同步发布 pip 0.0.3,你的加星和点赞,将是我继续改进最大的动力

在之前的界面设计中,还原动画等体验一直不太好,遂优化一下,现在体验效果看起来更好了,
唯一一个还没搞定的是应用内还原的动画,应用内还原的时候,有一个从小到达逐渐拉伸的效果,猜测可能是和图片的渲染有关?有大佬能指点一二不?
请添加图片描述

不再获取PipViewController

前面也讲到这个比较危险,虽然多方求证似乎也没什么,但还是怕,所以改成查找PipWindow,并在pictureInPictureControllerDidStartPictureInPicture通知中把自渲染View添加到rootView中去

- (void)pictureInPictureControllerDidStartPictureInPicture:(AVPictureInPictureController *)pictureInPictureController {PIP_LOG(@"pictureInPictureControllerDidStartPictureInPicture");#if USE_PIP_VIEW_CONTROLLER// if you use the pipViewController, you must call this every time to bring// the content view to the front, otherwise the content view will not be// visible and covered by the pip host view.if (_pipViewController) {[_pipViewController.view bringSubviewToFront:_contentView];}
#else// TODO @sylar: check if this is the best way to do this, what will happen if// we have multiple windows? what if the root view controller is not a// UIViewController?UIWindow *window = [[UIApplication sharedApplication] windows].firstObject;if (window) {UIViewController *rootViewController = window.rootViewController;UIView *superview = rootViewController.view.superview;[self insertContentViewIfNeeded:superview];} else {PIP_LOG(@"pictureInPictureControllerDidStartPictureInPicture: window is nil");[_pipStateDelegate pipStateChanged:PipStateFailederror:@"Can not find the pip window"];return;}
#endif_isPipActived = YES;[_pipStateDelegate pipStateChanged:PipStateStarted error:nil];
}

遗留项是,这个查找PipWindow的方法靠不靠谱?有其他方法但是看起来也不靠谱

不再每次都将自渲染UIView从PipWindow移除

观察到一个现象是,如果是依赖PipViewController在 pictureInPictureControllerWillStartPictureInPicture 中添加UIView,还必须得在 pictureInPictureControllerDidStartPictureInPicture 中调用一次 bringSubviewToFront,否则的话你会比系统自动添加的View早添加,导致你的层级在下面;改用通过获取PipWindow方式后,就不用在bringSubviewToFront,因为不是一个parent了。
在这里插入图片描述
另外一些场景下可能会创建一个悬空的UIView用来做渲染,这样的话我们就没必要每次都把他从PipWindow上移除还原到父parent上,可以在PipWindow显示的一瞬间就立即看到渲染的内容

- (void)pictureInPictureControllerDidStopPictureInPicture:(AVPictureInPictureController *)pictureInPictureController {PIP_LOG(@"pictureInPictureControllerDidStopPictureInPicture");// restore the content view in// pictureInPictureControllerDidStopPictureInPicture will have the best user// experience.[self restoreContentViewIfNeeded];_isPipActived = NO;[_pipStateDelegate pipStateChanged:PipStateStopped error:nil];
}- (void)restoreContentViewIfNeeded {if (_contentView == nil) {PIP_LOG(@"restoreContentViewIfNeeded: contentView is nil");return;}// do not restore the content view if the original parent view is nil or// the content view is already in the original parent view.// keep the content view in the pip view controller will make the user// experience better, the pip content view will be visible immediately.if (_contentViewOriginalParentView == nil ||[_contentViewOriginalParentView.subviews containsObject:_contentView]) {PIP_LOG(@"restoreContentViewIfNeeded: _contentViewOriginalParentView is nil or "@"contentView is already in the original parent view");return;}[_contentView removeFromSuperview];PIP_LOG(@"restoreContentViewIfNeeded: contentView is removed from the original "@"parent view");if (_contentViewOriginalParentView != nil) {// in case that the subviews of _contentViewOriginalParentView has been// changed, we need to get the real index of the content view.NSUInteger trueIndex = MIN(_contentViewOriginalParentView.subviews.count,_contentViewOriginalIndex);[_contentViewOriginalParentView insertSubview:_contentViewatIndex:trueIndex];PIP_LOG(@"restoreContentViewIfNeeded: contentView is added to the original "@"parent view "@"at index: %lu",trueIndex);// restore the original frame_contentView.frame = _contentViewOriginalFrame;// restore the original constraints[_contentView removeConstraints:_contentView.constraints.copy];[_contentView addConstraints:_contentViewOriginalConstraints];// restore the original translatesAutoresizingMaskIntoConstraints_contentView.translatesAutoresizingMaskIntoConstraints =_contentViewOriginalTranslatesAutoresizingMaskIntoConstraints;// restore the original parent view[_contentViewOriginalParentViewremoveConstraints:_contentViewOriginalParentView.constraints.copy];[_contentViewOriginalParentViewaddConstraints:_contentViewOriginalParentViewConstraints];}
}

支持动态设置PipWindow窗口大小

这个没什么好说的,修改创建contentSource的时候的sampleBufferDisplayer的大小就可以动态修改PipWindow窗口大小,判断各种对象都已经有了的话就只修改大小而不用重新创建controller就行了

if (options.preferredContentSize.width > 0 &&options.preferredContentSize.height > 0) {[_pipViewupdateFrameSize:CGSizeMake(options.preferredContentSize.width,options.preferredContentSize.height)];
}

重要的事情说三遍

项目地址 PIP, pub.dev也已经同步发布 pip 0.0.3,你的加星和点赞,将是我继续改进最大的动力

项目地址 PIP, pub.dev也已经同步发布 pip 0.0.3,你的加星和点赞,将是我继续改进最大的动力

项目地址 PIP, pub.dev也已经同步发布 pip 0.0.3,你的加星和点赞,将是我继续改进最大的动力


文章转载自:

http://xO7syLfv.fswmL.cn
http://dmGHUbMC.fswmL.cn
http://LzNCiQ3A.fswmL.cn
http://diXDpHwW.fswmL.cn
http://lLUh1h4M.fswmL.cn
http://96p5JrME.fswmL.cn
http://kae51nx6.fswmL.cn
http://9vnoqWY3.fswmL.cn
http://qc2ClAgW.fswmL.cn
http://6EoWmudN.fswmL.cn
http://F12Da1T9.fswmL.cn
http://rwEcms05.fswmL.cn
http://T43gufRE.fswmL.cn
http://El3Vs7uW.fswmL.cn
http://CInJgAkM.fswmL.cn
http://fX6bB2oW.fswmL.cn
http://tzSF2AGE.fswmL.cn
http://QkQeVfRK.fswmL.cn
http://vONuLlkf.fswmL.cn
http://t9h0OsHO.fswmL.cn
http://627CkCTo.fswmL.cn
http://LmQfP4uD.fswmL.cn
http://TMXI8Dwr.fswmL.cn
http://8CZYzE7B.fswmL.cn
http://RDJ2jAkH.fswmL.cn
http://0kE6jFUP.fswmL.cn
http://NyLbeRB7.fswmL.cn
http://VduQLsbL.fswmL.cn
http://saKQFG7j.fswmL.cn
http://YJsobkNe.fswmL.cn
http://www.dtcms.com/wzjs/764081.html

相关文章:

  • 家居企业网站建设流程公司广告百度推广
  • 网站访问速度慢的原因宁德网站建设公司
  • 内蒙古建设协会网站个人做网站如何赚钱吗
  • 企业官方网站怎么写烟台网站建设技术托管
  • 免费国外建站h5开发工具哪个好
  • 如何在对方网站上做外链提供网站制作公司哪家专业
  • 新房地产网站开发html页面 wordpress
  • 什么网站可以做兼职WordPress会员注册管理
  • 南京网站制作做网站用那一种语言最好
  • 外贸网站搭建推广怎么在本地安装wordpress
  • 外贸网站建设是什么黄江镇网站建设
  • 主机屋做网站视频wordpress 页尾修改
  • 石景山网站seo优化排名wordpress微信群二维码
  • 公司企业网站怎么建设c .net网站开发实例
  • 外贸企业网站推广方案在那个网站做推广实用
  • 东莞 网站推广收费网站怎么建立
  • 诸城网站建设多少钱正规的镇江网站建设
  • 企业网站搭建项目概述范文宜宾网站建设公司
  • 安徽建设厅考勤网站wordpress time
  • 阿里云服务器上传网站国外炫酷网站设计
  • 东莞百度网站优化郑州网站建设国奥大厦
  • 博罗网站制作公司在线教育网站流量是怎样做的
  • 自己用自己电脑做网站空间河北建筑工程学院招生信息网
  • 肯德基网站建设的目标昆明手机网站推荐
  • 网站建设合同 附件域名领域
  • 网站建设 盘网互联一二三四免费观看视频中文版在线
  • 长沙企业建站系统免费创建手机网站
  • 旅游网站建设推广关于咖啡厅网站建设的论文
  • 烟台做网站找哪家好中国电子商务网站建设
  • 网站创建快捷方式网页制作大作业