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
311 changes: 298 additions & 13 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,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "NoughtsAndCrosses/OXGame.swift"
timestampString = "486334732.25836"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "15"
endingLineNumber = "15">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "NoughtsAndCrosses/OXGame.swift"
timestampString = "486337615.556721"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "11"
endingLineNumber = "11">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "NoughtsAndCrosses/OXGame.swift"
timestampString = "486850061.107956"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "110"
endingLineNumber = "110"
landmarkName = "state()"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "NoughtsAndCrosses/OXGame.swift"
timestampString = "486850061.107956"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "101"
endingLineNumber = "101"
landmarkName = "winDetection()"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "NoughtsAndCrosses/OXGame.swift"
timestampString = "486850061.107956"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "110"
endingLineNumber = "110"
landmarkName = "state()"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
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,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "0"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "NoughtsAndCrosses/LoginViewController.swift"
timestampString = "487933873.510008"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "33"
endingLineNumber = "33"
landmarkName = "loginButtonTapped(_:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
51 changes: 41 additions & 10 deletions NoughtsAndCrosses/NoughtsAndCrosses/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,55 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?
var navigationController: UINavigationController?

var authorisationNavigationController:UINavigationController?
var loggedInNavigationController: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

self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
self.window?.rootViewController = self.navigationController
self.window?.makeKeyAndVisible()
let userIsLoggedIn = NSUserDefaults.standardUserDefaults().objectForKey("userIsLoggedIn")


let loggedInViewController = BoardViewController(nibName: "BoardViewController", bundle:nil)
loggedInNavigationController = UINavigationController(rootViewController: loggedInViewController)

let landingViewController = LandingViewController(nibName: "LandingViewController", bundle:nil)
authorisationNavigationController = UINavigationController(rootViewController:landingViewController)


if let loggedIn = userIsLoggedIn {

self.window?.rootViewController = self.loggedInNavigationController
//self.navigationController
} else {

self.window?.rootViewController = self.authorisationNavigationController
}

let easterEggViewController = EasterEggViewController(nibName:"EasterEggViewController", bundle: nil)
easterEggNavigationController = UINavigationController(rootViewController: easterEggViewController)


return true
self.window?.makeKeyAndVisible()
EasterEggController.sharedInstance.initiate(self.window!)

return true
}

func navigateToLoggedInNavigationController () {
self.window?.rootViewController = self.loggedInNavigationController
}
func navigateToAuthorisationNavigationController () {
self.authorisationNavigationController?.popToRootViewControllerAnimated(false)
self.window?.rootViewController = self.authorisationNavigationController
}

func navigateToEasterEggNavigationController () {
self.window?.rootViewController = self.easterEggNavigationController
}


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.
Expand All @@ -51,7 +84,5 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func applicationWillTerminate(application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


}

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