配置:
蒸气 4 | 更新测试版和软件包 | macOS Catalina v.10.15.3 | XCode 11.4 测试版 2 | 引导 CDN 4.4.1
我无法切换导航栏按钮。我不确定这是否是 Leaf 中的错误。我已经按照正确的顺序实现了 Bootstrap 和 CSS。尝试运行此代码。不要忘记将浏览器窗口的大小调整为移动或平板电脑视图以显示导航栏切换按钮。这是我的叶子代码:
// 基.叶
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- <link rel="stylesheet" href="/styles/bootstrap.min.css"/>-->
<link rel="stylesheet" href="/fonts/fa/css/all.min.css"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="/styles/main.css"/>
<link rel="stylesheet" href="/styles/header.css"/>
<link rel="stylesheet" href="/styles/footer.css"/>
<title>#(metaContent.title)</title>
<meta name="description" content="#(metaContent.description)"/>
</head>
<body>
<header>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<a class="navbar-brand" href="#">Carousel</a>
<button …Run Code Online (Sandbox Code Playgroud) 我无法对
!Bindable$对象使用逻辑非运算符。
这是我想要的场景 -
struct ContentView: View {
@State private var isLoggedIn:Bool = true
var body: some View {
Text("Root View")
.sheet(isPresented: !self.$isLoggedIn) {
SignInView()
}
.onAppear { self.performAuthentication() }
}
}
Run Code Online (Sandbox Code Playgroud)
isLoggedIn = false当我通过某些按钮操作进行设置时,登录视图应该立即显示。为此我必须先使用逻辑非运算符$。
编译器错误:无法将“Binding”类型的值转换为预期的参数类型“Bool”
我怎样才能实现这个目标?