diff --git a/Yep.xcodeproj/project.pbxproj b/Yep.xcodeproj/project.pbxproj index 9c924553..101541ce 100644 --- a/Yep.xcodeproj/project.pbxproj +++ b/Yep.xcodeproj/project.pbxproj @@ -80,6 +80,8 @@ 504F415B1AD5028200FBB19A /* SkillCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 504F41591AD5028200FBB19A /* SkillCell.xib */; }; 5053AD4A1AF772C500B3CBFA /* PickLocationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5053AD491AF772C500B3CBFA /* PickLocationViewController.swift */; }; 5053AD4D1AF79EEA00B3CBFA /* UserPickedLocationPin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5053AD4C1AF79EEA00B3CBFA /* UserPickedLocationPin.swift */; }; + 5053AD501AF82A1700B3CBFA /* PickLocationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5053AD4E1AF82A1700B3CBFA /* PickLocationCell.swift */; }; + 5053AD511AF82A1700B3CBFA /* PickLocationCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5053AD4F1AF82A1700B3CBFA /* PickLocationCell.xib */; }; 50553F8F1ADB8BA200F80B59 /* ChatSectionDateCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50553F8D1ADB8BA200F80B59 /* ChatSectionDateCell.swift */; }; 50553F901ADB8BA200F80B59 /* ChatSectionDateCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 50553F8E1ADB8BA200F80B59 /* ChatSectionDateCell.xib */; }; 50553F931ADBA50600F80B59 /* NSDate+Yep.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50553F921ADBA50600F80B59 /* NSDate+Yep.swift */; }; @@ -244,6 +246,8 @@ 504F41591AD5028200FBB19A /* SkillCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = SkillCell.xib; path = Views/Cells/Skill/SkillCell.xib; sourceTree = ""; }; 5053AD491AF772C500B3CBFA /* PickLocationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PickLocationViewController.swift; path = ViewControllers/PickLocation/PickLocationViewController.swift; sourceTree = ""; }; 5053AD4C1AF79EEA00B3CBFA /* UserPickedLocationPin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = UserPickedLocationPin.swift; path = ViewControllers/PickLocation/UserPickedLocationPin.swift; sourceTree = ""; }; + 5053AD4E1AF82A1700B3CBFA /* PickLocationCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PickLocationCell.swift; path = Views/Cells/PickLocation/PickLocationCell.swift; sourceTree = ""; }; + 5053AD4F1AF82A1700B3CBFA /* PickLocationCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = PickLocationCell.xib; path = Views/Cells/PickLocation/PickLocationCell.xib; sourceTree = ""; }; 50553F8D1ADB8BA200F80B59 /* ChatSectionDateCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ChatSectionDateCell.swift; path = Views/Cells/ChatSectionDate/ChatSectionDateCell.swift; sourceTree = ""; }; 50553F8E1ADB8BA200F80B59 /* ChatSectionDateCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ChatSectionDateCell.xib; path = Views/Cells/ChatSectionDate/ChatSectionDateCell.xib; sourceTree = ""; }; 50553F921ADBA50600F80B59 /* NSDate+Yep.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSDate+Yep.swift"; path = "Extensions/NSDate+Yep.swift"; sourceTree = ""; }; @@ -567,6 +571,7 @@ 50894D041AEA6439000981AF /* EditProfileLessInfo */, 50894D091AEDFDA6000981AF /* EditProfileMoreInfo */, 50894D0E1AEE017B000981AF /* EditProfileColoredTitle */, + 5053AD521AF82A1E00B3CBFA /* PickLocation */, ); name = Cells; sourceTree = ""; @@ -776,6 +781,15 @@ name = PickLocation; sourceTree = ""; }; + 5053AD521AF82A1E00B3CBFA /* PickLocation */ = { + isa = PBXGroup; + children = ( + 5053AD4E1AF82A1700B3CBFA /* PickLocationCell.swift */, + 5053AD4F1AF82A1700B3CBFA /* PickLocationCell.xib */, + ); + name = PickLocation; + sourceTree = ""; + }; 50553F911ADB8BA600F80B59 /* ChatSectionDate */ = { isa = PBXGroup; children = ( @@ -1174,6 +1188,7 @@ 50E114FD1ABC549300F13000 /* ContactsCell.xib in Resources */, 502AE54F1AB93175005BD199 /* ProfileHeaderCell.xib in Resources */, 0A8F54BB1AB67D11004AD60E /* LaunchScreen.xib in Resources */, + 5053AD511AF82A1700B3CBFA /* PickLocationCell.xib in Resources */, 0A8F54B81AB67D11004AD60E /* Images.xcassets in Resources */, 50EB8CC51AE89F12001AC1EE /* ChatRightVideoCell.xib in Resources */, 502AE5191AB70D72005BD199 /* Intro.storyboard in Resources */, @@ -1355,6 +1370,7 @@ 50894CF51AEA4A01000981AF /* SettingsUserCell.swift in Sources */, 504F415A1AD5028200FBB19A /* SkillCell.swift in Sources */, 50894D0C1AEE0177000981AF /* EditProfileColoredTitleCell.swift in Sources */, + 5053AD501AF82A1700B3CBFA /* PickLocationCell.swift in Sources */, 5023DE521AB6C51300B3EE96 /* CGRect+Yep.swift in Sources */, 5053AD4A1AF772C500B3CBFA /* PickLocationViewController.swift in Sources */, ); diff --git a/Yep/Base.lproj/Main.storyboard b/Yep/Base.lproj/Main.storyboard index bac38637..a1486c2a 100644 --- a/Yep/Base.lproj/Main.storyboard +++ b/Yep/Base.lproj/Main.storyboard @@ -182,6 +182,10 @@ + + + + diff --git a/Yep/Images.xcassets/icon_current_location.imageset/Contents.json b/Yep/Images.xcassets/icon_current_location.imageset/Contents.json new file mode 100644 index 00000000..f23a51d2 --- /dev/null +++ b/Yep/Images.xcassets/icon_current_location.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_current_location.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Yep/Images.xcassets/icon_current_location.imageset/icon_current_location.pdf b/Yep/Images.xcassets/icon_current_location.imageset/icon_current_location.pdf new file mode 100644 index 00000000..423bc7a4 Binary files /dev/null and b/Yep/Images.xcassets/icon_current_location.imageset/icon_current_location.pdf differ diff --git a/Yep/Images.xcassets/icon_location_checkmark.imageset/Contents.json b/Yep/Images.xcassets/icon_location_checkmark.imageset/Contents.json new file mode 100644 index 00000000..303523e2 --- /dev/null +++ b/Yep/Images.xcassets/icon_location_checkmark.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icon_location_checkmark.pdf" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Yep/Images.xcassets/icon_location_checkmark.imageset/icon_location_checkmark.pdf b/Yep/Images.xcassets/icon_location_checkmark.imageset/icon_location_checkmark.pdf new file mode 100644 index 00000000..425a19aa Binary files /dev/null and b/Yep/Images.xcassets/icon_location_checkmark.imageset/icon_location_checkmark.pdf differ diff --git a/Yep/ViewControllers/PickLocation/PickLocationViewController.swift b/Yep/ViewControllers/PickLocation/PickLocationViewController.swift index 63c0b30f..6d6e5056 100644 --- a/Yep/ViewControllers/PickLocation/PickLocationViewController.swift +++ b/Yep/ViewControllers/PickLocation/PickLocationViewController.swift @@ -22,9 +22,14 @@ class PickLocationViewController: UIViewController { var userPickedLocationPin: UserPickedLocationPin? + let pickLocationCellIdentifier = "PickLocationCell" + override func viewDidLoad() { super.viewDidLoad() + tableView.registerNib(UINib(nibName: pickLocationCellIdentifier, bundle: nil), forCellReuseIdentifier: pickLocationCellIdentifier) + tableView.rowHeight = 50 + sendButton.enabled = false mapView.showsUserLocation = true @@ -138,3 +143,19 @@ extension PickLocationViewController: UISearchBarDelegate { }) } } + +extension PickLocationViewController: UITableViewDataSource, UITableViewDelegate { + func numberOfSectionsInTableView(tableView: UITableView) -> Int { + return 1 + } + + func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 4 + } + + func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCellWithIdentifier(pickLocationCellIdentifier) as! PickLocationCell + return cell + } +} + diff --git a/Yep/Views/Cells/PickLocation/PickLocationCell.swift b/Yep/Views/Cells/PickLocation/PickLocationCell.swift new file mode 100644 index 00000000..abd5d891 --- /dev/null +++ b/Yep/Views/Cells/PickLocation/PickLocationCell.swift @@ -0,0 +1,31 @@ +// +// PickLocationCell.swift +// Yep +// +// Created by NIX on 15/5/5. +// Copyright (c) 2015年 Catch Inc. All rights reserved. +// + +import UIKit + +class PickLocationCell: UITableViewCell { + + @IBOutlet weak var iconImageView: UIImageView! + + @IBOutlet weak var locationLabel: UILabel! + + @IBOutlet weak var checkImageView: 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/PickLocation/PickLocationCell.xib b/Yep/Views/Cells/PickLocation/PickLocationCell.xib new file mode 100644 index 00000000..e2bfe204 --- /dev/null +++ b/Yep/Views/Cells/PickLocation/PickLocationCell.xib @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +