Native DatePicker in iOS -VerknüpfungenIOS

Programmierung für iOS
Anonymous
 Native DatePicker in iOS -Verknüpfungen

Post by Anonymous »

Ich möchte einen nativen DatePicker für ein Feld in meiner App -Verknüpfung (iOS 18) anzeigen, wie es andere Apps tun (siehe Screenshot). Was auch immer ich tue, es ist ein einfaches Textfeld. Ich habe meinen Build -Ordner aufgeräumt und meine App neu installiert, aber nichts funktioniert. < /P>

Code: Select all

struct CreateRecordIntent: AppIntent {
static var name: String = "createRecordShortcut"
static var title: LocalizedStringResource = "Record.Create"
static var description: IntentDescription = "Record.Create.Description"
static var openAppWhenRun: Bool = true

@Parameter(
title: "DateAndTime",
default: Date()
)
var date: Date

func perform() async throws -> some IntentResult {
var userInfo: [AnyHashable: Any] = [:]

NotificationCenter.default.post(name: .createRecordShortcut, object: nil, userInfo: userInfo.isEmpty ? nil : userInfo)
return .result()
}
}
DatePicker des Erstellungsdatums einer Apple -Erinnerung in Abkürzungen:

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post