swiftui_SwiftUI中的模糊效果

本文介绍了如何在SwiftUI中实现模糊效果和振动效果,通过深入探讨SwiftUI的视觉层,展示了创建这些效果的详细步骤。
摘要由CSDN通过智能技术生成

swiftui

If you’ve been around smart phones long enough, you may remeber iOS 7. It was a huge update to the iPhone, bringing in not only a tone of new features and functionality, but also a fresh new design. This update to iOS was nothing less than a full-fledged overhaul of the operating system’s look and feel.

如果您使用智能手机的时间已经足够长了,您可能会考虑使用iOS7。这是对iPhone的巨大更新,不仅带来了新功能和新功能,而且还带来了全新的设计。 对iOS的此次更新无非是对操作系统外观的全面革新。

One of the more interesting changes was the presence of semi-translucent toolbars and backgrounds like Control Center. That effect of “blurred” sort of “frosted-glass” background which is just transparent enough to be able to tell that there is something behind it. It’s so nice to look at 😍

最有趣的更改之一是半透明的工具栏和诸如Control Center的背景。 这种“模糊的”“磨砂玻璃”背景的效果是足够透明的,足以分辨出背后有东西。 看😍真好

These days there is a very straightforward way to achieve the blur effect by means of UIVisualEffectView.

UIVisualEffectView有一种非常简单的方法可以通过UIVisualEffectView实现模糊效果。

You can tell right away that this comes from UIKit which means there are probably a few tweaks needed in order to use it in SwiftUI.

您可以马上说出它来自UIKit ,这意味着可能需要一些调整才能在SwiftUI中使用它。

Let’s get started!

让我们开始吧!

创建BlurView (Creating the BlurView)

When we need UIK

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值