How do I translate the following Objective-C code into Swift?
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
How do I translate the following Objective-C code into Swift?
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
{
The answer depends on whether you’re using Swift 2 or Swift 3. Fortunately, Xcode can help out here:
Go to your app delegate source file.
In the body of the app delegate class, enter
func receivelocal.Xcode’s autocomplete mechanism will show you the right method signature to use.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"