【问题标题】:How show view overlay another view and change view size显示视图如何覆盖另一个视图并更改视图大小
【发布时间】:2017-11-04 17:28:43
【问题描述】:

如何完成以下任务?

说明:

我想在主视图上显示集合视图。收藏视图必须显示在半屏上,并通过手势(拖动或滑动)将大小更改为全屏。

请帮助我。我怎样才能做到这一点?

【问题讨论】:

    标签: ios swift uiviewcontroller swift3 modalviewcontroller


    【解决方案1】:

    我想。我必须使用 modalPresentationStyle 和 transitioningDelegate。

    对于半屏用户 UIView.animate 使用 CGRect(x: 0, y: containerView!.bounds.height / 2, width: containerView!.bounds.width, height: containerView!.bounds.height / 2)

    【讨论】:

      猜你喜欢
      • 2021-09-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多