앱을 홈버튼을 눌러 끄고 다시 실행 시키면 다시 작업중이던 작업이 그대로 뜨게 해주는 설정입니다. 아래 처럼 ID를 설정해주고 그리고 두 메서드를 AppDeligate에 넣어 주어야 합니다. func application(application: UIApplication, shouldRestoreApplicationState coder: NSCoder) -> Bool { return true } func application(application: UIApplication, shouldSaveApplicationState coder: NSCoder) -> Bool { return true } 추가 적인 상태를 보존하려면 override func encodeRestorableStateWithCoder(cod..
import UIKit @UIApplicationMainclass AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // 뷰가 실행 되기 전 // Override point for customization after application launch. return true } func applicationWillResignActive(application: UIApplication) { // 비활성 상태로 전..
Core Data를 활용 // // ViewController.swift // DBContacts // // Created by 컴퓨터소프트웨어학과 on 2016. 11. 17.. // Copyright © 2016년 sd. All rights reserved. // import UIKit class ViewController: UIViewController { var databasePath = NSString() @IBOutlet weak var status: UILabel! @IBOutlet weak var name: UITextField! @IBOutlet weak var address: UITextField! @IBOutlet weak var phone: UITextField! @IBOutlet ..