import SwiftUI
struct ContentView: View {
@State private var username: String = ""
var pass: String = "hello"
var body: some View {
VStack {
TextField("Hi", text: $username)
Image(systemName: "globe")
.imageScale(.large)
.foregroundColor(.accentColor)
Text(pass)
}
}
}why isn’t markdwon automatically implemented here? It’s just a simple query to help me understand how it works :) help is greatly appreciated. PS: when i pass a string directly like Text(hello) then markdown is implemented and the text is made bold. …
Post
Replies
Boosts
Views
Activity
I have made a Scan to Text app with the help of sources from the internet, but I can’t figure out a way to get my output text to be editable. Here’s my code
private func makeScannerView()-> ScannerView {
ScannerView(completion: {
textPerPage in
if let outputText = textPerPage?.joined(separator: "\n").trimmingCharacters(in: .whitespacesAndNewlines){
let newScanData = ScanData(content: outputText)
self.texts.append(newScanData)
}
self.showScannerSheet = false
})
}
Im getting the errror on the line where it says @Environment. The error is highliting the exportFiles part on that line. Any ideas anyone? A fix will be highly appreciated
Thanks in advance
import PlaygroundSupport
struct ContentView: View {
@Environment(\.exportFiles) var exportAction
var body: some View {
Button("Export Your file") {
let url = Bundle.main.url(forResource: "symbols",
withExtension: "json")!
exportAction(moving: url) {result in
switch result {
case .success(let url):
print("Success! Moved to: /url")
}
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
PlaygroundPage.current.setLiveView(ContentView())
Hi. I’m currently running iPadOS 14 developer beta 3 and I was using a Pixel Adonit stylus on my IPad Air 2, and I wanted to know how to use Scribble with that stylus in Notes. My iPad doesn’t support Apple Pencil. How can I do it? Thanks I’m adavanve