Webmaster4o
Mar 04, 2016 - 15:24
Is it possible to have a NavigationView with semi-transparent layers that move over a constant background? Maybe BlurViews as well.
Is it possible to have a NavigationView with semi-transparent layers that move over a constant background? Maybe BlurViews as well.
If you set the individual view alpha's before pushing them, whatever is under the NavView shows through. The bg_color of the NavView acts like a layer between the pushed view and the background, so leave it set to 0,0,0,0
# coding: utf-8
import ui
v=ui.ImageView(frame=(0,0,576,576))
v.image=ui.Image.named('test:Ruler')
v2=ui.ImageView(frame=v.bounds)
v2.image=ui.Image.named('test:Mandrill')
n=ui.NavigationView(v2)
n.frame=v.bounds
v3=ui.ImageView(frame=v.bounds)
v3.image=ui.Image.named('test:Lenna')
v2.alpha=0.5
v3.alpha=0.5
n.push_view(v3)
v.add_subview(n)
v.present('sheet')