Commit de1d0386 authored by Silbino Goncalves Matado's avatar Silbino Goncalves Matado Committed by Romain M

welcome screen: customize the view

Add WelcomeViewController.swift class into the project.
Add UILabels and UIImage into the WalkthroughStoryboard and their
IBOutlets.

Design improvements : Change background and button colors, make
button width equals, reduce logo width and add content edge insets to
the RoundedButton. Navigation bar is hidden and the status bar is
white on the welcome screen.

Tuleap: #1399
Change-Id: Id5a373f966d0a70522764c0773e6105f32481754
Reviewed-by: default avatarRomain Bertozzi <romain.bertozzi@savoirfairelinux.com>
parent 4361db30
......@@ -101,6 +101,7 @@
04399B141D1C341A00E99CD9 /* libx264.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04399AE21D1C341A00E99CD9 /* libx264.a */; };
04399B151D1C341A00E99CD9 /* libyaml-cpp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04399AE31D1C341A00E99CD9 /* libyaml-cpp.a */; };
5516C29F1E71CEFF009D3D2D /* AccountModelHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5516C29E1E71CEFF009D3D2D /* AccountModelHelper.swift */; };
56AC64D51E7C7F4000EA1AA9 /* WelcomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56AC64D41E7C7F4000EA1AA9 /* WelcomeViewController.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
......@@ -229,6 +230,7 @@
04399AE21D1C341A00E99CD9 /* libx264.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libx264.a; path = ../fat/lib/libx264.a; sourceTree = "<group>"; };
04399AE31D1C341A00E99CD9 /* libyaml-cpp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libyaml-cpp.a"; path = "../fat/lib/libyaml-cpp.a"; sourceTree = "<group>"; };
5516C29E1E71CEFF009D3D2D /* AccountModelHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AccountModelHelper.swift; path = Account/AccountModelHelper.swift; sourceTree = "<group>"; };
56AC64D41E7C7F4000EA1AA9 /* WelcomeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WelcomeViewController.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -415,6 +417,7 @@
children = (
043866321D22CE8C00E06CE2 /* MeViewController.swift */,
0438663A1D2313B700E06CE2 /* AccountDetailsViewController.swift */,
56AC64D41E7C7F4000EA1AA9 /* WelcomeViewController.swift */,
);
name = ViewController;
sourceTree = "<group>";
......@@ -751,6 +754,7 @@
04399AAD1D1C304300E99CD9 /* DRingAdapter.mm in Sources */,
0273C2FF1E0C438F00CF00BA /* AccountAdapterDelegate.swift in Sources */,
02B22DFF1DF755DB000358C9 /* AccountsService.swift in Sources */,
56AC64D51E7C7F4000EA1AA9 /* WelcomeViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "logo-ring-beta2-blanc.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "logo-ring-beta2-blanc@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "logo-ring-beta2-blanc@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -53,5 +53,7 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
</dict>
</plist>
......@@ -27,5 +27,6 @@ class RoundedButton: UIButton {
self.layer.borderWidth = 1.0
self.clipsToBounds = true
self.layer.cornerRadius = 15.0
self.contentEdgeInsets = UIEdgeInsetsMake(8.0, 8.0, 8.0, 8.0)
}
}
/*
* Copyright (C) 2016 Savoir-faire Linux Inc.
*
* Author: Silbino Gonçalves Matado <silbino.gmatado@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
import UIKit
class WelcomeViewController: UIViewController {
@IBOutlet weak var welcomeLabel: UILabel!
@IBOutlet weak var descriptionLabel: UILabel!
@IBOutlet weak var linkDeviceButton: RoundedButton!
@IBOutlet weak var createAccountButton: RoundedButton!
let createProfileSegueIdentifier = "CreateProfileSegue"
let linkDeviceToAccountSegueIdentifier = "LinkDeviceToAccountSegue"
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: true)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
override var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}
@IBAction func linkDeviceToAccountAction(_ sender: Any) {
self.performSegue(withIdentifier: linkDeviceToAccountSegueIdentifier, sender: nil)
}
@IBAction func createAccountAction(_ sender: Any) {
self.performSegue(withIdentifier: createProfileSegueIdentifier, sender: nil)
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
self.navigationController?.setNavigationBarHidden(false, animated: true)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment