Skip to content

Commit

Permalink
21.开启个人热点
Browse files Browse the repository at this point in the history
  • Loading branch information
xianengqi committed Dec 24, 2024
1 parent 2c43cc6 commit 8f24a38
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Binary file not shown.
16 changes: 16 additions & 0 deletions demo-esp32/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,22 @@ struct ContentView: View {

private var wifiConfigForm: some View {
VStack(spacing: 20) {
Button(action: {
if let url = URL(string: "App-Prefs:root=PERSONAL_HOTSPOT") {
UIApplication.shared.open(url)
}
}) {
HStack {
Image(systemName: "personalhotspot")
Text("开启个人热点")
}
.frame(maxWidth: .infinity)
.padding()
.background(Color.orange)
.foregroundColor(.white)
.cornerRadius(8)
}

Button(action: {
viewModel.scanWiFi()
}) {
Expand Down

0 comments on commit 8f24a38

Please sign in to comment.