Git Product home page Git Product logo

Comments (8)

yiplee avatar yiplee commented on June 7, 2024

能贴一下现在的效果图以及你想要的效果吗?我理解的是你想要 status bar 不透明是吧?

from ypnavigationbartransition.

internalG avatar internalG commented on June 7, 2024

对,导航栏透明而状态栏不透明。

from ypnavigationbartransition.

internalG avatar internalG commented on June 7, 2024

目前发现YPNavigationBarHidden时,view也会显示到statusbar里面,用示例应用就能重现,希望有选项保持statusbar始终保持原样。

from ypnavigationbartransition.

yiplee avatar yiplee commented on June 7, 2024

status bar 本来就是透明的,在有导航栏的时候它的底色就是底下导航栏的颜色。你打开 iOS 系统设置就能看到 status bar 下面也有毛玻璃效果。
导航栏 hidden 之后,view 肯定就会显示在 status bar 下面了。
如果你不想让 status bar 下面有透明效果,一是设置导航栏不透明,二是手动设置 status bar 的背景颜色

var statusBarView = UIApplication.SharedApplication.ValueForKey(new NSString("statusBar")) as UIView;
statusBarView.BackgroundColor = UIColor.Green;

但是 status bar 是全局的,所以你要自己维护它的状态。

from ypnavigationbartransition.

internalG avatar internalG commented on June 7, 2024

按理说去掉controller的under top bar设置也可以,可是好像不行。另外发现push到UIPageViewController里面时后退手势失效了,可能是什么原因?

from ypnavigationbartransition.

internalG avatar internalG commented on June 7, 2024

@implementation YPDemoContainerViewController

  • (void)viewDidLoad {
    [super viewDidLoad];

// self.extendedLayoutIncludesOpaqueBars = YES;
self.edgesForExtendedLayout = UIRectEdgeBottom;

改成上面这段代码就无法做到透明了,是不支持edgesForExtendedLayout属性?

from ypnavigationbartransition.

yiplee avatar yiplee commented on June 7, 2024

extendedLayoutIncludesOpaqueBars 是让 controller 的 view frame top 和 navigation bar 的 top 对齐的;edgesForExtendedLayout 改成 UIRectEdgeBottom 之后,controller view 的 frame 都变了。

push 到 UIPageViewController 后左滑失效应该是 UIPageViewController 的左右滑手势优先响应了滑动操作,可以看看 UIGestureRecognizer- (void)requireGestureRecognizerToFail:(UIGestureRecognizer *)otherGestureRecognizer

from ypnavigationbartransition.

yiplee avatar yiplee commented on June 7, 2024

这个我先关了,还有问题可以新开 issue。

from ypnavigationbartransition.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.