带有圆形底部边缘和项目的 SwiftUI 自定义导航栏
我已经在Stackoverflow上搜索了一个解决方案,但没有找到解决方案。
标题中描述的期望目标是:
我们所看到的所需颜色也是渐变。
我也想知道,每当我想显示它时,是否也可以在导航栏的右侧显示图像(有时我想显示一个图像,有时我没有)
我知道我必须使用Uikit才能创建类似的东西,但我还没有找到一个解决方案,可以使导航栏的底部边缘变为圆形。
I have searched all over stackoverflow for a solution but I haven't found one.
The desired goal as described in the title is this:
The desired color as we can see is also gradient.
I also wonder if it is possible to also display an image on the right side of the navigation bar whenever I wanted to show it ( sometimes i want to show an image and sometimes i dont)
I know that i have to use UIKIT in order to create something like this but i have not found a solution where i can make the bottom edges of the navigation bar rounded.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无需使用UIKIT,因为您可以使用Path Drawing使用Anative Swiftui来制作这样的视图,并保留注释以隐藏默认的导航视图标题,并查看和使用下面的代码,您也可以根据您的需求自定义
视图导航栏将就像该视图

no need to use UIKit in that you can use native SwiftUI using Path drawing to make a view like that and keep a note to hide the default navigation view title and view and use the code below you also can customize the view depending on your needs
and the navigation bar will be like that view
