Post

Replies

Boosts

Views

Activity

Reply to SwiftUI 【After writing a good run, the final simulator program only shows Goodone. Swift, a single module. The ContentView.swift content cannot be displayed. Unable to use the program properly. Need help】
I wrote a separate agent module and it works fine. The combination is normal. It's normal in Xcode. Run the program to the simulator, or the real machine. There is only one agent module. The entire program cannot be displayed.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’21
Reply to Create user notification issues using Swift UI
import UIKit import CoreData @UIApplicationMain class AppDelegate: UIResponder,UIApplicationDelegate{     func application(_ application:UIApplication,didFinishLaunchingWithOptions launchOptions:[UIApplication.LaunchOptionsKey:Any]?)-Bool{          //Cannot convert return expression of type 'Void' to return type 'Bool'         UNUserNotificationCenter.current().requestAuthorization(options: [.alert,.sound,.badge]){(granted,error)in             if granted{                 print("User notifications are allowed.")                              }else{                 print("User notifications are not allowed.")             }                      }              } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’21