Created
January 3, 2015 04:23
-
-
Save toddkramer/76d50496a937e979043a to your computer and use it in GitHub Desktop.
ExtensionDataSharing01-ViewController.swift
This file contains 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 | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
saveUserDefaults() | |
} | |
func saveUserDefaults() { | |
let sharedDefaults = NSUserDefaults(suiteName: "group.example.DataSharing") | |
sharedDefaults?.setObject("CS Books Extension", forKey: "ExtensionTitleKey") | |
sharedDefaults?.synchronize() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment