iOS - pushViewController 没有滑动背景图片 [英] iOS - pushViewController without sliding Background Image

查看:21
本文介绍了iOS - pushViewController 没有滑动背景图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于其中一个尴尬的要求而与 pushViewcontroller 混在一起:/

Messing around with pushViewcontroller due to one of the awkward requirement :/

所以有一个带有 1 个背景图像的 rootViewcontroller 和带有自定义单元格的 UITableView,还有一个具有类似背景图像和不同视图的 detailViewController.

So there is a rootViewcontroller with 1 Background Image and UITableView with custom cells and there is a detailViewController with similar backgruound image with different views.

要求是:

点击 UITableViewCell...整个导航动画不应该影响背景图像.背景图像应保持原样,所有其他视图应滑动.

On tap of UITableViewCell... the whole navigation animation should not affect the background image. Background Image should stay as it is and all other view should slide.

如何在不改变背景图像的情况下只滑动 UITableView 并显示详细信息屏幕?

How I can slide only UITableView and display detail screen without changing background image ?

一种可能的解决方案是添加 2 个子视图控制器并在两个子视图上应用幻灯片动画.但在那种情况下,我必须继续移除孩子.我无法移除孩子,因为点击自定义底部后退按钮我必须立即显示第一个屏幕.

There is one possible solution is just add 2 child view controller and apply slide animation on both child. But in that case I have to keep on removing the child. I can't remove child because on tap of custom bottom back button I have to display the 1st screen instantly.

任何其他可能的解决方案或改进?

Any other possible solution or improvement ?

推荐答案

您可以将 UINavigationController 包装在包含背景图像的自定义视图控制器中.然后确保您的内容视图以及推送控制器的视图具有清晰的背景.

You can wrap your UINavigationController in a custom view controller that contains the background image. Then make sure your content view, as well as the pushed controller's views have a clear background.

这篇关于iOS - pushViewController 没有滑动背景图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆