- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在使用自定义 UIPresentationController 子类来管理 UIViewController 的呈现。我正在覆盖 - (CGRect)frameOfPresentedViewInContainerView
以提供从 containerView 的边界插入的框架。
现在,在对 presentedViewController 进行一些用户操作后,我想更改 presentedViewController 的框架。我的问题是:是否有一种“自然”的方式来做到这一点??
如何在 presentedViewController 呈现后调整它的框架?
最佳答案
所以我采取的方法是执行以下操作:
我添加了从 <UIContentContainer>
中实现的以下方法:
- (void)preferredContentSizeDidChangeForChildContentContainer:(id <UIContentContainer>)container
然后我简单地更新了我的 presentedViewController 上的 preferredContentSize,得到了回调,并在 UIPresentationController 中动画了帧更新。
关于ios - UIPresentationController——我可以在呈现后更新呈现的 View Controller 的框架吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35547601/
我在应用商店中有一个应用程序,并且有一份崩溃报告显示偶尔会发生崩溃,详细信息如下: Incident Identifier: C25BD8DF-FAA9-4A5F-B3D2-6E1CE81F1D17
在 iOS 13 中,关闭 View Controller 时不会调用 viewWillAppear。作为一种解决方法,提到要重写 UIAdaptivePresentationControllerDe
我正在尝试做一个从底部向上滑动到特定高度的自定义通知 View 。我使用的是 UIPresentationController 但问题是当显示第二个 VC 时未检测到显示 VC 的 ViewContr
这就是我呈现自定义 UIPresentationController 的方式: func presentOverlayController(controller: UIViewController)
所以我有一个非常基本的 UIPresentationController,它基本上以屏幕为中心显示 contentView,它的大小由 View Controller preferredContent
我正在自定义一个 UIPresentationController 以将演示文稿模拟为 iOS 原生 .OverCurrentContext 或 .CurrentContext。 我发现无论我覆盖什么
截图: 我遇到了很多这样的崩溃,但问题是我只是被指向我的 appDelegate 第一行。我不知道在哪里寻找问题。我可以从以下崩溃报告开始调查的任何想法? Crashed: com.apple.mai
我的 View Controller 正在转向基于 UIPresentationController 的演示,但在使用 API 时遇到了一些困惑。 我有一个自定义侧边栏样式 View Controll
我有一个用于呈现 View Controller 的自定义转换,并使用 UIPresentationController 子类来执行呈现。 在演示 Controller 中,我向其 container
对于某些情况,我建议阅读以下内容: 非常相关的问题:"From View Controller" disappears using UIViewControllerContextTransitioni
iOS 13 似乎使用了一个新的 UIPresentationController 来呈现模态视图 Controller ,但它不依赖于拍摄呈现 View Controller 的快照(正如大多数/所
我正在使用 UIPresentationController 来显示自定义模式。演示 Controller 有一个 UIView 调光 View ,在显示时动画进出。模式本身是一个添加到展示 Cont
我正在使用 UIPresentationController,但我不知道如何让它以我想要的方式显示。 我正在编辑 frameOfPresentedViewInContainerView() 函数,我需
我使用 UIPresentationController 来显示我的向上滑动菜单,我的应用程序中还有标签栏菜单。我的向上滑动菜单显示在我的标签栏上方,但我希望它显示在我的标签栏上方? 所以现在它的行为
UIPresentationController 与仅使用添加 subview 和动画化您想要呈现的 View 相比有什么好处?它必须遵守的所有协议(protocol)似乎有点麻烦,许多人仍然喜欢用简
我使用 UIPresentationController 的子类在屏幕上显示一些 controller。我是这样准备的: controller.transitioningDelegate = self
我有一个自定义 UIPresentationController 并覆盖 frameOfPresentedViewInContainerView 用于自定义 viewController 演示。一切正
我有一个在通用 iOS 应用程序中呈现的 View Controller 。在 iPhone 上,它使用自定义 UIPresentationController 显示,该 Controller 使用
我正在使用自定义 UIPresentationController 子类来管理 UIViewController 的呈现。我正在覆盖 - (CGRect)frameOfPresentedViewInC
我正在使用自定义演示 Controller 制作类似于 UIAlertView 的内容。我希望它在键盘显示时向上移动。在 UIKeyboardWillShowNotification 处理程序中,我获
我是一名优秀的程序员,十分优秀!