From 8dcdd4fccc883cc47bd559ed27caaa096b50fa5b Mon Sep 17 00:00:00 2001 From: frozenparadox99 Date: Sun, 2 Feb 2020 15:33:47 +0530 Subject: [PATCH] created the basic layout for a starting page --- FlappyBird.xcodeproj/project.pbxproj | 4 ++ FlappyBird/Base.lproj/Main.storyboard | 63 +++++++++++++++++-- .../AppIcon.appiconset/Contents.json | 5 ++ FlappyBird/StartPageViewController.swift | 36 +++++++++++ 4 files changed, 102 insertions(+), 6 deletions(-) create mode 100644 FlappyBird/StartPageViewController.swift diff --git a/FlappyBird.xcodeproj/project.pbxproj b/FlappyBird.xcodeproj/project.pbxproj index b0120f5..b5d1ed2 100644 --- a/FlappyBird.xcodeproj/project.pbxproj +++ b/FlappyBird.xcodeproj/project.pbxproj @@ -15,6 +15,7 @@ 4374520B193D163800654986 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4374520A193D163800654986 /* Images.xcassets */; }; 43745217193D163800654986 /* FlappyBirdTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43745216193D163800654986 /* FlappyBirdTests.swift */; }; 437A3DBA193D326A00909BA0 /* bird.atlas in Resources */ = {isa = PBXBuildFile; fileRef = 437A3DB9193D326A00909BA0 /* bird.atlas */; }; + 506202DB23E6D23F0042DA4C /* StartPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 506202DA23E6D23F0042DA4C /* StartPageViewController.swift */; }; 6E1623E01E24FC4E00FB2C72 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6E1623DF1E24FC4E00FB2C72 /* LaunchScreen.storyboard */; }; /* End PBXBuildFile section */ @@ -41,6 +42,7 @@ 43745215193D163800654986 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43745216193D163800654986 /* FlappyBirdTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlappyBirdTests.swift; sourceTree = ""; }; 437A3DB9193D326A00909BA0 /* bird.atlas */ = {isa = PBXFileReference; lastKnownFileType = folder.skatlas; path = bird.atlas; sourceTree = ""; }; + 506202DA23E6D23F0042DA4C /* StartPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartPageViewController.swift; sourceTree = ""; }; 6E1623DF1E24FC4E00FB2C72 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; /* End PBXFileReference section */ @@ -90,6 +92,7 @@ 43745203193D163800654986 /* GameScene.swift */, 43745205193D163800654986 /* GameViewController.swift */, 43745207193D163800654986 /* Main.storyboard */, + 506202DA23E6D23F0042DA4C /* StartPageViewController.swift */, 4374520A193D163800654986 /* Images.xcassets */, 437A3DB9193D326A00909BA0 /* bird.atlas */, 437451FD193D163700654986 /* Supporting Files */, @@ -230,6 +233,7 @@ files = ( 43745204193D163800654986 /* GameScene.swift in Sources */, 43745206193D163800654986 /* GameViewController.swift in Sources */, + 506202DB23E6D23F0042DA4C /* StartPageViewController.swift in Sources */, 43745200193D163700654986 /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/FlappyBird/Base.lproj/Main.storyboard b/FlappyBird/Base.lproj/Main.storyboard index 30e8353..4cb4e4b 100644 --- a/FlappyBird/Base.lproj/Main.storyboard +++ b/FlappyBird/Base.lproj/Main.storyboard @@ -1,11 +1,9 @@ - - - - + + - + @@ -18,13 +16,66 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FlappyBird/Images.xcassets/AppIcon.appiconset/Contents.json b/FlappyBird/Images.xcassets/AppIcon.appiconset/Contents.json index 1d060ed..d8db8d6 100644 --- a/FlappyBird/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/FlappyBird/Images.xcassets/AppIcon.appiconset/Contents.json @@ -84,6 +84,11 @@ "idiom" : "ipad", "size" : "83.5x83.5", "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" } ], "info" : { diff --git a/FlappyBird/StartPageViewController.swift b/FlappyBird/StartPageViewController.swift new file mode 100644 index 0000000..cbc16ca --- /dev/null +++ b/FlappyBird/StartPageViewController.swift @@ -0,0 +1,36 @@ +// +// StartPageViewController.swift +// FlappyBird +// +// Created by Sushant Lenka on 02/02/20. +// Copyright © 2020 Fullstack.io. All rights reserved. +// + +import UIKit + +class StartPageViewController: UIViewController { + @IBOutlet weak var startGameLabel: UILabel! + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + + @IBAction func changeScreen(_ sender: UIButton) { + performSegue(withIdentifier: "viewChange", sender: self) + } + + +}