Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

created the basic layout for a starting page #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
4 changes: 4 additions & 0 deletions FlappyBird.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand All @@ -41,6 +42,7 @@
43745215193D163800654986 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
43745216193D163800654986 /* FlappyBirdTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlappyBirdTests.swift; sourceTree = "<group>"; };
437A3DB9193D326A00909BA0 /* bird.atlas */ = {isa = PBXFileReference; lastKnownFileType = folder.skatlas; path = bird.atlas; sourceTree = "<group>"; };
506202DA23E6D23F0042DA4C /* StartPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartPageViewController.swift; sourceTree = "<group>"; };
6E1623DF1E24FC4E00FB2C72 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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;
Expand Down
63 changes: 57 additions & 6 deletions FlappyBird/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BV1-FR-VrT">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BV1-FR-VrT">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -18,13 +16,66 @@
<viewControllerLayoutGuide type="bottom" id="khH-OB-KpY"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="3se-qz-xqx" customClass="SKView">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="647"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="SZV-WD-TEh" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="138" y="134"/>
</scene>
<!--Start Page View Controller-->
<scene sceneID="xaV-0c-kGM">
<objects>
<viewController id="AQV-UT-oy7" customClass="StartPageViewController" customModule="FlappyBird" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="5I9-3Y-jfa"/>
<viewControllerLayoutGuide type="bottom" id="gDi-tm-D0O"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="BVu-Sn-hld">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="sky" translatesAutoresizingMaskIntoConstraints="NO" id="vGR-W3-DTE">
<rect key="frame" x="0.0" y="327" width="375" height="289"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="land" translatesAutoresizingMaskIntoConstraints="NO" id="m4J-4D-JuC">
<rect key="frame" x="0.0" y="530" width="375" height="152"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="START GAME" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rVb-NC-8BL">
<rect key="frame" x="80" y="113" width="215" height="88"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" systemColor="systemYellowColor" red="1" green="0.80000000000000004" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="28"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ycz-Fx-NEH">
<rect key="frame" x="80" y="113" width="215" height="88"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<connections>
<action selector="changeScreen:" destination="AQV-UT-oy7" eventType="touchUpInside" id="f9I-qb-Ltl"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
</view>
<connections>
<outlet property="changeScreen" destination="rVb-NC-8BL" id="Dp8-zD-ybL"/>
<outlet property="startGameLabel" destination="rVb-NC-8BL" id="exk-bz-Wqi"/>
<segue destination="BV1-FR-VrT" kind="presentation" identifier="viewChange" id="cug-pq-rx5"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="xTI-hm-qrw" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-711.20000000000005" y="133.5832083958021"/>
</scene>
</scenes>
<resources>
<image name="land" width="336" height="112"/>
<image name="sky" width="276" height="109"/>
</resources>
</document>
5 changes: 5 additions & 0 deletions FlappyBird/Images.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
Expand Down
36 changes: 36 additions & 0 deletions FlappyBird/StartPageViewController.swift
Original file line number Diff line number Diff line change
@@ -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)
}


}