From b0bc092d1e71609bc72a757b79802ed3c721dca5 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Fri, 28 Aug 2015 17:14:49 +0800 Subject: [PATCH 01/22] add AboutViewController --- Yep.xcodeproj/project.pbxproj | 12 +++++++ Yep/Base.lproj/Main.storyboard | 31 +++++++++++++++---- .../About/AboutViewController.swift | 18 +++++++++++ .../Settings/SettingsViewController.swift | 2 +- 4 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 Yep/ViewControllers/About/AboutViewController.swift diff --git a/Yep.xcodeproj/project.pbxproj b/Yep.xcodeproj/project.pbxproj index de5eef51..51e2aaa0 100644 --- a/Yep.xcodeproj/project.pbxproj +++ b/Yep.xcodeproj/project.pbxproj @@ -210,6 +210,7 @@ 50E114FD1ABC549300F13000 /* ContactsCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 50E114FB1ABC549300F13000 /* ContactsCell.xib */; }; 50E18BB71B180F7D0076C3C6 /* BottomButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E18BB61B180F7D0076C3C6 /* BottomButtonView.swift */; }; 50E1D7291B870D7500D90A82 /* NSParagraphStyle+Yep.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1D7281B870D7500D90A82 /* NSParagraphStyle+Yep.swift */; }; + 50E3488E1B905C0100A8E699 /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E3488D1B905C0100A8E699 /* AboutViewController.swift */; }; 50E61CEB1AF1F69D00908A9D /* ConversationTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E61CEA1AF1F69D00908A9D /* ConversationTitleView.swift */; }; 50EB8C5E1AE78AB9001AC1EE /* YepAsset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50EB8C5D1AE78AB9001AC1EE /* YepAsset.swift */; }; 50EB8CBF1AE89ED8001AC1EE /* ChatLeftVideoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50EB8CBD1AE89ED8001AC1EE /* ChatLeftVideoCell.swift */; }; @@ -461,6 +462,7 @@ 50E114FB1ABC549300F13000 /* ContactsCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ContactsCell.xib; path = Views/Cells/Contacts/ContactsCell.xib; sourceTree = ""; }; 50E18BB61B180F7D0076C3C6 /* BottomButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BottomButtonView.swift; path = Views/SayHi/BottomButtonView.swift; sourceTree = ""; }; 50E1D7281B870D7500D90A82 /* NSParagraphStyle+Yep.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSParagraphStyle+Yep.swift"; path = "Extensions/NSParagraphStyle+Yep.swift"; sourceTree = ""; }; + 50E3488D1B905C0100A8E699 /* AboutViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AboutViewController.swift; path = ViewControllers/About/AboutViewController.swift; sourceTree = ""; }; 50E61CEA1AF1F69D00908A9D /* ConversationTitleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ConversationTitleView.swift; path = Views/ConversationTitle/ConversationTitleView.swift; sourceTree = ""; }; 50EB8C5D1AE78AB9001AC1EE /* YepAsset.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = YepAsset.swift; path = Helpers/YepAsset.swift; sourceTree = ""; }; 50EB8CBD1AE89ED8001AC1EE /* ChatLeftVideoCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ChatLeftVideoCell.swift; path = Views/Cells/ChatLeftVideo/ChatLeftVideoCell.swift; sourceTree = ""; }; @@ -758,6 +760,7 @@ 50A640ED1B6F4E480050E4A3 /* DoNotDisturbPeriod */, 503ED23B1B8ADCED0072187D /* BlackList */, 50B38FCD1B6B37F90064C132 /* Feedback */, + 50E3488F1B905C0700A8E699 /* About */, 0A1CAC6C1AFA3D8C00826B45 /* SkillHome */, 507CF1691AFC84AA00E261B4 /* CustomNavigationBar */, 0A9018831B0120A800AE4B7F /* OAuth */, @@ -1519,6 +1522,14 @@ name = SayHi; sourceTree = ""; }; + 50E3488F1B905C0700A8E699 /* About */ = { + isa = PBXGroup; + children = ( + 50E3488D1B905C0100A8E699 /* AboutViewController.swift */, + ); + name = About; + sourceTree = ""; + }; 50E61CEC1AF1F6A600908A9D /* ConversationTitle */ = { isa = PBXGroup; children = ( @@ -1952,6 +1963,7 @@ 5039594E1B05E6E000797A3E /* ProfileSocialAccountGithubCell.swift in Sources */, 5053AD4D1AF79EEA00B3CBFA /* LocationPin.swift in Sources */, 50C0909D1ADE294800CC6389 /* RegisterPickSkillsLayout.swift in Sources */, + 50E3488E1B905C0100A8E699 /* AboutViewController.swift in Sources */, 502AE52E1AB83879005BD199 /* UnderLineTextField.swift in Sources */, 508F8FD71B01EDB400461B0B /* DribbbleShotCell.swift in Sources */, 0A7A7D561AF5E00600A7F5F5 /* YepHelper.swift in Sources */, diff --git a/Yep/Base.lproj/Main.storyboard b/Yep/Base.lproj/Main.storyboard index 101929a0..f59ee84d 100644 --- a/Yep/Base.lproj/Main.storyboard +++ b/Yep/Base.lproj/Main.storyboard @@ -588,6 +588,7 @@ + @@ -968,7 +969,7 @@ - + @@ -1009,7 +1010,7 @@ - + @@ -1080,7 +1081,7 @@ - + @@ -1123,7 +1124,25 @@ - + + + + + + + + + + + + + + + + + + + @@ -1172,7 +1191,7 @@ - + @@ -1423,7 +1442,7 @@ - + diff --git a/Yep/ViewControllers/About/AboutViewController.swift b/Yep/ViewControllers/About/AboutViewController.swift new file mode 100644 index 00000000..c1bc7a52 --- /dev/null +++ b/Yep/ViewControllers/About/AboutViewController.swift @@ -0,0 +1,18 @@ +// +// AboutViewController.swift +// Yep +// +// Created by nixzhu on 15/8/28. +// Copyright (c) 2015年 Catch Inc. All rights reserved. +// + +import UIKit + +class AboutViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + title = NSLocalizedString("About", comment: "") + } +} diff --git a/Yep/ViewControllers/Settings/SettingsViewController.swift b/Yep/ViewControllers/Settings/SettingsViewController.swift index 18c6e48d..ad0f8f31 100644 --- a/Yep/ViewControllers/Settings/SettingsViewController.swift +++ b/Yep/ViewControllers/Settings/SettingsViewController.swift @@ -32,7 +32,7 @@ class SettingsViewController: BaseViewController { ], [ "name": NSLocalizedString("About", comment: ""), - //"segue": "showAbout", + "segue": "showAbout", ], ] From 1bf12b69b34f087bba67b791785d10bada6c907d Mon Sep 17 00:00:00 2001 From: nixzhu Date: Fri, 28 Aug 2015 17:21:34 +0800 Subject: [PATCH 02/22] add tableView --- Yep/Base.lproj/Main.storyboard | 22 +++++++++++++++++++ .../About/AboutViewController.swift | 14 ++++++++++++ 2 files changed, 36 insertions(+) diff --git a/Yep/Base.lproj/Main.storyboard b/Yep/Base.lproj/Main.storyboard index f59ee84d..7ba3c5bb 100644 --- a/Yep/Base.lproj/Main.storyboard +++ b/Yep/Base.lproj/Main.storyboard @@ -1137,8 +1137,30 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Yep/ViewControllers/About/AboutViewController.swift b/Yep/ViewControllers/About/AboutViewController.swift index c1bc7a52..5cb6475b 100644 --- a/Yep/ViewControllers/About/AboutViewController.swift +++ b/Yep/ViewControllers/About/AboutViewController.swift @@ -10,9 +10,23 @@ import UIKit class AboutViewController: UIViewController { + @IBOutlet weak var aboutTableView: UITableView! + @IBOutlet weak var aboutTableViewHeightConstraint: NSLayoutConstraint! + override func viewDidLoad() { super.viewDidLoad() title = NSLocalizedString("About", comment: "") } } + +extension AboutViewController: UITableViewDataSource, UITableViewDelegate { + + func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + return UITableViewCell() + } + + func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 3 + } +} \ No newline at end of file From a100e353191ae2ee3268d818ea5a2828eae11cab Mon Sep 17 00:00:00 2001 From: nixzhu Date: Fri, 28 Aug 2015 17:37:02 +0800 Subject: [PATCH 03/22] UI of About --- Yep/Base.lproj/Main.storyboard | 38 ++++++++++++++++++- .../About/AboutViewController.swift | 6 +++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/Yep/Base.lproj/Main.storyboard b/Yep/Base.lproj/Main.storyboard index 7ba3c5bb..c46d43ac 100644 --- a/Yep/Base.lproj/Main.storyboard +++ b/Yep/Base.lproj/Main.storyboard @@ -1139,7 +1139,7 @@ - + @@ -1149,17 +1149,50 @@ + + + + + + + + + + - + + + + + + + + + @@ -1887,6 +1920,7 @@ + diff --git a/Yep/ViewControllers/About/AboutViewController.swift b/Yep/ViewControllers/About/AboutViewController.swift index 5cb6475b..612a079f 100644 --- a/Yep/ViewControllers/About/AboutViewController.swift +++ b/Yep/ViewControllers/About/AboutViewController.swift @@ -10,9 +10,15 @@ import UIKit class AboutViewController: UIViewController { + @IBOutlet weak var appLogoImageView: UIImageView! + @IBOutlet weak var appNameLabel: UILabel! + @IBOutlet weak var appVersionLabel: UILabel! + @IBOutlet weak var aboutTableView: UITableView! @IBOutlet weak var aboutTableViewHeightConstraint: NSLayoutConstraint! + @IBOutlet weak var copyrightLabel: UILabel! + override func viewDidLoad() { super.viewDidLoad() From f01f50191b8895ddedddc718bd06d28fcfaef0ef Mon Sep 17 00:00:00 2001 From: nixzhu Date: Fri, 28 Aug 2015 17:49:31 +0800 Subject: [PATCH 04/22] add AboutCell --- Yep.xcodeproj/project.pbxproj | 16 +++++++ Yep/Base.lproj/Main.storyboard | 4 +- .../About/AboutViewController.swift | 14 ++++++- Yep/Views/Cells/About/AboutCell.swift | 27 ++++++++++++ Yep/Views/Cells/About/AboutCell.xib | 42 +++++++++++++++++++ 5 files changed, 99 insertions(+), 4 deletions(-) create mode 100644 Yep/Views/Cells/About/AboutCell.swift create mode 100644 Yep/Views/Cells/About/AboutCell.xib diff --git a/Yep.xcodeproj/project.pbxproj b/Yep.xcodeproj/project.pbxproj index 51e2aaa0..44b7961b 100644 --- a/Yep.xcodeproj/project.pbxproj +++ b/Yep.xcodeproj/project.pbxproj @@ -211,6 +211,8 @@ 50E18BB71B180F7D0076C3C6 /* BottomButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E18BB61B180F7D0076C3C6 /* BottomButtonView.swift */; }; 50E1D7291B870D7500D90A82 /* NSParagraphStyle+Yep.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1D7281B870D7500D90A82 /* NSParagraphStyle+Yep.swift */; }; 50E3488E1B905C0100A8E699 /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E3488D1B905C0100A8E699 /* AboutViewController.swift */; }; + 50E348921B9063A700A8E699 /* AboutCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E348901B9063A700A8E699 /* AboutCell.swift */; }; + 50E348931B9063A700A8E699 /* AboutCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 50E348911B9063A700A8E699 /* AboutCell.xib */; }; 50E61CEB1AF1F69D00908A9D /* ConversationTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E61CEA1AF1F69D00908A9D /* ConversationTitleView.swift */; }; 50EB8C5E1AE78AB9001AC1EE /* YepAsset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50EB8C5D1AE78AB9001AC1EE /* YepAsset.swift */; }; 50EB8CBF1AE89ED8001AC1EE /* ChatLeftVideoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50EB8CBD1AE89ED8001AC1EE /* ChatLeftVideoCell.swift */; }; @@ -463,6 +465,8 @@ 50E18BB61B180F7D0076C3C6 /* BottomButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BottomButtonView.swift; path = Views/SayHi/BottomButtonView.swift; sourceTree = ""; }; 50E1D7281B870D7500D90A82 /* NSParagraphStyle+Yep.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSParagraphStyle+Yep.swift"; path = "Extensions/NSParagraphStyle+Yep.swift"; sourceTree = ""; }; 50E3488D1B905C0100A8E699 /* AboutViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AboutViewController.swift; path = ViewControllers/About/AboutViewController.swift; sourceTree = ""; }; + 50E348901B9063A700A8E699 /* AboutCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AboutCell.swift; path = Views/Cells/About/AboutCell.swift; sourceTree = ""; }; + 50E348911B9063A700A8E699 /* AboutCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = AboutCell.xib; path = Views/Cells/About/AboutCell.xib; sourceTree = ""; }; 50E61CEA1AF1F69D00908A9D /* ConversationTitleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ConversationTitleView.swift; path = Views/ConversationTitle/ConversationTitleView.swift; sourceTree = ""; }; 50EB8C5D1AE78AB9001AC1EE /* YepAsset.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = YepAsset.swift; path = Helpers/YepAsset.swift; sourceTree = ""; }; 50EB8CBD1AE89ED8001AC1EE /* ChatLeftVideoCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ChatLeftVideoCell.swift; path = Views/Cells/ChatLeftVideo/ChatLeftVideoCell.swift; sourceTree = ""; }; @@ -897,6 +901,7 @@ 508F8FE01B049AD400461B0B /* InstagramMedia */, 5064F6561B0B0E1B0089FAD4 /* AddFriendSearch */, 5064F65B1B0B14470089FAD4 /* AddFriendMore */, + 50E348941B9063AD00A8E699 /* About */, ); name = Cells; sourceTree = ""; @@ -1530,6 +1535,15 @@ name = About; sourceTree = ""; }; + 50E348941B9063AD00A8E699 /* About */ = { + isa = PBXGroup; + children = ( + 50E348901B9063A700A8E699 /* AboutCell.swift */, + 50E348911B9063A700A8E699 /* AboutCell.xib */, + ); + name = About; + sourceTree = ""; + }; 50E61CEC1AF1F6A600908A9D /* ConversationTitle */ = { isa = PBXGroup; children = ( @@ -1757,6 +1771,7 @@ 5023DE381AB6979600B3EE96 /* ConversationCell.xib in Resources */, 50C090A11ADE391600CC6389 /* AddSkillsReusableView.xib in Resources */, 504F415B1AD5028200FBB19A /* SkillCell.xib in Resources */, + 50E348931B9063A700A8E699 /* AboutCell.xib in Resources */, 5039594F1B05E6E000797A3E /* ProfileSocialAccountGithubCell.xib in Resources */, 502AE5591AB932D5005BD199 /* ProfileSectionHeaderReusableView.xib in Resources */, 5056AD6F1B05CB92003F9359 /* ProfileSocialAccountImagesCell.xib in Resources */, @@ -1968,6 +1983,7 @@ 508F8FD71B01EDB400461B0B /* DribbbleShotCell.swift in Sources */, 0A7A7D561AF5E00600A7F5F5 /* YepHelper.swift in Sources */, 502280F81B1C3F2800E984EE /* FriendsInContactsViewController.swift in Sources */, + 50E348921B9063A700A8E699 /* AboutCell.swift in Sources */, 508D17401ACCD2740092D666 /* YepButton.swift in Sources */, 5019F6311B39BFE00000D993 /* ConversationMoreView.swift in Sources */, 506BB7F51AE4E0A500C1A2A0 /* SkillAnnotationHeader.swift in Sources */, diff --git a/Yep/Base.lproj/Main.storyboard b/Yep/Base.lproj/Main.storyboard index c46d43ac..ec53853a 100644 --- a/Yep/Base.lproj/Main.storyboard +++ b/Yep/Base.lproj/Main.storyboard @@ -1129,7 +1129,7 @@ - + @@ -1138,7 +1138,7 @@ - + diff --git a/Yep/ViewControllers/About/AboutViewController.swift b/Yep/ViewControllers/About/AboutViewController.swift index 612a079f..69ad2900 100644 --- a/Yep/ViewControllers/About/AboutViewController.swift +++ b/Yep/ViewControllers/About/AboutViewController.swift @@ -19,20 +19,30 @@ class AboutViewController: UIViewController { @IBOutlet weak var copyrightLabel: UILabel! + let aboutCellID = "AboutCell" + override func viewDidLoad() { super.viewDidLoad() title = NSLocalizedString("About", comment: "") + + aboutTableView.registerNib(UINib(nibName: aboutCellID, bundle: nil), forCellReuseIdentifier: aboutCellID) + + let rowHeight: CGFloat = 60 + aboutTableView.rowHeight = rowHeight + + aboutTableViewHeightConstraint.constant = rowHeight * 3 } } extension AboutViewController: UITableViewDataSource, UITableViewDelegate { func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - return UITableViewCell() + let cell = tableView.dequeueReusableCellWithIdentifier(aboutCellID) as! AboutCell + return cell } func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 3 } -} \ No newline at end of file +} diff --git a/Yep/Views/Cells/About/AboutCell.swift b/Yep/Views/Cells/About/AboutCell.swift new file mode 100644 index 00000000..de6667af --- /dev/null +++ b/Yep/Views/Cells/About/AboutCell.swift @@ -0,0 +1,27 @@ +// +// AboutCell.swift +// Yep +// +// Created by nixzhu on 15/8/28. +// Copyright (c) 2015年 Catch Inc. All rights reserved. +// + +import UIKit + +class AboutCell: UITableViewCell { + + @IBOutlet weak var annotationLabel: UILabel! + @IBOutlet weak var accessoryImageView: UIImageView! + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + override func setSelected(selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + +} diff --git a/Yep/Views/Cells/About/AboutCell.xib b/Yep/Views/Cells/About/AboutCell.xib new file mode 100644 index 00000000..7c6a8f01 --- /dev/null +++ b/Yep/Views/Cells/About/AboutCell.xib @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 01f85066ac678cd8e1b1b9e77bd48b16ba013767 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Fri, 28 Aug 2015 18:02:39 +0800 Subject: [PATCH 05/22] fill cell; adjust UI --- .../About/AboutViewController.swift | 43 +++++++++++++++---- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/Yep/ViewControllers/About/AboutViewController.swift b/Yep/ViewControllers/About/AboutViewController.swift index 69ad2900..2a6a7a05 100644 --- a/Yep/ViewControllers/About/AboutViewController.swift +++ b/Yep/ViewControllers/About/AboutViewController.swift @@ -21,6 +21,14 @@ class AboutViewController: UIViewController { let aboutCellID = "AboutCell" + let rowHeight: CGFloat = 60 + + let aboutAnnotations: [String] = [ + NSLocalizedString("Pods help Yep", comment: ""), + NSLocalizedString("Rate Yep on App Store", comment: ""), + NSLocalizedString("Terms of Service", comment: ""), + ] + override func viewDidLoad() { super.viewDidLoad() @@ -28,21 +36,38 @@ class AboutViewController: UIViewController { aboutTableView.registerNib(UINib(nibName: aboutCellID, bundle: nil), forCellReuseIdentifier: aboutCellID) - let rowHeight: CGFloat = 60 - aboutTableView.rowHeight = rowHeight - - aboutTableViewHeightConstraint.constant = rowHeight * 3 + aboutTableViewHeightConstraint.constant = rowHeight * CGFloat(aboutAnnotations.count) + 1 } } +// MARK: - UITableViewDataSource, UITableViewDelegate + extension AboutViewController: UITableViewDataSource, UITableViewDelegate { - func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCellWithIdentifier(aboutCellID) as! AboutCell - return cell + func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return aboutAnnotations.count + 1 } - func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return 3 + func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + + switch indexPath.row { + case 0: + return UITableViewCell() + default: + let cell = tableView.dequeueReusableCellWithIdentifier(aboutCellID) as! AboutCell + let annotation = aboutAnnotations[indexPath.row - 1] + cell.annotationLabel.text = annotation + return cell + } + } + + func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { + switch indexPath.row { + case 0: + return 1 + default: + return rowHeight + } } } + From e964d4ebeedc2e8346e3a97c6fde25529518f34c Mon Sep 17 00:00:00 2001 From: nixzhu Date: Fri, 28 Aug 2015 18:43:13 +0800 Subject: [PATCH 06/22] show terms --- Yep/Configs/YepConfig.swift | 2 ++ Yep/ViewControllers/About/AboutViewController.swift | 11 +++++++++++ .../Register/RegisterPickNameViewController.swift | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Yep/Configs/YepConfig.swift b/Yep/Configs/YepConfig.swift index a23755c3..9821c65e 100644 --- a/Yep/Configs/YepConfig.swift +++ b/Yep/Configs/YepConfig.swift @@ -31,6 +31,8 @@ class YepConfig { return 0 #endif } + + static let termsURLString = "http://soyep.com/privacy" class func getScreenRect() -> CGRect { return UIScreen.mainScreen().bounds diff --git a/Yep/ViewControllers/About/AboutViewController.swift b/Yep/ViewControllers/About/AboutViewController.swift index 2a6a7a05..583325c1 100644 --- a/Yep/ViewControllers/About/AboutViewController.swift +++ b/Yep/ViewControllers/About/AboutViewController.swift @@ -69,5 +69,16 @@ extension AboutViewController: UITableViewDataSource, UITableViewDelegate { return rowHeight } } + + func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { + tableView.deselectRowAtIndexPath(indexPath, animated: true) + + switch indexPath.row { + case 3: + UIApplication.sharedApplication().openURL(NSURL(string: YepConfig.termsURLString)!) + default: + break + } + } } diff --git a/Yep/ViewControllers/Register/RegisterPickNameViewController.swift b/Yep/ViewControllers/Register/RegisterPickNameViewController.swift index b14a4487..41afcbbc 100644 --- a/Yep/ViewControllers/Register/RegisterPickNameViewController.swift +++ b/Yep/ViewControllers/Register/RegisterPickNameViewController.swift @@ -85,7 +85,7 @@ class RegisterPickNameViewController: BaseViewController { // MARK: Actions func tapTerms() { - UIApplication.sharedApplication().openURL(NSURL(string: "http://soyep.com/privacy")!) + UIApplication.sharedApplication().openURL(NSURL(string: YepConfig.termsURLString)!) } func textFieldDidChange(textField: UITextField) { From ce5410f6911c0cbaa44790c8c1f6be9c37cdc249 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 09:46:14 +0800 Subject: [PATCH 07/22] accessoryImageView.tintColor --- Yep/Views/Cells/About/AboutCell.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Yep/Views/Cells/About/AboutCell.swift b/Yep/Views/Cells/About/AboutCell.swift index de6667af..9a885433 100644 --- a/Yep/Views/Cells/About/AboutCell.swift +++ b/Yep/Views/Cells/About/AboutCell.swift @@ -15,7 +15,8 @@ class AboutCell: UITableViewCell { override func awakeFromNib() { super.awakeFromNib() - // Initialization code + + accessoryImageView.tintColor = UIColor.lightGrayColor() } override func setSelected(selected: Bool, animated: Bool) { From ba1c696093e347084cf37fb062bd2e0a6956c998 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 10:02:26 +0800 Subject: [PATCH 08/22] add PodsViewController --- Yep.xcodeproj/project.pbxproj | 12 ++++++ Yep/Base.lproj/Main.storyboard | 37 ++++++++++++++++++- .../About/AboutViewController.swift | 2 + 3 files changed, 50 insertions(+), 1 deletion(-) diff --git a/Yep.xcodeproj/project.pbxproj b/Yep.xcodeproj/project.pbxproj index 44b7961b..328429e9 100644 --- a/Yep.xcodeproj/project.pbxproj +++ b/Yep.xcodeproj/project.pbxproj @@ -213,6 +213,7 @@ 50E3488E1B905C0100A8E699 /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E3488D1B905C0100A8E699 /* AboutViewController.swift */; }; 50E348921B9063A700A8E699 /* AboutCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E348901B9063A700A8E699 /* AboutCell.swift */; }; 50E348931B9063A700A8E699 /* AboutCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 50E348911B9063A700A8E699 /* AboutCell.xib */; }; + 50E348961B93E9F200A8E699 /* PodsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E348951B93E9F200A8E699 /* PodsViewController.swift */; }; 50E61CEB1AF1F69D00908A9D /* ConversationTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E61CEA1AF1F69D00908A9D /* ConversationTitleView.swift */; }; 50EB8C5E1AE78AB9001AC1EE /* YepAsset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50EB8C5D1AE78AB9001AC1EE /* YepAsset.swift */; }; 50EB8CBF1AE89ED8001AC1EE /* ChatLeftVideoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50EB8CBD1AE89ED8001AC1EE /* ChatLeftVideoCell.swift */; }; @@ -467,6 +468,7 @@ 50E3488D1B905C0100A8E699 /* AboutViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AboutViewController.swift; path = ViewControllers/About/AboutViewController.swift; sourceTree = ""; }; 50E348901B9063A700A8E699 /* AboutCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AboutCell.swift; path = Views/Cells/About/AboutCell.swift; sourceTree = ""; }; 50E348911B9063A700A8E699 /* AboutCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = AboutCell.xib; path = Views/Cells/About/AboutCell.xib; sourceTree = ""; }; + 50E348951B93E9F200A8E699 /* PodsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PodsViewController.swift; path = ViewControllers/Pods/PodsViewController.swift; sourceTree = ""; }; 50E61CEA1AF1F69D00908A9D /* ConversationTitleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ConversationTitleView.swift; path = Views/ConversationTitle/ConversationTitleView.swift; sourceTree = ""; }; 50EB8C5D1AE78AB9001AC1EE /* YepAsset.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = YepAsset.swift; path = Helpers/YepAsset.swift; sourceTree = ""; }; 50EB8CBD1AE89ED8001AC1EE /* ChatLeftVideoCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ChatLeftVideoCell.swift; path = Views/Cells/ChatLeftVideo/ChatLeftVideoCell.swift; sourceTree = ""; }; @@ -765,6 +767,7 @@ 503ED23B1B8ADCED0072187D /* BlackList */, 50B38FCD1B6B37F90064C132 /* Feedback */, 50E3488F1B905C0700A8E699 /* About */, + 50E348971B93E9FB00A8E699 /* Pods */, 0A1CAC6C1AFA3D8C00826B45 /* SkillHome */, 507CF1691AFC84AA00E261B4 /* CustomNavigationBar */, 0A9018831B0120A800AE4B7F /* OAuth */, @@ -1544,6 +1547,14 @@ name = About; sourceTree = ""; }; + 50E348971B93E9FB00A8E699 /* Pods */ = { + isa = PBXGroup; + children = ( + 50E348951B93E9F200A8E699 /* PodsViewController.swift */, + ); + name = Pods; + sourceTree = ""; + }; 50E61CEC1AF1F6A600908A9D /* ConversationTitle */ = { isa = PBXGroup; children = ( @@ -1906,6 +1917,7 @@ 502AE5311AB85067005BD199 /* RegisterPickMobileViewController.swift in Sources */, 506E241E1AE6391A00A33C1A /* TouchZoomButton.swift in Sources */, 508F8FDB1B0479E700461B0B /* SocialWorkInstagramViewController.swift in Sources */, + 50E348961B93E9F200A8E699 /* PodsViewController.swift in Sources */, 5099B9C91AB9A7CB002F940B /* CameraPreviewView.swift in Sources */, 502AE5581AB932D5005BD199 /* ProfileSectionHeaderReusableView.swift in Sources */, 508F8FDE1B049ACF00461B0B /* InstagramMediaCell.swift in Sources */, diff --git a/Yep/Base.lproj/Main.storyboard b/Yep/Base.lproj/Main.storyboard index ec53853a..0b6223dd 100644 --- a/Yep/Base.lproj/Main.storyboard +++ b/Yep/Base.lproj/Main.storyboard @@ -1155,7 +1155,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Yep/ViewControllers/About/AboutViewController.swift b/Yep/ViewControllers/About/AboutViewController.swift index 583325c1..c0442b9f 100644 --- a/Yep/ViewControllers/About/AboutViewController.swift +++ b/Yep/ViewControllers/About/AboutViewController.swift @@ -74,6 +74,8 @@ extension AboutViewController: UITableViewDataSource, UITableViewDelegate { tableView.deselectRowAtIndexPath(indexPath, animated: true) switch indexPath.row { + case 1: + performSegueWithIdentifier("showPods", sender: nil) case 3: UIApplication.sharedApplication().openURL(NSURL(string: YepConfig.termsURLString)!) default: From 0962f857c6d06ec7243e27ea30826ce890435758 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 10:26:13 +0800 Subject: [PATCH 09/22] rm --- Yep.xcodeproj/project.pbxproj | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Yep.xcodeproj/project.pbxproj b/Yep.xcodeproj/project.pbxproj index 328429e9..44b7961b 100644 --- a/Yep.xcodeproj/project.pbxproj +++ b/Yep.xcodeproj/project.pbxproj @@ -213,7 +213,6 @@ 50E3488E1B905C0100A8E699 /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E3488D1B905C0100A8E699 /* AboutViewController.swift */; }; 50E348921B9063A700A8E699 /* AboutCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E348901B9063A700A8E699 /* AboutCell.swift */; }; 50E348931B9063A700A8E699 /* AboutCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 50E348911B9063A700A8E699 /* AboutCell.xib */; }; - 50E348961B93E9F200A8E699 /* PodsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E348951B93E9F200A8E699 /* PodsViewController.swift */; }; 50E61CEB1AF1F69D00908A9D /* ConversationTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E61CEA1AF1F69D00908A9D /* ConversationTitleView.swift */; }; 50EB8C5E1AE78AB9001AC1EE /* YepAsset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50EB8C5D1AE78AB9001AC1EE /* YepAsset.swift */; }; 50EB8CBF1AE89ED8001AC1EE /* ChatLeftVideoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50EB8CBD1AE89ED8001AC1EE /* ChatLeftVideoCell.swift */; }; @@ -468,7 +467,6 @@ 50E3488D1B905C0100A8E699 /* AboutViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AboutViewController.swift; path = ViewControllers/About/AboutViewController.swift; sourceTree = ""; }; 50E348901B9063A700A8E699 /* AboutCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AboutCell.swift; path = Views/Cells/About/AboutCell.swift; sourceTree = ""; }; 50E348911B9063A700A8E699 /* AboutCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = AboutCell.xib; path = Views/Cells/About/AboutCell.xib; sourceTree = ""; }; - 50E348951B93E9F200A8E699 /* PodsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PodsViewController.swift; path = ViewControllers/Pods/PodsViewController.swift; sourceTree = ""; }; 50E61CEA1AF1F69D00908A9D /* ConversationTitleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ConversationTitleView.swift; path = Views/ConversationTitle/ConversationTitleView.swift; sourceTree = ""; }; 50EB8C5D1AE78AB9001AC1EE /* YepAsset.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = YepAsset.swift; path = Helpers/YepAsset.swift; sourceTree = ""; }; 50EB8CBD1AE89ED8001AC1EE /* ChatLeftVideoCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ChatLeftVideoCell.swift; path = Views/Cells/ChatLeftVideo/ChatLeftVideoCell.swift; sourceTree = ""; }; @@ -767,7 +765,6 @@ 503ED23B1B8ADCED0072187D /* BlackList */, 50B38FCD1B6B37F90064C132 /* Feedback */, 50E3488F1B905C0700A8E699 /* About */, - 50E348971B93E9FB00A8E699 /* Pods */, 0A1CAC6C1AFA3D8C00826B45 /* SkillHome */, 507CF1691AFC84AA00E261B4 /* CustomNavigationBar */, 0A9018831B0120A800AE4B7F /* OAuth */, @@ -1547,14 +1544,6 @@ name = About; sourceTree = ""; }; - 50E348971B93E9FB00A8E699 /* Pods */ = { - isa = PBXGroup; - children = ( - 50E348951B93E9F200A8E699 /* PodsViewController.swift */, - ); - name = Pods; - sourceTree = ""; - }; 50E61CEC1AF1F6A600908A9D /* ConversationTitle */ = { isa = PBXGroup; children = ( @@ -1917,7 +1906,6 @@ 502AE5311AB85067005BD199 /* RegisterPickMobileViewController.swift in Sources */, 506E241E1AE6391A00A33C1A /* TouchZoomButton.swift in Sources */, 508F8FDB1B0479E700461B0B /* SocialWorkInstagramViewController.swift in Sources */, - 50E348961B93E9F200A8E699 /* PodsViewController.swift in Sources */, 5099B9C91AB9A7CB002F940B /* CameraPreviewView.swift in Sources */, 502AE5581AB932D5005BD199 /* ProfileSectionHeaderReusableView.swift in Sources */, 508F8FDE1B049ACF00461B0B /* InstagramMediaCell.swift in Sources */, From bf4228d0466ef1f70721dac7e94b8c847213362a Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 10:38:19 +0800 Subject: [PATCH 10/22] use PodsHelpYepViewController for git; add datasource --- Yep.xcodeproj/project.pbxproj | 12 ++ Yep/Base.lproj/Main.storyboard | 10 +- .../About/AboutViewController.swift | 2 +- .../PodsHelpYepViewController.swift | 149 ++++++++++++++++++ 4 files changed, 167 insertions(+), 6 deletions(-) create mode 100644 Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift diff --git a/Yep.xcodeproj/project.pbxproj b/Yep.xcodeproj/project.pbxproj index 44b7961b..b9ea08d0 100644 --- a/Yep.xcodeproj/project.pbxproj +++ b/Yep.xcodeproj/project.pbxproj @@ -142,6 +142,7 @@ 5076FC5A1AF9DF6B00D7381A /* ConversationMessagePreviewTransitionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5076FC591AF9DF6B00D7381A /* ConversationMessagePreviewTransitionManager.swift */; }; 507CF1681AFC84A500E261B4 /* CustomNavigationBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 507CF1671AFC84A500E261B4 /* CustomNavigationBarViewController.swift */; }; 507F65F71B2EBC2700A35FDC /* MediaPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 507F65F61B2EBC2700A35FDC /* MediaPreviewView.swift */; }; + 5080EB1C1B93F43A006F3C2D /* PodsHelpYepViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5080EB1B1B93F43A006F3C2D /* PodsHelpYepViewController.swift */; }; 50894CF11AEA4726000981AF /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50894CF01AEA4726000981AF /* SettingsViewController.swift */; }; 50894CF51AEA4A01000981AF /* SettingsUserCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50894CF31AEA4A01000981AF /* SettingsUserCell.swift */; }; 50894CF61AEA4A01000981AF /* SettingsUserCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 50894CF41AEA4A01000981AF /* SettingsUserCell.xib */; }; @@ -396,6 +397,7 @@ 5076FC591AF9DF6B00D7381A /* ConversationMessagePreviewTransitionManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ConversationMessagePreviewTransitionManager.swift; path = ViewControllers/Conversation/ConversationMessagePreviewTransitionManager.swift; sourceTree = ""; }; 507CF1671AFC84A500E261B4 /* CustomNavigationBarViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CustomNavigationBarViewController.swift; path = ViewControllers/CustomNavigationBar/CustomNavigationBarViewController.swift; sourceTree = ""; }; 507F65F61B2EBC2700A35FDC /* MediaPreviewView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MediaPreviewView.swift; path = Views/Media/MediaPreviewView.swift; sourceTree = ""; }; + 5080EB1B1B93F43A006F3C2D /* PodsHelpYepViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PodsHelpYepViewController.swift; path = ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift; sourceTree = ""; }; 50894CF01AEA4726000981AF /* SettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SettingsViewController.swift; path = ViewControllers/Settings/SettingsViewController.swift; sourceTree = ""; }; 50894CF31AEA4A01000981AF /* SettingsUserCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SettingsUserCell.swift; path = Views/Cells/SettingsUser/SettingsUserCell.swift; sourceTree = ""; }; 50894CF41AEA4A01000981AF /* SettingsUserCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = SettingsUserCell.xib; path = Views/Cells/SettingsUser/SettingsUserCell.xib; sourceTree = ""; }; @@ -765,6 +767,7 @@ 503ED23B1B8ADCED0072187D /* BlackList */, 50B38FCD1B6B37F90064C132 /* Feedback */, 50E3488F1B905C0700A8E699 /* About */, + 5080EB1D1B93F440006F3C2D /* PodsHelpYep */, 0A1CAC6C1AFA3D8C00826B45 /* SkillHome */, 507CF1691AFC84AA00E261B4 /* CustomNavigationBar */, 0A9018831B0120A800AE4B7F /* OAuth */, @@ -1255,6 +1258,14 @@ name = CustomNavigationBar; sourceTree = ""; }; + 5080EB1D1B93F440006F3C2D /* PodsHelpYep */ = { + isa = PBXGroup; + children = ( + 5080EB1B1B93F43A006F3C2D /* PodsHelpYepViewController.swift */, + ); + name = PodsHelpYep; + sourceTree = ""; + }; 50894CF21AEA472B000981AF /* Settings */ = { isa = PBXGroup; children = ( @@ -1940,6 +1951,7 @@ 503ED23A1B8ADCE70072187D /* BlackListViewController.swift in Sources */, 502AE51B1AB70DDB005BD199 /* WelcomeViewController.swift in Sources */, 50894D071AEDFDA2000981AF /* EditProfileMoreInfoCell.swift in Sources */, + 5080EB1C1B93F43A006F3C2D /* PodsHelpYepViewController.swift in Sources */, 0A1CAC731AFA526200826B45 /* SkillHomeSectionButton.swift in Sources */, 50B38FCC1B6B37F00064C132 /* FeedbackViewController.swift in Sources */, 507F65F71B2EBC2700A35FDC /* MediaPreviewView.swift in Sources */, diff --git a/Yep/Base.lproj/Main.storyboard b/Yep/Base.lproj/Main.storyboard index 0b6223dd..1a503cd0 100644 --- a/Yep/Base.lproj/Main.storyboard +++ b/Yep/Base.lproj/Main.storyboard @@ -78,7 +78,7 @@ - + - + @@ -1193,17 +1193,17 @@ - + - + - + diff --git a/Yep/ViewControllers/About/AboutViewController.swift b/Yep/ViewControllers/About/AboutViewController.swift index c0442b9f..fe40959e 100644 --- a/Yep/ViewControllers/About/AboutViewController.swift +++ b/Yep/ViewControllers/About/AboutViewController.swift @@ -75,7 +75,7 @@ extension AboutViewController: UITableViewDataSource, UITableViewDelegate { switch indexPath.row { case 1: - performSegueWithIdentifier("showPods", sender: nil) + performSegueWithIdentifier("showPodsHelpYep", sender: nil) case 3: UIApplication.sharedApplication().openURL(NSURL(string: YepConfig.termsURLString)!) default: diff --git a/Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift b/Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift new file mode 100644 index 00000000..5cd89485 --- /dev/null +++ b/Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift @@ -0,0 +1,149 @@ +// +// PodsHelpYepViewController.swift +// Yep +// +// Created by nixzhu on 15/8/31. +// Copyright (c) 2015年 Catch Inc. All rights reserved. +// + +import UIKit + +class PodsHelpYepViewController: UITableViewController { + + let pods: [[String: String]] = [ + [ + "name": "RealmSwift", + "URLString": "https://realm.io", + ], + [ + "name": "MZFayeClient", + "URLString": "https://github.com/m1entus/MZFayeClient", + ], + [ + "name": "Proposer", + "URLString": "https://github.com/nixzhu/Proposer", + ], + [ + "name": "KeyboardMan", + "URLString": "https://github.com/nixzhu/KeyboardMan", + ], + [ + "name": "Ruler", + "URLString": "https://github.com/nixzhu/Ruler", + ], + [ + "name": "APAddressBook/Swift", + "URLString": "https://github.com/Alterplay/APAddressBook", + ], + [ + "name": "1PasswordExtension", + "URLString": "https://github.com/AgileBits/onepassword-app-extension", + ], + [ + "name": "Kingfisher", + "URLString": "https://github.com/onevcat/Kingfisher", + ], + [ + "name": "FXBlurView", + "URLString": "https://github.com/nicklockwood/FXBlurView", + ], + [ + "name": "TPKeyboardAvoiding", + "URLString": "https://github.com/michaeltyson/TPKeyboardAvoidin", + ], + [ + "name": "DeviceGuru", + "URLString": "https://github.com/InderKumarRathore/DeviceGuru", + ], + [ + "name": "AFNetworking", + "URLString": "https://github.com/AFNetworking/AFNetworkin", + ], + [ + "name": "pop", + "URLString": "https://github.com/facebook/pop", + ], + ] + + override func viewDidLoad() { + super.viewDidLoad() + + title = NSLocalizedString("Pods", comment: "") + + tableView.tableFooterView = UIView() + + + // Uncomment the following line to preserve selection between presentations + // self.clearsSelectionOnViewWillAppear = false + + // Uncomment the following line to display an Edit button in the navigation bar for this view controller. + // self.navigationItem.rightBarButtonItem = self.editButtonItem() + } + + // MARK: - Table view data source + + override func numberOfSectionsInTableView(tableView: UITableView) -> Int { + return 1 + } + + override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return pods.count + } + + override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCellWithIdentifier("PodCell", forIndexPath: indexPath) as! UITableViewCell + + let pod = pods[indexPath.row] + + cell.textLabel?.text = pod["name"] + + return cell + } + + /* + // Override to support conditional editing of the table view. + override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { + // Return NO if you do not want the specified item to be editable. + return true + } + */ + + /* + // Override to support editing the table view. + override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { + if editingStyle == .Delete { + // Delete the row from the data source + tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade) + } else if editingStyle == .Insert { + // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view + } + } + */ + + /* + // Override to support rearranging the table view. + override func tableView(tableView: UITableView, moveRowAtIndexPath fromIndexPath: NSIndexPath, toIndexPath: NSIndexPath) { + + } + */ + + /* + // Override to support conditional rearranging of the table view. + override func tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -> Bool { + // Return NO if you do not want the item to be re-orderable. + return true + } + */ + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. + } + */ + +} + From 3f39d00b04832ee6f6d6a0952c5283e59b34e11d Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 10:44:12 +0800 Subject: [PATCH 11/22] open pod URL --- Yep/Base.lproj/Main.storyboard | 4 ++-- .../PodsHelpYep/PodsHelpYepViewController.swift | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Yep/Base.lproj/Main.storyboard b/Yep/Base.lproj/Main.storyboard index 1a503cd0..cfad2995 100644 --- a/Yep/Base.lproj/Main.storyboard +++ b/Yep/Base.lproj/Main.storyboard @@ -78,7 +78,7 @@ - + - + diff --git a/Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift b/Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift index 5cd89485..b3fbe5ff 100644 --- a/Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift +++ b/Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift @@ -100,6 +100,18 @@ class PodsHelpYepViewController: UITableViewController { return cell } + override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { + tableView.deselectRowAtIndexPath(indexPath, animated: true) + + let pod = pods[indexPath.row] + + if let + URLString = pod["URLString"], + URL = NSURL(string: URLString) { + UIApplication.sharedApplication().openURL(URL) + } + } + /* // Override to support conditional editing of the table view. override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { From 43d3c516ecc98b0c3ad3a81494eb7a987a54681f Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 10:48:41 +0800 Subject: [PATCH 12/22] clean code --- .../PodsHelpYepViewController.swift | 53 ------------------- 1 file changed, 53 deletions(-) diff --git a/Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift b/Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift index b3fbe5ff..8d8776ab 100644 --- a/Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift +++ b/Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift @@ -71,13 +71,6 @@ class PodsHelpYepViewController: UITableViewController { title = NSLocalizedString("Pods", comment: "") tableView.tableFooterView = UIView() - - - // Uncomment the following line to preserve selection between presentations - // self.clearsSelectionOnViewWillAppear = false - - // Uncomment the following line to display an Edit button in the navigation bar for this view controller. - // self.navigationItem.rightBarButtonItem = self.editButtonItem() } // MARK: - Table view data source @@ -111,51 +104,5 @@ class PodsHelpYepViewController: UITableViewController { UIApplication.sharedApplication().openURL(URL) } } - - /* - // Override to support conditional editing of the table view. - override func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool { - // Return NO if you do not want the specified item to be editable. - return true - } - */ - - /* - // Override to support editing the table view. - override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { - if editingStyle == .Delete { - // Delete the row from the data source - tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation: .Fade) - } else if editingStyle == .Insert { - // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view - } - } - */ - - /* - // Override to support rearranging the table view. - override func tableView(tableView: UITableView, moveRowAtIndexPath fromIndexPath: NSIndexPath, toIndexPath: NSIndexPath) { - - } - */ - - /* - // Override to support conditional rearranging of the table view. - override func tableView(tableView: UITableView, canMoveRowAtIndexPath indexPath: NSIndexPath) -> Bool { - // Return NO if you do not want the item to be re-orderable. - return true - } - */ - - /* - // MARK: - Navigation - - // In a storyboard-based application, you will often want to do a little preparation before navigation - override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - // Get the new view controller using [segue destinationViewController]. - // Pass the selected object to the new view controller. - } - */ - } From 59e40d81caffb214fda134e771a1a558be04e7d1 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 11:03:06 +0800 Subject: [PATCH 13/22] releaseVersionNumber & buildVersionNumber --- Yep.xcodeproj/project.pbxproj | 4 ++++ Yep/Extensions/NSBundle+Yep.swift | 20 +++++++++++++++++++ .../About/AboutViewController.swift | 6 ++++++ 3 files changed, 30 insertions(+) create mode 100644 Yep/Extensions/NSBundle+Yep.swift diff --git a/Yep.xcodeproj/project.pbxproj b/Yep.xcodeproj/project.pbxproj index b9ea08d0..8d157d29 100644 --- a/Yep.xcodeproj/project.pbxproj +++ b/Yep.xcodeproj/project.pbxproj @@ -143,6 +143,7 @@ 507CF1681AFC84A500E261B4 /* CustomNavigationBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 507CF1671AFC84A500E261B4 /* CustomNavigationBarViewController.swift */; }; 507F65F71B2EBC2700A35FDC /* MediaPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 507F65F61B2EBC2700A35FDC /* MediaPreviewView.swift */; }; 5080EB1C1B93F43A006F3C2D /* PodsHelpYepViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5080EB1B1B93F43A006F3C2D /* PodsHelpYepViewController.swift */; }; + 5080EB1F1B93F932006F3C2D /* NSBundle+Yep.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5080EB1E1B93F932006F3C2D /* NSBundle+Yep.swift */; }; 50894CF11AEA4726000981AF /* SettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50894CF01AEA4726000981AF /* SettingsViewController.swift */; }; 50894CF51AEA4A01000981AF /* SettingsUserCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50894CF31AEA4A01000981AF /* SettingsUserCell.swift */; }; 50894CF61AEA4A01000981AF /* SettingsUserCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 50894CF41AEA4A01000981AF /* SettingsUserCell.xib */; }; @@ -398,6 +399,7 @@ 507CF1671AFC84A500E261B4 /* CustomNavigationBarViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CustomNavigationBarViewController.swift; path = ViewControllers/CustomNavigationBar/CustomNavigationBarViewController.swift; sourceTree = ""; }; 507F65F61B2EBC2700A35FDC /* MediaPreviewView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MediaPreviewView.swift; path = Views/Media/MediaPreviewView.swift; sourceTree = ""; }; 5080EB1B1B93F43A006F3C2D /* PodsHelpYepViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PodsHelpYepViewController.swift; path = ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift; sourceTree = ""; }; + 5080EB1E1B93F932006F3C2D /* NSBundle+Yep.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSBundle+Yep.swift"; path = "Extensions/NSBundle+Yep.swift"; sourceTree = ""; }; 50894CF01AEA4726000981AF /* SettingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SettingsViewController.swift; path = ViewControllers/Settings/SettingsViewController.swift; sourceTree = ""; }; 50894CF31AEA4A01000981AF /* SettingsUserCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SettingsUserCell.swift; path = Views/Cells/SettingsUser/SettingsUserCell.swift; sourceTree = ""; }; 50894CF41AEA4A01000981AF /* SettingsUserCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = SettingsUserCell.xib; path = Views/Cells/SettingsUser/SettingsUserCell.xib; sourceTree = ""; }; @@ -829,6 +831,7 @@ 50B38FB61B69CD960064C132 /* Array+Yep.swift */, 50FA9A431B661698009BF2A0 /* UIViewController+Yep.swift */, 50E1D7281B870D7500D90A82 /* NSParagraphStyle+Yep.swift */, + 5080EB1E1B93F932006F3C2D /* NSBundle+Yep.swift */, ); name = Extensions; sourceTree = ""; @@ -1988,6 +1991,7 @@ 0AB8F79A1B15D1DC00F4AF09 /* YepNavigationController.swift in Sources */, 502AE53A1AB871C1005BD199 /* YepAlert.swift in Sources */, 5039594E1B05E6E000797A3E /* ProfileSocialAccountGithubCell.swift in Sources */, + 5080EB1F1B93F932006F3C2D /* NSBundle+Yep.swift in Sources */, 5053AD4D1AF79EEA00B3CBFA /* LocationPin.swift in Sources */, 50C0909D1ADE294800CC6389 /* RegisterPickSkillsLayout.swift in Sources */, 50E3488E1B905C0100A8E699 /* AboutViewController.swift in Sources */, diff --git a/Yep/Extensions/NSBundle+Yep.swift b/Yep/Extensions/NSBundle+Yep.swift new file mode 100644 index 00000000..bd394572 --- /dev/null +++ b/Yep/Extensions/NSBundle+Yep.swift @@ -0,0 +1,20 @@ +// +// NSBundle+Yep.swift +// Yep +// +// Created by nixzhu on 15/8/31. +// Copyright (c) 2015年 Catch Inc. All rights reserved. +// + +import Foundation + +extension NSBundle { + + static var releaseVersionNumber: String? { + return NSBundle.mainBundle().infoDictionary?["CFBundleShortVersionString"] as? String + } + + static var buildVersionNumber: String? { + return NSBundle.mainBundle().infoDictionary?["CFBundleVersion"] as? String + } +} \ No newline at end of file diff --git a/Yep/ViewControllers/About/AboutViewController.swift b/Yep/ViewControllers/About/AboutViewController.swift index fe40959e..aac46fe8 100644 --- a/Yep/ViewControllers/About/AboutViewController.swift +++ b/Yep/ViewControllers/About/AboutViewController.swift @@ -34,6 +34,12 @@ class AboutViewController: UIViewController { title = NSLocalizedString("About", comment: "") + if let + releaseVersionNumber = NSBundle.releaseVersionNumber, + buildVersionNumber = NSBundle.buildVersionNumber { + appVersionLabel.text = NSLocalizedString("Version", comment: "") + " " + releaseVersionNumber + " (\(buildVersionNumber))" + } + aboutTableView.registerNib(UINib(nibName: aboutCellID, bundle: nil), forCellReuseIdentifier: aboutCellID) aboutTableViewHeightConstraint.constant = rowHeight * CGFloat(aboutAnnotations.count) + 1 From 6baf925428f90b966e4f0b94b9ce8b09bdd0d922 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 11:13:28 +0800 Subject: [PATCH 14/22] trans in About --- Yep/en.lproj/Localizable.strings | 14 ++++++++++++++ Yep/zh-Hans.lproj/Localizable.strings | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/Yep/en.lproj/Localizable.strings b/Yep/en.lproj/Localizable.strings index 20fc551a..93df51a7 100644 --- a/Yep/en.lproj/Localizable.strings +++ b/Yep/en.lproj/Localizable.strings @@ -528,3 +528,17 @@ /* No comment provided by engineer. */ "You have blocked %@! Do you want to unblock him or her?" = "You have blocked %@! Do you want to unblock him or her?"; +/* No comment provided by engineer. */ +"About" = "About"; + +/* No comment provided by engineer. */ +"Pods help Yep" = "Pods help Yep"; + +/* No comment provided by engineer. */ +"Rate Yep on App Store" = "Rate Yep on App Store"; + +/* No comment provided by engineer. */ +"Terms of Service" = "Terms of Service"; + +/* No comment provided by engineer. */ +"Version" = "Version"; diff --git a/Yep/zh-Hans.lproj/Localizable.strings b/Yep/zh-Hans.lproj/Localizable.strings index 888e836f..ac1bc16c 100644 --- a/Yep/zh-Hans.lproj/Localizable.strings +++ b/Yep/zh-Hans.lproj/Localizable.strings @@ -530,3 +530,17 @@ /* No comment provided by engineer. */ "You have blocked %@! Do you want to unblock him or her?" = "您已屏蔽“%@”!您要解除对他或她的屏蔽吗?"; +/* No comment provided by engineer. */ +"About" = "关于"; + +/* No comment provided by engineer. */ +"Pods help Yep" = "Yep 使用的第三方库"; + +/* No comment provided by engineer. */ +"Rate Yep on App Store" = "在 App Store 上对 Yep 评分"; + +/* No comment provided by engineer. */ +"Terms of Service" = "服务条款"; + +/* No comment provided by engineer. */ +"Version" = "版本"; From daa9453f5c8556b7f30795c451ffc8058ef527d3 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 11:17:23 +0800 Subject: [PATCH 15/22] trans of "Meet with genius" --- .../Register/RegisterPickNameViewController.swift | 2 +- Yep/en.lproj/Localizable.strings | 3 +++ Yep/zh-Hans.lproj/Localizable.strings | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Yep/ViewControllers/Register/RegisterPickNameViewController.swift b/Yep/ViewControllers/Register/RegisterPickNameViewController.swift index 41afcbbc..2990e3d5 100644 --- a/Yep/ViewControllers/Register/RegisterPickNameViewController.swift +++ b/Yep/ViewControllers/Register/RegisterPickNameViewController.swift @@ -79,7 +79,7 @@ class RegisterPickNameViewController: BaseViewController { override func viewDidAppear(animated: Bool) { super.viewDidAppear(animated) - //nameTextField.becomeFirstResponder() + nameTextField.becomeFirstResponder() } // MARK: Actions diff --git a/Yep/en.lproj/Localizable.strings b/Yep/en.lproj/Localizable.strings index 93df51a7..25e00228 100644 --- a/Yep/en.lproj/Localizable.strings +++ b/Yep/en.lproj/Localizable.strings @@ -239,6 +239,9 @@ /* No comment provided by engineer. */ "Meet" = "Meet"; +/* No comment provided by engineer. */ +"Meet with genius" = "Meet with genius"; + /* No comment provided by engineer. */ "Mute" = "Mute"; diff --git a/Yep/zh-Hans.lproj/Localizable.strings b/Yep/zh-Hans.lproj/Localizable.strings index ac1bc16c..a4e3c9f9 100644 --- a/Yep/zh-Hans.lproj/Localizable.strings +++ b/Yep/zh-Hans.lproj/Localizable.strings @@ -241,6 +241,9 @@ /* No comment provided by engineer. */ "Meet" = "见面"; +/* No comment provided by engineer. */ +"Meet with genius" = "与天才相遇"; + /* No comment provided by engineer. */ "Mute" = "静音"; From 0c8c53cd59de5b8c68b4aedbd8dc568c960be8e9 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 11:31:30 +0800 Subject: [PATCH 16/22] trans --- Yep/zh-Hans.lproj/Localizable.strings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Yep/zh-Hans.lproj/Localizable.strings b/Yep/zh-Hans.lproj/Localizable.strings index a4e3c9f9..78ddcd90 100644 --- a/Yep/zh-Hans.lproj/Localizable.strings +++ b/Yep/zh-Hans.lproj/Localizable.strings @@ -537,7 +537,7 @@ "About" = "关于"; /* No comment provided by engineer. */ -"Pods help Yep" = "Yep 使用的第三方库"; +"Pods help Yep" = "Yep 使用的第三方 Pods"; /* No comment provided by engineer. */ "Rate Yep on App Store" = "在 App Store 上对 Yep 评分"; From 874770bfc4d16d7867e32bcc93313845be38aa78 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 11:35:48 +0800 Subject: [PATCH 17/22] appName color --- Yep/ViewControllers/About/AboutViewController.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Yep/ViewControllers/About/AboutViewController.swift b/Yep/ViewControllers/About/AboutViewController.swift index aac46fe8..7e14c4bb 100644 --- a/Yep/ViewControllers/About/AboutViewController.swift +++ b/Yep/ViewControllers/About/AboutViewController.swift @@ -34,6 +34,8 @@ class AboutViewController: UIViewController { title = NSLocalizedString("About", comment: "") + appNameLabel.textColor = UIColor.yepTintColor() + if let releaseVersionNumber = NSBundle.releaseVersionNumber, buildVersionNumber = NSBundle.buildVersionNumber { From 9d8224126cf60fa696984903a48f4bac27c5dec3 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 11:37:43 +0800 Subject: [PATCH 18/22] not print dribbbleData --- Yep/Services/YepService.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Yep/Services/YepService.swift b/Yep/Services/YepService.swift index 99dbbfc6..1b120824 100644 --- a/Yep/Services/YepService.swift +++ b/Yep/Services/YepService.swift @@ -2141,7 +2141,7 @@ func dribbbleWorkOfUserWithUserID(userID: String, #failureHandler: ((Reason, Str let parse: JSONDictionary -> DribbbleWork? = { data in - println("dribbbleData:\(data)") + //println("dribbbleData:\(data)") if let shotsData = data["shots"] as? [JSONDictionary], From 37694c616a097d78487e19dbd3cfc9d028847853 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 11:43:26 +0800 Subject: [PATCH 19/22] =?UTF-8?q?=E7=BB=9F=E4=B8=80=20Profile=20=E4=B8=BA?= =?UTF-8?q?=20=E2=80=9C=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=E2=80=9D?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=97=B6=E8=A6=81=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yep/zh-Hans.lproj/Localizable.strings | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Yep/zh-Hans.lproj/Localizable.strings b/Yep/zh-Hans.lproj/Localizable.strings index 78ddcd90..f02e5b5b 100644 --- a/Yep/zh-Hans.lproj/Localizable.strings +++ b/Yep/zh-Hans.lproj/Localizable.strings @@ -141,7 +141,7 @@ "Done" = "完成"; /* No comment provided by engineer. */ -"Edit Profile" = "编辑个人简介"; +"Edit Profile" = "编辑个人主页"; /* No comment provided by engineer. */ "Enable Do Not Disturb failed!" = "开启“免打扰”失败"; @@ -477,7 +477,7 @@ "User authentication error, you need to login again!" = "用户验证错误,您需要重新登录!"; /* No comment provided by engineer. */ -"View profile" = "查看个人简介"; +"View profile" = "查看个人主页"; /* No comment provided by engineer. */ "Wait too long, the operation may not be completed." = "等待较久,操作可能未完成!"; From f8d14964b70904b799747ecef892cddf882714e9 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 11:55:16 +0800 Subject: [PATCH 20/22] remove duplicate trans of "About"; --- Yep/en.lproj/Localizable.strings | 3 --- Yep/zh-Hans.lproj/Localizable.strings | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/Yep/en.lproj/Localizable.strings b/Yep/en.lproj/Localizable.strings index 25e00228..7061da88 100644 --- a/Yep/en.lproj/Localizable.strings +++ b/Yep/en.lproj/Localizable.strings @@ -531,9 +531,6 @@ /* No comment provided by engineer. */ "You have blocked %@! Do you want to unblock him or her?" = "You have blocked %@! Do you want to unblock him or her?"; -/* No comment provided by engineer. */ -"About" = "About"; - /* No comment provided by engineer. */ "Pods help Yep" = "Pods help Yep"; diff --git a/Yep/zh-Hans.lproj/Localizable.strings b/Yep/zh-Hans.lproj/Localizable.strings index f02e5b5b..44bc16cd 100644 --- a/Yep/zh-Hans.lproj/Localizable.strings +++ b/Yep/zh-Hans.lproj/Localizable.strings @@ -16,7 +16,7 @@ "[Image]" = "[图片]"; /* No comment provided by engineer. */ -"[Location]" = "[地点]"; +"[Location]" = "[位置]"; /* No comment provided by engineer. */ "[Video]" = "[视频]"; @@ -533,9 +533,6 @@ /* No comment provided by engineer. */ "You have blocked %@! Do you want to unblock him or her?" = "您已屏蔽“%@”!您要解除对他或她的屏蔽吗?"; -/* No comment provided by engineer. */ -"About" = "关于"; - /* No comment provided by engineer. */ "Pods help Yep" = "Yep 使用的第三方 Pods"; From 29fd754466c8757e144583f227094a693cedd2d4 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 15:35:31 +0800 Subject: [PATCH 21/22] yep icon in About --- Yep/Base.lproj/Main.storyboard | 16 ++++++++-------- Yep/Images.xcassets/fans.imageset/fans.pdf | Bin 4304 -> 0 bytes .../Contents.json | 5 ++--- .../yep_icon_solo.imageset/yep_icon_solo.pdf | Bin 0 -> 7220 bytes Yep/Views/Cells/About/AboutCell.xib | 2 +- 5 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 Yep/Images.xcassets/fans.imageset/fans.pdf rename Yep/Images.xcassets/{fans.imageset => yep_icon_solo.imageset}/Contents.json (50%) create mode 100644 Yep/Images.xcassets/yep_icon_solo.imageset/yep_icon_solo.pdf diff --git a/Yep/Base.lproj/Main.storyboard b/Yep/Base.lproj/Main.storyboard index cfad2995..8db7f97b 100644 --- a/Yep/Base.lproj/Main.storyboard +++ b/Yep/Base.lproj/Main.storyboard @@ -1139,7 +1139,7 @@ - + @@ -1149,23 +1149,23 @@ - - + + @@ -1955,7 +1955,6 @@ - @@ -1973,6 +1972,7 @@ + diff --git a/Yep/Images.xcassets/fans.imageset/fans.pdf b/Yep/Images.xcassets/fans.imageset/fans.pdf deleted file mode 100644 index 5e13e7f6c4591016c98ec70d164220c1d5491e0e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4304 zcmai&2{e@L`^N{9Wk@PZq#9mJN@m8G!CThBkjhpu_L(sl+Z1DoCX^*2TN;!tB4nvi zgt4zFL-q>EmXMSXCcl}M|6Bjxd(Q7U_nGIO>$&dhy3h4|?{hxaBWtQ>a0I3V2gx>1 zeVUrf|D4s`+zL_wL%}4R8|c_EFysWm%Z2O;MzBogV2A_7 z_5kkHlgC!aKp6#qqlH?4jP|y(RQrzGk*8oUT6~@y`KUf9RGHWHoEtrRT(^7p<&aBF z($W08!#>Y>f`$vZxmt7E8vXW%Jw(57>QPBIowL0n(5W#G7)+EI?@965*QjyHBPde> z?o4S{3v%6aIM&5-277Rmwz0r{GTw2@e6nK}|46RO{pNF-%-6!VW2mSk{cI0qWrcwI zL{Z^}n_j#7>J=^3k@D37?-b{`hRo(?MItGMLbWIDk&?AmS=r*Jr0Q36DxS;9WbEOG zTrY#QgYfX)4lWgxHu0R1>}#_%#E8TpjCMAysR?`ap}~DuJqRFPv@<%Sn%`zOa&fCW zD_N(=cvo>os%c(jnUjCbe%X&0g{&Tzh>(Xgr53_keG#hYa=YUJoasP!`J;Js z&ME1Upp9%Z5v3u8fmqy^gIRIax$Pz~_<+)K%$i54=@?XMhkG}!aVFuLS5|}vasNU)z#$Mo=%9U)VMf^;N|pFAFLT$R%|VOzr*3|hwQ2HZ;Cs8;T!=B zF~z!k|Mez#k-_jE>N6+!kbJ%I1RpT+hXF_9Ai{>;K&^-I^L-Xy#Qfef}`rP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@b7h@9j^d>?;}wOQ4n>&J4B4A)t;2!VP^Jh*g%4L~3vJ)stYcI?%8B zdqrLp3Wf-QuL(lH!cZtw!~_iH#{T~4i4z)56e+AeV&!3pJq>{#E0A*7Ll87}PVzYM z;iylX0PbS-`~QFG9^P&!YXBGs6$XI+`~kv+gan0v*1%&M90tRRDYze?^N9^CBzVdO zhk~&o{LK%Hd#wD;CWI4G|7L^3PWiz^;HPY0VZl>lK(Lwmdw&oJ_*7ds1b%8Zt+HuxzU1S*6@;$P!{z` - + From 0cf10852c40cbe051e96c5a7c712584983bf2966 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 31 Aug 2015 15:52:27 +0800 Subject: [PATCH 22/22] adjust About UI for iPhones --- Yep/Base.lproj/Main.storyboard | 2 ++ Yep/ViewControllers/About/AboutViewController.swift | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Yep/Base.lproj/Main.storyboard b/Yep/Base.lproj/Main.storyboard index 8db7f97b..f83237e7 100644 --- a/Yep/Base.lproj/Main.storyboard +++ b/Yep/Base.lproj/Main.storyboard @@ -1190,7 +1190,9 @@ + + diff --git a/Yep/ViewControllers/About/AboutViewController.swift b/Yep/ViewControllers/About/AboutViewController.swift index 7e14c4bb..b33923eb 100644 --- a/Yep/ViewControllers/About/AboutViewController.swift +++ b/Yep/ViewControllers/About/AboutViewController.swift @@ -7,11 +7,15 @@ // import UIKit +import Ruler class AboutViewController: UIViewController { @IBOutlet weak var appLogoImageView: UIImageView! + @IBOutlet weak var appLogoImageViewTopConstraint: NSLayoutConstraint! + @IBOutlet weak var appNameLabel: UILabel! + @IBOutlet weak var appNameLabelTopConstraint: NSLayoutConstraint! @IBOutlet weak var appVersionLabel: UILabel! @IBOutlet weak var aboutTableView: UITableView! @@ -21,7 +25,7 @@ class AboutViewController: UIViewController { let aboutCellID = "AboutCell" - let rowHeight: CGFloat = 60 + let rowHeight: CGFloat = Ruler.match(.iPhoneHeights(50, 60, 60, 60)) let aboutAnnotations: [String] = [ NSLocalizedString("Pods help Yep", comment: ""), @@ -34,6 +38,9 @@ class AboutViewController: UIViewController { title = NSLocalizedString("About", comment: "") + appLogoImageViewTopConstraint.constant = Ruler.match(.iPhoneHeights(0, 20, 40, 60)) + appNameLabelTopConstraint.constant = Ruler.match(.iPhoneHeights(10, 20, 20, 20)) + appNameLabel.textColor = UIColor.yepTintColor() if let