diff --git a/Yep.xcodeproj/project.pbxproj b/Yep.xcodeproj/project.pbxproj index de5eef51..8d157d29 100644 --- a/Yep.xcodeproj/project.pbxproj +++ b/Yep.xcodeproj/project.pbxproj @@ -142,6 +142,8 @@ 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 */; }; + 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 */; }; @@ -210,6 +212,9 @@ 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 */; }; + 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 */; }; @@ -393,6 +398,8 @@ 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 = ""; }; + 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 = ""; }; @@ -461,6 +468,9 @@ 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 = ""; }; + 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 = ""; }; @@ -758,6 +768,8 @@ 50A640ED1B6F4E480050E4A3 /* DoNotDisturbPeriod */, 503ED23B1B8ADCED0072187D /* BlackList */, 50B38FCD1B6B37F90064C132 /* Feedback */, + 50E3488F1B905C0700A8E699 /* About */, + 5080EB1D1B93F440006F3C2D /* PodsHelpYep */, 0A1CAC6C1AFA3D8C00826B45 /* SkillHome */, 507CF1691AFC84AA00E261B4 /* CustomNavigationBar */, 0A9018831B0120A800AE4B7F /* OAuth */, @@ -819,6 +831,7 @@ 50B38FB61B69CD960064C132 /* Array+Yep.swift */, 50FA9A431B661698009BF2A0 /* UIViewController+Yep.swift */, 50E1D7281B870D7500D90A82 /* NSParagraphStyle+Yep.swift */, + 5080EB1E1B93F932006F3C2D /* NSBundle+Yep.swift */, ); name = Extensions; sourceTree = ""; @@ -894,6 +907,7 @@ 508F8FE01B049AD400461B0B /* InstagramMedia */, 5064F6561B0B0E1B0089FAD4 /* AddFriendSearch */, 5064F65B1B0B14470089FAD4 /* AddFriendMore */, + 50E348941B9063AD00A8E699 /* About */, ); name = Cells; sourceTree = ""; @@ -1247,6 +1261,14 @@ name = CustomNavigationBar; sourceTree = ""; }; + 5080EB1D1B93F440006F3C2D /* PodsHelpYep */ = { + isa = PBXGroup; + children = ( + 5080EB1B1B93F43A006F3C2D /* PodsHelpYepViewController.swift */, + ); + name = PodsHelpYep; + sourceTree = ""; + }; 50894CF21AEA472B000981AF /* Settings */ = { isa = PBXGroup; children = ( @@ -1519,6 +1541,23 @@ name = SayHi; sourceTree = ""; }; + 50E3488F1B905C0700A8E699 /* About */ = { + isa = PBXGroup; + children = ( + 50E3488D1B905C0100A8E699 /* AboutViewController.swift */, + ); + name = About; + sourceTree = ""; + }; + 50E348941B9063AD00A8E699 /* About */ = { + isa = PBXGroup; + children = ( + 50E348901B9063A700A8E699 /* AboutCell.swift */, + 50E348911B9063A700A8E699 /* AboutCell.xib */, + ); + name = About; + sourceTree = ""; + }; 50E61CEC1AF1F6A600908A9D /* ConversationTitle */ = { isa = PBXGroup; children = ( @@ -1746,6 +1785,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 */, @@ -1914,6 +1954,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 */, @@ -1950,12 +1991,15 @@ 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 */, 502AE52E1AB83879005BD199 /* UnderLineTextField.swift in Sources */, 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 101929a0..f83237e7 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,117 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1172,7 +1283,7 @@ - + @@ -1423,7 +1534,7 @@ - + @@ -1863,6 +1974,7 @@ + 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/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/Images.xcassets/fans.imageset/fans.pdf b/Yep/Images.xcassets/fans.imageset/fans.pdf deleted file mode 100644 index 5e13e7f6..00000000 Binary files a/Yep/Images.xcassets/fans.imageset/fans.pdf and /dev/null differ diff --git a/Yep/Images.xcassets/fans.imageset/Contents.json b/Yep/Images.xcassets/yep_icon_solo.imageset/Contents.json similarity index 50% rename from Yep/Images.xcassets/fans.imageset/Contents.json rename to Yep/Images.xcassets/yep_icon_solo.imageset/Contents.json index 6f452b70..fdc72aeb 100644 --- a/Yep/Images.xcassets/fans.imageset/Contents.json +++ b/Yep/Images.xcassets/yep_icon_solo.imageset/Contents.json @@ -2,12 +2,11 @@ "images" : [ { "idiom" : "universal", - "filename" : "fans.pdf" + "filename" : "yep_icon_solo.pdf" } ], "info" : { "version" : 1, - "author" : "xcode", - "template-rendering-intent" : "template" + "author" : "xcode" } } \ No newline at end of file diff --git a/Yep/Images.xcassets/yep_icon_solo.imageset/yep_icon_solo.pdf b/Yep/Images.xcassets/yep_icon_solo.imageset/yep_icon_solo.pdf new file mode 100644 index 00000000..f5a42fca Binary files /dev/null and b/Yep/Images.xcassets/yep_icon_solo.imageset/yep_icon_solo.pdf differ 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], diff --git a/Yep/ViewControllers/About/AboutViewController.swift b/Yep/ViewControllers/About/AboutViewController.swift new file mode 100644 index 00000000..b33923eb --- /dev/null +++ b/Yep/ViewControllers/About/AboutViewController.swift @@ -0,0 +1,101 @@ +// +// AboutViewController.swift +// Yep +// +// Created by nixzhu on 15/8/28. +// Copyright (c) 2015年 Catch Inc. All rights reserved. +// + +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! + @IBOutlet weak var aboutTableViewHeightConstraint: NSLayoutConstraint! + + @IBOutlet weak var copyrightLabel: UILabel! + + let aboutCellID = "AboutCell" + + let rowHeight: CGFloat = Ruler.match(.iPhoneHeights(50, 60, 60, 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() + + 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 + 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 + } +} + +// MARK: - UITableViewDataSource, UITableViewDelegate + +extension AboutViewController: UITableViewDataSource, UITableViewDelegate { + + func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return aboutAnnotations.count + 1 + } + + 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 + } + } + + func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { + tableView.deselectRowAtIndexPath(indexPath, animated: true) + + switch indexPath.row { + case 1: + performSegueWithIdentifier("showPodsHelpYep", sender: nil) + case 3: + UIApplication.sharedApplication().openURL(NSURL(string: YepConfig.termsURLString)!) + default: + break + } + } +} + diff --git a/Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift b/Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift new file mode 100644 index 00000000..8d8776ab --- /dev/null +++ b/Yep/ViewControllers/PodsHelpYep/PodsHelpYepViewController.swift @@ -0,0 +1,108 @@ +// +// 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() + } + + // 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 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) + } + } +} + diff --git a/Yep/ViewControllers/Register/RegisterPickNameViewController.swift b/Yep/ViewControllers/Register/RegisterPickNameViewController.swift index b14a4487..2990e3d5 100644 --- a/Yep/ViewControllers/Register/RegisterPickNameViewController.swift +++ b/Yep/ViewControllers/Register/RegisterPickNameViewController.swift @@ -79,13 +79,13 @@ class RegisterPickNameViewController: BaseViewController { override func viewDidAppear(animated: Bool) { super.viewDidAppear(animated) - //nameTextField.becomeFirstResponder() + nameTextField.becomeFirstResponder() } // MARK: Actions func tapTerms() { - UIApplication.sharedApplication().openURL(NSURL(string: "http://soyep.com/privacy")!) + UIApplication.sharedApplication().openURL(NSURL(string: YepConfig.termsURLString)!) } func textFieldDidChange(textField: UITextField) { 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", ], ] diff --git a/Yep/Views/Cells/About/AboutCell.swift b/Yep/Views/Cells/About/AboutCell.swift new file mode 100644 index 00000000..9a885433 --- /dev/null +++ b/Yep/Views/Cells/About/AboutCell.swift @@ -0,0 +1,28 @@ +// +// 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() + + accessoryImageView.tintColor = UIColor.lightGrayColor() + } + + 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..46959dd7 --- /dev/null +++ b/Yep/Views/Cells/About/AboutCell.xib @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Yep/en.lproj/Localizable.strings b/Yep/en.lproj/Localizable.strings index 20fc551a..7061da88 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"; @@ -528,3 +531,14 @@ /* 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. */ +"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..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]" = "[视频]"; @@ -141,7 +141,7 @@ "Done" = "完成"; /* No comment provided by engineer. */ -"Edit Profile" = "编辑个人简介"; +"Edit Profile" = "编辑个人主页"; /* No comment provided by engineer. */ "Enable Do Not Disturb failed!" = "开启“免打扰”失败"; @@ -241,6 +241,9 @@ /* No comment provided by engineer. */ "Meet" = "见面"; +/* No comment provided by engineer. */ +"Meet with genius" = "与天才相遇"; + /* No comment provided by engineer. */ "Mute" = "静音"; @@ -474,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." = "等待较久,操作可能未完成!"; @@ -530,3 +533,14 @@ /* No comment provided by engineer. */ "You have blocked %@! Do you want to unblock him or her?" = "您已屏蔽“%@”!您要解除对他或她的屏蔽吗?"; +/* No comment provided by engineer. */ +"Pods help Yep" = "Yep 使用的第三方 Pods"; + +/* 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" = "版本";