ios - 如何使用 Xcode/Swift 创建横跨屏幕的横幅图像?

标签 ios xcode swift uiimage banner

如何创建一个横幅(例如,在 UITableView 或其他东西上方)在给定时间后或在滑动时切换图像。然后它会在一定数量的图像后循环使用。请参阅下面提供的来自 IF 应用程序的示例)。

此外,我不一定要在这里寻找代码,而只是我用来实现它的 Xcode 的一般功能(即 ContainerView 中的 UIImageView使用手势识别器或其他东西)。有什么想法吗?

这是第一张图片: First Image

然后开始过渡: Begin Transition

然后第二张图片就位: Final Image

最佳答案

This是如何使用 UIPageViewController 获得准确行为的示例。来自documenation :

A page view controller lets the user navigate between pages of content, where each page is managed by its own view controller object. Navigation can be controlled programmatically by your app or directly by the user using gestures. When navigating from page to page, the page view controller uses the transition that you specify to animate the change.

关于ios - 如何使用 Xcode/Swift 创建横跨屏幕的横幅图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35948032/

相关文章:

ios - 从任何 URL 获取特定图像,就像 Facebook 那样

ios - 在 UIScrollView 中自动调整 UITextView 的大小

ios - snapchat 是如何实现设置下拉菜单的?

swift - 如何在 Swift 中检测横向方向并将其应用于 AVCaptureVideoPreviewLayer?

ios - 有时 mac 键盘不起作用我必须从模拟器键盘输入

ios - 如何从特定的 TabbarController 启动应用程序

ios - Bootstrap 字体似乎在 Safari iOS 上被条纹化

iphone - 在 iOS 中解析 PLIST

ios - 如何通过 UIView 引用获取设备方向?

ios - 编辑 plist 中的现有数据