Skip to content

Commit

Permalink
第28天———spotlight
Browse files Browse the repository at this point in the history
  • Loading branch information
qianyb committed Dec 27, 2018
1 parent 0bc7583 commit 8823930
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 96 deletions.
24 changes: 15 additions & 9 deletions Project 28 - SpotlightSearch/SpotIt.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
C085009D1BF3AA9500DD9194 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C085009B1BF3AA9500DD9194 /* Main.storyboard */; };
C085009F1BF3AA9500DD9194 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C085009E1BF3AA9500DD9194 /* Assets.xcassets */; };
C08500A21BF3AA9500DD9194 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C08500A01BF3AA9500DD9194 /* LaunchScreen.storyboard */; };
C08500AB1BF3AAC300DD9194 /* MoviesData.plist in Resources */ = {isa = PBXBuildFile; fileRef = C08500AA1BF3AAC300DD9194 /* MoviesData.plist */; settings = {ASSET_TAGS = (); }; };
C08500B11BF3AAD500DD9194 /* jurassicworld.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C08500AC1BF3AAD500DD9194 /* jurassicworld.jpg */; settings = {ASSET_TAGS = (); }; };
C08500B21BF3AAD500DD9194 /* pixels.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C08500AD1BF3AAD500DD9194 /* pixels.jpg */; settings = {ASSET_TAGS = (); }; };
C08500B31BF3AAD500DD9194 /* spectre.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C08500AE1BF3AAD500DD9194 /* spectre.jpg */; settings = {ASSET_TAGS = (); }; };
C08500B41BF3AAD500DD9194 /* terminatorgenisys.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C08500AF1BF3AAD500DD9194 /* terminatorgenisys.jpg */; settings = {ASSET_TAGS = (); }; };
C08500B51BF3AAD500DD9194 /* themartian.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C08500B01BF3AAD500DD9194 /* themartian.jpg */; settings = {ASSET_TAGS = (); }; };
C08500B71BF3AB2A00DD9194 /* MovieDetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08500B61BF3AB2A00DD9194 /* MovieDetailsViewController.swift */; settings = {ASSET_TAGS = (); }; };
C08500B91BF3AD3900DD9194 /* MovieSummaryCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = C08500B81BF3AD3900DD9194 /* MovieSummaryCell.xib */; settings = {ASSET_TAGS = (); }; };
C08500BB1BF3AD7500DD9194 /* MovieSummaryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08500BA1BF3AD7500DD9194 /* MovieSummaryCell.swift */; settings = {ASSET_TAGS = (); }; };
C08500AB1BF3AAC300DD9194 /* MoviesData.plist in Resources */ = {isa = PBXBuildFile; fileRef = C08500AA1BF3AAC300DD9194 /* MoviesData.plist */; };
C08500B11BF3AAD500DD9194 /* jurassicworld.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C08500AC1BF3AAD500DD9194 /* jurassicworld.jpg */; };
C08500B21BF3AAD500DD9194 /* pixels.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C08500AD1BF3AAD500DD9194 /* pixels.jpg */; };
C08500B31BF3AAD500DD9194 /* spectre.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C08500AE1BF3AAD500DD9194 /* spectre.jpg */; };
C08500B41BF3AAD500DD9194 /* terminatorgenisys.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C08500AF1BF3AAD500DD9194 /* terminatorgenisys.jpg */; };
C08500B51BF3AAD500DD9194 /* themartian.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C08500B01BF3AAD500DD9194 /* themartian.jpg */; };
C08500B71BF3AB2A00DD9194 /* MovieDetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08500B61BF3AB2A00DD9194 /* MovieDetailsViewController.swift */; };
C08500B91BF3AD3900DD9194 /* MovieSummaryCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = C08500B81BF3AD3900DD9194 /* MovieSummaryCell.xib */; };
C08500BB1BF3AD7500DD9194 /* MovieSummaryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C08500BA1BF3AD7500DD9194 /* MovieSummaryCell.swift */; };
C08500BD1BF3B2F500DD9194 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C08500BC1BF3B2F500DD9194 /* MobileCoreServices.framework */; };
C08500BF1BF3B2FC00DD9194 /* CoreSpotlight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C08500BE1BF3B2FC00DD9194 /* CoreSpotlight.framework */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -138,6 +138,7 @@
TargetAttributes = {
C08500931BF3AA9500DD9194 = {
CreatedOnToolsVersion = 7.0;
DevelopmentTeam = F3YT8BWBYJ;
};
};
};
Expand Down Expand Up @@ -298,21 +299,25 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = F3YT8BWBYJ;
INFOPLIST_FILE = SpotIt/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.appcoda.SpotIt;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
};
name = Debug;
};
C08500A81BF3AA9500DD9194 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = F3YT8BWBYJ;
INFOPLIST_FILE = SpotIt/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.appcoda.SpotIt;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand All @@ -335,6 +340,7 @@
C08500A81BF3AA9500DD9194 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
32 changes: 3 additions & 29 deletions Project 28 - SpotlightSearch/SpotIt/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

func application(_ application: UIApplication, continueUserActivity userActivity: NSUserActivity, restorationHandler: ([AnyObject]?) -> Void) -> Bool {


func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool {
let viewController = (window?.rootViewController as! UINavigationController).viewControllers[0] as! ViewController
viewController.restoreUserActivityState(userActivity)

return true
}

func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


}

Loading

0 comments on commit 8823930

Please sign in to comment.