Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
306 changes: 299 additions & 7 deletions NoughtsAndCrosses/NoughtsAndCrosses.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "42D447C91CD765670070326E"
BuildableName = "NoughtsAndCrosses.app"
BlueprintName = "NoughtsAndCrosses"
ReferencedContainer = "container:NoughtsAndCrosses.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "42D447DD1CD765680070326E"
BuildableName = "NoughtsAndCrossesTests.xctest"
BlueprintName = "NoughtsAndCrossesTests"
ReferencedContainer = "container:NoughtsAndCrosses.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "42D447E81CD765680070326E"
BuildableName = "NoughtsAndCrossesUITests.xctest"
BlueprintName = "NoughtsAndCrossesUITests"
ReferencedContainer = "container:NoughtsAndCrosses.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "42D447C91CD765670070326E"
BuildableName = "NoughtsAndCrosses.app"
BlueprintName = "NoughtsAndCrosses"
ReferencedContainer = "container:NoughtsAndCrosses.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "42D447C91CD765670070326E"
BuildableName = "NoughtsAndCrosses.app"
BlueprintName = "NoughtsAndCrosses"
ReferencedContainer = "container:NoughtsAndCrosses.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "42D447C91CD765670070326E"
BuildableName = "NoughtsAndCrosses.app"
BlueprintName = "NoughtsAndCrosses"
ReferencedContainer = "container:NoughtsAndCrosses.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?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>SchemeUserState</key>
<dict>
<key>NoughtsAndCrosses.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>42D447C91CD765670070326E</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>42D447DD1CD765680070326E</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>42D447E81CD765680070326E</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "0"
version = "2.0">
</Bucket>
65 changes: 59 additions & 6 deletions NoughtsAndCrosses/NoughtsAndCrosses/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,77 @@ import UIKit
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?
var navigationController: UINavigationController?
// var navigationController: UINavigationController?
var authorisationNavigationController = UINavigationController()
var boardViewController = UINavigationController()
var easterEggNavigationController = UINavigationController()


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

let boardViewController = BoardViewController(nibName:"BoardViewController",bundle:nil)
self.navigationController = UINavigationController(rootViewController: boardViewController)
self.navigationController?.navigationBarHidden = true
// let boardViewController = BoardViewController(nibName:"BoardViewController", bundle:nil)
// self.navigationController = UINavigationController(rootViewController: boardViewController)
//
//
// let landingViewController = LandingViewController(nibName:"LandingViewController", bundle:nil)
// self.navigationController = UINavigationController(rootViewController: landingViewController)
//
//
// self.navigationController?.navigationBarHidden = true
//
// self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
// self.window?.rootViewController = self.navigationController
// self.window?.makeKeyAndVisible()


let boardViewController = BoardViewController(nibName: "BoardViewController", bundle: nil)
self.boardViewController = UINavigationController(rootViewController: boardViewController)
self.boardViewController.navigationBarHidden = true


let userIsLoggedIn = NSUserDefaults.standardUserDefaults().objectForKey("userIsLoggedIn")
if let loggedIn = userIsLoggedIn {
navigateToBoardViewController()
} else {
let landingViewController = LandingViewController(nibName: "LandingViewController", bundle: nil)
self.authorisationNavigationController = UINavigationController(rootViewController: landingViewController)
self.window?.rootViewController = self.authorisationNavigationController
}


// copied from "Building out the navigation for authorisation flow: 1D"
self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
self.window?.rootViewController = self.navigationController
self.window?.rootViewController = self.authorisationNavigationController
self.window?.makeKeyAndVisible()



EasterEggController.sharedInstance.initiate(self.window!)

return true
}

func navigateToEasterEggController() {
let easterEggViewController = EasterEggViewController(nibName: "EasterEggViewController", bundle: nil)
self.easterEggNavigationController = UINavigationController(rootViewController: easterEggViewController)
self.easterEggNavigationController.navigationBarHidden = true

self.window?.rootViewController = self.easterEggNavigationController

}

func returnToGameController() {
self.window?.rootViewController = self.boardViewController
}

func navigateToBoardViewController() {
self.window?.rootViewController = self.boardViewController
}

func navigateToLandingViewConrtoller() {
self.window?.rootViewController = self.authorisationNavigationController
}

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.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "cross-S.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "cross-M.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "cross-L.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "tick-S.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "tick-M.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "tick-L.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "29BCF29D9B1184673328431525888_SW_WEBM_1425422337809_image.jpg",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading