我坚持这一件事
我尝试了每一件事
import UIKit
import AVFoundation
import SwiftUI
func buttonpressed(_ sender: Any) {
lightOn.toggle() {
if lighton {
view.backgroundcolor = .white
} else {
view.backgroundcolor = .black
}
}
var view = true
}
var lightOn = true;
var toggle = true