mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-13 14:56:03 +10:00
add PickLocationCell
This commit is contained in:
@@ -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 = "<group>"; };
|
||||
5053AD491AF772C500B3CBFA /* PickLocationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PickLocationViewController.swift; path = ViewControllers/PickLocation/PickLocationViewController.swift; sourceTree = "<group>"; };
|
||||
5053AD4C1AF79EEA00B3CBFA /* UserPickedLocationPin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = UserPickedLocationPin.swift; path = ViewControllers/PickLocation/UserPickedLocationPin.swift; sourceTree = "<group>"; };
|
||||
5053AD4E1AF82A1700B3CBFA /* PickLocationCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PickLocationCell.swift; path = Views/Cells/PickLocation/PickLocationCell.swift; sourceTree = "<group>"; };
|
||||
5053AD4F1AF82A1700B3CBFA /* PickLocationCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = PickLocationCell.xib; path = Views/Cells/PickLocation/PickLocationCell.xib; sourceTree = "<group>"; };
|
||||
50553F8D1ADB8BA200F80B59 /* ChatSectionDateCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ChatSectionDateCell.swift; path = Views/Cells/ChatSectionDate/ChatSectionDateCell.swift; sourceTree = "<group>"; };
|
||||
50553F8E1ADB8BA200F80B59 /* ChatSectionDateCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ChatSectionDateCell.xib; path = Views/Cells/ChatSectionDate/ChatSectionDateCell.xib; sourceTree = "<group>"; };
|
||||
50553F921ADBA50600F80B59 /* NSDate+Yep.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSDate+Yep.swift"; path = "Extensions/NSDate+Yep.swift"; sourceTree = "<group>"; };
|
||||
@@ -567,6 +571,7 @@
|
||||
50894D041AEA6439000981AF /* EditProfileLessInfo */,
|
||||
50894D091AEDFDA6000981AF /* EditProfileMoreInfo */,
|
||||
50894D0E1AEE017B000981AF /* EditProfileColoredTitle */,
|
||||
5053AD521AF82A1E00B3CBFA /* PickLocation */,
|
||||
);
|
||||
name = Cells;
|
||||
sourceTree = "<group>";
|
||||
@@ -776,6 +781,15 @@
|
||||
name = PickLocation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5053AD521AF82A1E00B3CBFA /* PickLocation */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5053AD4E1AF82A1700B3CBFA /* PickLocationCell.swift */,
|
||||
5053AD4F1AF82A1700B3CBFA /* PickLocationCell.xib */,
|
||||
);
|
||||
name = PickLocation;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
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 */,
|
||||
);
|
||||
|
||||
@@ -182,6 +182,10 @@
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="iqS-tv-kJf">
|
||||
<rect key="frame" x="0.0" y="394" width="600" height="206"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="Cb0-q4-fbE" id="ieY-5C-5EN"/>
|
||||
<outlet property="delegate" destination="Cb0-q4-fbE" id="e9D-Rv-z3e"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "icon_current_location.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "icon_location_checkmark.pdf"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
|
||||
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="PickLocationCell" rowHeight="75" id="KGk-i7-Jjw" customClass="PickLocationCell" customModule="Yep" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="75"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_pin" translatesAutoresizingMaskIntoConstraints="NO" id="vwp-bp-hV1">
|
||||
<rect key="frame" x="10" y="22" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="vwp-bp-hV1" secondAttribute="height" multiplier="1:1" id="0NQ-8H-mP2"/>
|
||||
<constraint firstAttribute="width" constant="30" id="1bm-Ow-1oe"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_location_checkmark" translatesAutoresizingMaskIntoConstraints="NO" id="UHL-DX-9X6">
|
||||
<rect key="frame" x="287" y="32" width="13" height="10"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="10" id="A9B-io-Gb7"/>
|
||||
<constraint firstAttribute="width" constant="13" id="bzb-my-RZd"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Location" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QvC-tH-7wP">
|
||||
<rect key="frame" x="50" y="28" width="56" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="light" pointSize="15"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="centerY" secondItem="vwp-bp-hV1" secondAttribute="centerY" id="7PK-n2-vwT"/>
|
||||
<constraint firstItem="vwp-bp-hV1" firstAttribute="centerY" secondItem="QvC-tH-7wP" secondAttribute="centerY" id="Dlq-an-QWA"/>
|
||||
<constraint firstAttribute="trailing" secondItem="UHL-DX-9X6" secondAttribute="trailing" constant="20" id="Grf-aK-RlU"/>
|
||||
<constraint firstAttribute="centerY" secondItem="UHL-DX-9X6" secondAttribute="centerY" id="IG7-pV-NMB"/>
|
||||
<constraint firstItem="vwp-bp-hV1" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="10" id="Lvj-M8-wuA"/>
|
||||
<constraint firstItem="QvC-tH-7wP" firstAttribute="leading" secondItem="vwp-bp-hV1" secondAttribute="trailing" constant="10" id="t59-KX-lpp"/>
|
||||
<constraint firstItem="UHL-DX-9X6" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="QvC-tH-7wP" secondAttribute="trailing" constant="10" id="wrQ-YE-jbi"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="checkImageView" destination="UHL-DX-9X6" id="2It-Zw-OCT"/>
|
||||
<outlet property="iconImageView" destination="vwp-bp-hV1" id="ETY-9v-ukn"/>
|
||||
<outlet property="locationLabel" destination="QvC-tH-7wP" id="cFc-RP-KfS"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="318" y="389.5"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="icon_location_checkmark" width="13" height="10"/>
|
||||
<image name="icon_pin" width="30" height="30"/>
|
||||
</resources>
|
||||
</document>
|
||||
Reference in New Issue
Block a user