Post

Replies

Boosts

Views

Activity

Reply to How to scroll UICollectionView cell automatically according to the time of day
Here my code for the Local Notification : let center = UNUserNotificationCenter.current()         let content = UNMutableNotificationContent()         content.title = NSString.localizedUserNotificationString(forKey: "New Notif", arguments: nil)         content.body = NSString.localizedUserNotificationString(forKey: "empty", arguments: nil)         content.badge = 1         var date = DateComponents()         date.hour = 8         date.minute = 00         date.timeZone = TimeZone.current         let trigger = UNCalendarNotificationTrigger(dateMatching: date, repeats: true)         let uuidString = UUID().uuidString         let request = UNNotificationRequest(identifier: uuidString, content: content, trigger: trigger)         center.add(request) { (error) in             if error != nil {                 print("Error \(String(describing: error?.localizedDescription))")             } else {                 print("✅ ✅ ✅ Send !")             }         } `
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Reply to How to limit my numbers in Swift
| What in your code represents health points? lives represents health points | Where is the code that your character loses health points? attack function is the code that my characters can loses health points | Where is the code that your character gains health points? heal function is the code that my characters can gains health points
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’21