This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| struct NumbersCollectionView : UIViewRepresentable { | |
| @Binding var numbers: [Int] | |
| func makeUIView(context: Context) -> UICollectionView { | |
| let layout = UICollectionViewFlowLayout() | |
| let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout) | |
| collectionView.backgroundColor = .white | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Person: NSObject { | |
| @objc let name: String | |
| @objc let age: Int | |
| @objc let nicknames: [String] | |
| init(name: String, age: Int, nicknames: [String]) { | |
| self.name = name | |
| self.age = age | |
| self.nicknames = nicknames | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -v \ | |
| -d '{"aps": {"content-available": 1}, "del-id": "1234"}' \ | |
| -H "apns-topic: <YOUR APP BUNDLE ID>" \ | |
| --http2 \ | |
| --cert <PATH TO YOUR CERTIFICATE IN PEM FORMAT> \https://api.development.push.apple.com/3/device/<DEVICE TOKEN> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -v \ | |
| -d '{"aps": {"alert": "This notification will be removed"}}' \ | |
| -H "apns-topic: <YOUR APP BUNDLE ID>" \ | |
| -H "apns-collapse-id: 1234" \ | |
| --http2 \ | |
| --cert <PATH TO YOUR CERTIFICATE IN PEM FORMAT> \https://api.development.push.apple.com/3/device/<DEVICE TOKEN> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| import UserNotifications | |
| @UIApplicationMain | |
| class AppDelegate: UIResponder, UIApplicationDelegate { | |
| var window: UIWindow? | |
| func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
| application.registerForRemoteNotifications() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| final class KeyframeAnimator { | |
| private struct AnimationsData { | |
| let animations: Animations | |
| let relativeTimeStart: Double | |
| let relativeDuration: Double | |
| } |