def demo_BlurView():
a = ui.View(frame=(0, 0, 500, 500))
a.add_subview(ui.ImageView(frame=(0, 0, 500, 500)))
a.subviews[0].image = ui.Image.named('test:Peppers')
a.add_subview(ui2.BlurView())
a.subviews[1].frame = (100, 100, 100, 100)
a.present('sheet', hide_title_bar=True)
toggle = ui2.Animation(a.subviews[1].toggle_brightness, 0.5)
def movea():
a.subviews[1].x = 300
def moveb():
a.subviews[1].y = 300
def movec():
a.subviews[1].x = 100
def moved():
a.subviews[1].y = 100
movea = ui2.Animation(movea, 1)
moveb = ui2.Animation(moveb, 1)
movec = ui2.Animation(movec, 1)
moved = ui2.Animation(moved, 1)
ui2.ChainedAnimation(movea, moveb, movec, moved, toggle,
movea, moveb, movec, moved).play()
评论列表
文章目录