Skip to content

Commit

Permalink
Add Splash
Browse files Browse the repository at this point in the history
  • Loading branch information
novinfard committed Apr 28, 2018
1 parent cdfb25c commit 5c59139
Showing 12 changed files with 259 additions and 6 deletions.
16 changes: 16 additions & 0 deletions SmartWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -31,6 +31,8 @@
CDC80A1E2017E61D00AD4B35 /* MainTabBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC80A1D2017E61D00AD4B35 /* MainTabBarViewController.swift */; };
CDD8642D2090E49B00E65E64 /* BudgetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDD8642C2090E49B00E65E64 /* BudgetViewController.swift */; };
CDD8642F2090F59A00E65E64 /* BudgetTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDD8642E2090F59A00E65E64 /* BudgetTableViewCell.swift */; };
CDD960192093F10600254F9F /* SplashViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDD960182093F10600254F9F /* SplashViewController.swift */; };
CDD9601A2093F62000254F9F /* intro.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = CDD864302093F02700E65E64 /* intro.mp4 */; };
CDEBB29D2015650E009ED68F /* WalletModel.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = CDEBB29B2015650E009ED68F /* WalletModel.xcdatamodeld */; };
CDEBB2A82017E350009ED68F /* Accounts+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDEBB2A22017E350009ED68F /* Accounts+CoreDataClass.swift */; };
CDEBB2A92017E350009ED68F /* Accounts+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDEBB2A32017E350009ED68F /* Accounts+CoreDataProperties.swift */; };
@@ -69,6 +71,8 @@
CDC80A1D2017E61D00AD4B35 /* MainTabBarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainTabBarViewController.swift; sourceTree = "<group>"; };
CDD8642C2090E49B00E65E64 /* BudgetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BudgetViewController.swift; sourceTree = "<group>"; };
CDD8642E2090F59A00E65E64 /* BudgetTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BudgetTableViewCell.swift; sourceTree = "<group>"; };
CDD864302093F02700E65E64 /* intro.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = intro.mp4; sourceTree = "<group>"; };
CDD960182093F10600254F9F /* SplashViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashViewController.swift; sourceTree = "<group>"; };
CDEBB29C2015650E009ED68F /* WalletModel1.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = WalletModel1.xcdatamodel; sourceTree = "<group>"; };
CDEBB2A22017E350009ED68F /* Accounts+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Accounts+CoreDataClass.swift"; sourceTree = "<group>"; };
CDEBB2A32017E350009ED68F /* Accounts+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Accounts+CoreDataProperties.swift"; sourceTree = "<group>"; };
@@ -138,6 +142,7 @@
CD0F71182014D379000B2BCD /* SmartWallet */ = {
isa = PBXGroup;
children = (
CDD960182093F10600254F9F /* SplashViewController.swift */,
CD397BD3207D79CF00103E5C /* PickerBasedTextField.swift */,
CD0F71192014D379000B2BCD /* AppDelegate.swift */,
CD0246AF2074F9D100E7C705 /* Facade.swift */,
@@ -156,6 +161,7 @@
CD0F711D2014D379000B2BCD /* Main.storyboard */,
CD0F71202014D379000B2BCD /* Assets.xcassets */,
CD0F71222014D379000B2BCD /* LaunchScreen.storyboard */,
CDD864312093F03200E65E64 /* videos */,
CD0F71252014D379000B2BCD /* Info.plist */,
);
path = SmartWallet;
@@ -172,6 +178,14 @@
path = General;
sourceTree = "<group>";
};
CDD864312093F03200E65E64 /* videos */ = {
isa = PBXGroup;
children = (
CDD864302093F02700E65E64 /* intro.mp4 */,
);
path = videos;
sourceTree = "<group>";
};
CDEBB2AE2017E396009ED68F /* Model */ = {
isa = PBXGroup;
children = (
@@ -249,6 +263,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
CDD9601A2093F62000254F9F /* intro.mp4 in Resources */,
CD0F71242014D379000B2BCD /* LaunchScreen.storyboard in Resources */,
CD0F71212014D379000B2BCD /* Assets.xcassets in Resources */,
CD0F711F2014D379000B2BCD /* Main.storyboard in Resources */,
@@ -335,6 +350,7 @@
CDEBB2A92017E350009ED68F /* Accounts+CoreDataProperties.swift in Sources */,
CD397BCE2079837E00103E5C /* Currency.swift in Sources */,
CD0246AE2073FB2600E7C705 /* PersistentModel.swift in Sources */,
CDD960192093F10600254F9F /* SplashViewController.swift in Sources */,
CD0246B02074F9D100E7C705 /* Facade.swift in Sources */,
CD397BD0207AC3B400103E5C /* ChooseCurrencyTableViewController.swift in Sources */,
CDEBB2A82017E350009ED68F /* Accounts+CoreDataClass.swift in Sources */,
22 changes: 22 additions & 0 deletions SmartWallet/Assets.xcassets/LunchIcon.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "Icon-App-60x60@3x.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.
21 changes: 21 additions & 0 deletions SmartWallet/Assets.xcassets/Welcome.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "welcome.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.
30 changes: 25 additions & 5 deletions SmartWallet/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -13,13 +17,29 @@
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" image="LunchIcon" translatesAutoresizingMaskIntoConstraints="NO" id="PAq-oq-kba">
<rect key="frame" x="158" y="314" width="60" height="60"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="lzE-j9-QIy"/>
<constraint firstAttribute="height" constant="60" id="yzX-Fc-tQm"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="0.33615285158157349" green="0.87839949131011963" blue="0.2490849494934082" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="PAq-oq-kba" firstAttribute="centerX" secondItem="6Tk-OE-BBY" secondAttribute="centerX" id="Xhj-cF-Mke"/>
<constraint firstItem="PAq-oq-kba" firstAttribute="centerY" secondItem="6Tk-OE-BBY" secondAttribute="centerY" id="zYd-MD-sv6"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
<point key="canvasLocation" x="52" y="374.66266866566718"/>
</scene>
</scenes>
<resources>
<image name="LunchIcon" width="60" height="60"/>
</resources>
</document>
89 changes: 89 additions & 0 deletions SmartWallet/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -807,6 +807,94 @@
</objects>
<point key="canvasLocation" x="303" y="2194"/>
</scene>
<!--Splash View Controller-->
<scene sceneID="IeM-QS-bCp">
<objects>
<viewController storyboardIdentifier="splashController" id="0z2-N1-YVp" customClass="SplashViewController" customModule="SmartWallet" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="GgH-h7-GZ9">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qgR-m5-bF8">
<rect key="frame" x="0.0" y="428" width="375" height="199"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="07h-az-zti">
<rect key="frame" x="24" y="28.5" width="327" height="142.5"/>
<constraints>
<constraint firstAttribute="width" constant="327" id="t23-ok-fBe"/>
</constraints>
<string key="text">⚪ Easily manage your costs and incomes

⚪ Find your average daily cost

⚪ Predict your monthly cost

⚪ Define your budget and trace it</string>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="07h-az-zti" firstAttribute="centerX" secondItem="qgR-m5-bF8" secondAttribute="centerX" id="Auc-DK-G34"/>
<constraint firstItem="07h-az-zti" firstAttribute="centerY" secondItem="qgR-m5-bF8" secondAttribute="centerY" id="Wwt-di-xsx"/>
<constraint firstAttribute="height" constant="199" id="Yqz-Ef-Yef"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lop-kA-9aE">
<rect key="frame" x="0.0" y="627" width="375" height="40"/>
<color key="backgroundColor" red="1" green="0.57637232540000005" blue="0.0" alpha="0.35004194630872482" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="5EN-xD-4ZR"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
<state key="normal" title="Start Now!">
<color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="startPressed:" destination="0z2-N1-YVp" eventType="touchUpInside" id="5VY-Bq-NWf"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Smart Wallet" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NCf-8u-Lxo">
<rect key="frame" x="89.5" y="310" width="196" height="67"/>
<constraints>
<constraint firstAttribute="height" constant="67" id="fqO-jr-YJw"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="black" pointSize="30"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<color key="shadowColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<size key="shadowOffset" width="2" height="-1"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Welcome" translatesAutoresizingMaskIntoConstraints="NO" id="dof-gy-A6T">
<rect key="frame" x="240" y="300" width="135" height="128"/>
<constraints>
<constraint firstAttribute="height" constant="128" id="OPw-9S-ND8"/>
<constraint firstAttribute="width" constant="135" id="xBL-lD-mZq"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="OFj-Z2-has" firstAttribute="trailing" secondItem="dof-gy-A6T" secondAttribute="trailing" id="2WQ-XG-gAf"/>
<constraint firstItem="OFj-Z2-has" firstAttribute="bottom" secondItem="lop-kA-9aE" secondAttribute="bottom" id="8Py-DD-UNE"/>
<constraint firstItem="OFj-Z2-has" firstAttribute="trailing" secondItem="qgR-m5-bF8" secondAttribute="trailing" id="AOg-tB-MYP"/>
<constraint firstItem="NCf-8u-Lxo" firstAttribute="centerY" secondItem="OFj-Z2-has" secondAttribute="centerY" id="BsB-AQ-3fc"/>
<constraint firstItem="OFj-Z2-has" firstAttribute="trailing" secondItem="lop-kA-9aE" secondAttribute="trailing" id="FCg-jU-gcd"/>
<constraint firstItem="qgR-m5-bF8" firstAttribute="top" secondItem="dof-gy-A6T" secondAttribute="bottom" id="PCl-QE-lCn"/>
<constraint firstItem="lop-kA-9aE" firstAttribute="top" secondItem="qgR-m5-bF8" secondAttribute="bottom" id="Zg6-bg-st3"/>
<constraint firstItem="NCf-8u-Lxo" firstAttribute="centerX" secondItem="OFj-Z2-has" secondAttribute="centerX" id="g0N-2P-V5X"/>
<constraint firstItem="qgR-m5-bF8" firstAttribute="leading" secondItem="OFj-Z2-has" secondAttribute="leading" id="jiV-2S-ZrG"/>
<constraint firstItem="lop-kA-9aE" firstAttribute="leading" secondItem="OFj-Z2-has" secondAttribute="leading" id="qf1-PP-r6x"/>
</constraints>
<viewLayoutGuide key="safeArea" id="OFj-Z2-has"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="GWB-aO-Zys" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1180" y="2193.5532233883059"/>
</scene>
</scenes>
<resources>
<image name="AccountIcon" width="170" height="170"/>
@@ -816,5 +904,6 @@
<image name="DashboardIcon" width="25" height="25"/>
<image name="RecordsIcon" width="25" height="25"/>
<image name="SettingsIcon" width="25" height="25"/>
<image name="Welcome" width="98" height="106"/>
</resources>
</document>
2 changes: 1 addition & 1 deletion SmartWallet/DashboardViewController.swift
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ class DashboardViewController: UITableViewController {

if totalBudget > 0 {
let monthlyTotalSave = totalBudget + monthlyTotal
overalInfo.append(("Total Save (based on budget)", getRecordString(monthlyTotalSave, .recordTypeAll)))
overalInfo.append(("Total Save", getRecordString(monthlyTotalSave, .recordTypeAll)))
}

overalInfo.append((" ", " "))
8 changes: 8 additions & 0 deletions SmartWallet/MainTabBarViewController.swift
Original file line number Diff line number Diff line change
@@ -26,7 +26,15 @@ class MainTabBarViewController: UITabBarController {
self.selectedIndex = 1 // second tab
}
}

override func viewDidLayoutSubviews() {
if !UserDefaults.standard.bool(forKey: "introduced") {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let splashVC = storyboard.instantiateViewController(withIdentifier: "splashController") as! SplashViewController

present(splashVC, animated: false)
}
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
Loading
Oops, something went wrong.

0 comments on commit 5c59139

Please sign in to comment.