search

Home  >  Q&A  >  body text

ios - 随scrollView滚动渐变透明度的导航栏,如何做到透明度可以不影响下一个页面的导航栏?

RT ,最近在做类似京东的导航栏颜色渐变效果
大致跟网上的做法差不多,是拿一张透明图当导航背景图,然后去设置一个view在navigationBar后面 再去设置view的背景色和透明度 最后设置监听scrollView滚动 一切顺利,可是点击跳转到下一个页面的时候我发现下个页面的导航栏是黑乎乎的一片的
说得可能不太清楚 我做了个demo 希望大神们有空帮忙看看
链接点这里

PHP中文网PHP中文网2889 days ago488

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2017-04-17 18:02:26

    I don’t know what you mean by “When jumping to the next page, I found that the navigation bar of the next page is dark.” I cloned your sample project and ran it, and everything seemed normal. Yes, the second and third page navigation bars are all fixed yellow, and there is no "dark patch".

    reply
    0
  • Cancelreply