ios - 快速更改弹出视图控制器cornerRadius
问题描述
我正在尝试更改 popUPViewController 的cornerRadius 但不更改如何更改?同时我还有另一个疑问是否可以更改cornerRadius?
解决方案
您的问题似乎太宽泛,无法提供具体答案。我试图帮助假设您的需求是:
如果您将新的 iOS 13 演示样式称为“popUPViewController”,则不能更改它的角半径
但是,您可以编写自己的自定义过渡添加您的触摸。这是一个开始的好地方。
是的,您可以轻松更改视图的角半径:
yourView.layer.cornerRadius = 10 //Whatever radius you'd want
yourView.layer.masksToBounds = true //This line is important. Doing this will restrain yourView's layer and sublayers to the cornered mask
您还可以另外指定角以应用半径:
yourView.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] //This will round the top-left and top-right corners
推荐阅读
- c# - 实现fire and forget异步方法调用的正确方法
- sql-server - SQL Server:如何在一定时间间隔后自动更新表中的数据
- javascript - 从特定的动态值启动 javascript 秒表
- android - Android 使用 NotificationListenerService 执行通知操作
- asp.net-mvc - 找不到路径“”的控制器或未实现 IController。错误
- python - import QCustomPlot2 ImportError: DLL load failed: 找不到指定的过程
- python - django:在添加新照片时删除以前的照片
- javascript - 在 Django 中使用 Javascript 中的模板标签
- html - 可以在过渡反转时禁用/更改 CSS 的过渡延迟吗?
- .net-core - F# 项目中有关服务器 GC 的警告