add AddFriendSearchCell

This commit is contained in:
nixzhu
2015-05-19 14:47:24 +08:00
parent 2a8443a8fa
commit 54da9a0157
5 changed files with 120 additions and 0 deletions
+16
View File
@@ -106,6 +106,8 @@
505EC81C1ADFBE1B001D27E0 /* SkillSelectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 505EC81A1ADFBE1B001D27E0 /* SkillSelectionCell.swift */; };
505EC81D1ADFBE1B001D27E0 /* SkillSelectionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 505EC81B1ADFBE1B001D27E0 /* SkillSelectionCell.xib */; };
5064F6501B0AE2E60089FAD4 /* AddFriendsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5064F64F1B0AE2E60089FAD4 /* AddFriendsViewController.swift */; };
5064F6541B0B0E160089FAD4 /* AddFriendSearchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5064F6521B0B0E160089FAD4 /* AddFriendSearchCell.swift */; };
5064F6551B0B0E160089FAD4 /* AddFriendSearchCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5064F6531B0B0E160089FAD4 /* AddFriendSearchCell.xib */; };
506923121ADE025200D27574 /* Waver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 506923111ADE025200D27574 /* Waver.swift */; };
506923141ADE025F00D27574 /* YepRefreshView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 506923131ADE025F00D27574 /* YepRefreshView.swift */; };
506BB7F51AE4E0A500C1A2A0 /* SkillAnnotationHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 506BB7F31AE4E0A500C1A2A0 /* SkillAnnotationHeader.swift */; };
@@ -302,6 +304,8 @@
505EC81A1ADFBE1B001D27E0 /* SkillSelectionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SkillSelectionCell.swift; path = Views/Cells/SkillSelection/SkillSelectionCell.swift; sourceTree = "<group>"; };
505EC81B1ADFBE1B001D27E0 /* SkillSelectionCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = SkillSelectionCell.xib; path = Views/Cells/SkillSelection/SkillSelectionCell.xib; sourceTree = "<group>"; };
5064F64F1B0AE2E60089FAD4 /* AddFriendsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AddFriendsViewController.swift; path = ViewControllers/AddFriends/AddFriendsViewController.swift; sourceTree = "<group>"; };
5064F6521B0B0E160089FAD4 /* AddFriendSearchCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AddFriendSearchCell.swift; path = Views/Cells/AddFriendSearch/AddFriendSearchCell.swift; sourceTree = "<group>"; };
5064F6531B0B0E160089FAD4 /* AddFriendSearchCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = AddFriendSearchCell.xib; path = Views/Cells/AddFriendSearch/AddFriendSearchCell.xib; sourceTree = "<group>"; };
506923111ADE025200D27574 /* Waver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Waver.swift; path = Views/AudioWaves/Waver.swift; sourceTree = "<group>"; };
506923131ADE025F00D27574 /* YepRefreshView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = YepRefreshView.swift; path = Views/PullToRefresh/YepRefreshView.swift; sourceTree = "<group>"; };
506BB7F31AE4E0A500C1A2A0 /* SkillAnnotationHeader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SkillAnnotationHeader.swift; path = Views/ReusableViews/SkillAnnotationHeader/SkillAnnotationHeader.swift; sourceTree = "<group>"; };
@@ -701,6 +705,7 @@
508F8FD21B01D04F00461B0B /* GithubRepo */,
508F8FD91B01EDBC00461B0B /* DribbbleShot */,
508F8FE01B049AD400461B0B /* InstagramMedia */,
5064F6561B0B0E1B0089FAD4 /* AddFriendSearch */,
);
name = Cells;
sourceTree = "<group>";
@@ -973,6 +978,15 @@
name = AddFriends;
sourceTree = "<group>";
};
5064F6561B0B0E1B0089FAD4 /* AddFriendSearch */ = {
isa = PBXGroup;
children = (
5064F6521B0B0E160089FAD4 /* AddFriendSearchCell.swift */,
5064F6531B0B0E160089FAD4 /* AddFriendSearchCell.xib */,
);
name = AddFriendSearch;
sourceTree = "<group>";
};
506BB7F71AE4E0AA00C1A2A0 /* SkillAnnotationHeader */ = {
isa = PBXGroup;
children = (
@@ -1390,6 +1404,7 @@
502AE5541AB93215005BD199 /* ProfileFooterCell.xib in Resources */,
50CDBE4A1ACBAD3200459CE0 /* ChatLeftImageCell.xib in Resources */,
0A90187F1B01152800AE4B7F /* ProfileSocialAccountCell.xib in Resources */,
5064F6551B0B0E160089FAD4 /* AddFriendSearchCell.xib in Resources */,
508F8FC91B0161EF00461B0B /* ProfileSeparationLineCell.xib in Resources */,
50894CF61AEA4A01000981AF /* SettingsUserCell.xib in Resources */,
508D17481ACCF4710092D666 /* ChatLeftAudioCell.xib in Resources */,
@@ -1545,6 +1560,7 @@
508F8FD41B01E3D100461B0B /* SocialWorkDribbbleViewController.swift in Sources */,
50EB8CBF1AE89ED8001AC1EE /* ChatLeftVideoCell.swift in Sources */,
502AE5331AB86020005BD199 /* RegisterVerifyMobileViewController.swift in Sources */,
5064F6541B0B0E160089FAD4 /* AddFriendSearchCell.swift in Sources */,
0A1CAC6E1AFA42D400826B45 /* SkillHomeViewController.swift in Sources */,
502AE5401AB88862005BD199 /* SkillRankCell.swift in Sources */,
50C090A01ADE391600CC6389 /* AddSkillsReusableView.swift in Sources */,
+20
View File
@@ -659,7 +659,24 @@
<view key="view" contentMode="scaleToFill" id="Dtr-6Z-xvc">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="RWL-Ot-i1T">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<sections/>
<connections>
<outlet property="dataSource" destination="4Ji-K6-SJn" id="kdl-Q6-Ot3"/>
<outlet property="delegate" destination="4Ji-K6-SJn" id="wRO-6V-kYS"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="RWL-Ot-i1T" firstAttribute="leading" secondItem="Dtr-6Z-xvc" secondAttribute="leading" id="0eK-UP-PJP"/>
<constraint firstAttribute="trailing" secondItem="RWL-Ot-i1T" secondAttribute="trailing" id="W9g-oW-JQX"/>
<constraint firstAttribute="bottom" secondItem="RWL-Ot-i1T" secondAttribute="bottom" id="ffK-oF-sgC"/>
<constraint firstItem="RWL-Ot-i1T" firstAttribute="top" secondItem="Dtr-6Z-xvc" secondAttribute="top" id="xMx-Gt-bzW"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="7hc-4a-qfO">
<barButtonItem key="rightBarButtonItem" systemItem="done" id="0sg-UK-woz">
@@ -668,6 +685,9 @@
</connections>
</barButtonItem>
</navigationItem>
<connections>
<outlet property="addFriendsTableView" destination="RWL-Ot-i1T" id="znz-Hj-dRa"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="8KG-Vq-jhm" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
@@ -10,10 +10,17 @@ import UIKit
class AddFriendsViewController: UIViewController {
@IBOutlet weak var addFriendsTableView: UITableView!
let addFriendSearchCellIdentifier = "AddFriendSearchCell"
override func viewDidLoad() {
super.viewDidLoad()
title = NSLocalizedString("Add Friends", comment: "")
addFriendsTableView.registerNib(UINib(nibName: addFriendSearchCellIdentifier, bundle: nil), forCellReuseIdentifier: addFriendSearchCellIdentifier)
}
// MARK: Actions
@@ -23,3 +30,18 @@ class AddFriendsViewController: UIViewController {
// TODO: done add friend
}
}
extension AddFriendsViewController: UITableViewDataSource, UITableViewDelegate {
func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return 2
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 20
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier(addFriendSearchCellIdentifier) as! AddFriendSearchCell
return cell
}
}
@@ -0,0 +1,26 @@
//
// AddFriendSearchCell.swift
// Yep
//
// Created by NIX on 15/5/19.
// Copyright (c) 2015 Catch Inc. All rights reserved.
//
import UIKit
class AddFriendSearchCell: UITableViewCell {
@IBOutlet weak var searchTextField: UITextField!
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,36 @@
<?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"/>
</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="AddFriendSearchCell" id="KGk-i7-Jjw" customClass="AddFriendSearchCell" customModule="Yep" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<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>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Search User" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="KnA-fN-H2T">
<rect key="frame" x="15" y="7" width="290" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="KTm-B0-qLG"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<constraints>
<constraint firstAttribute="centerY" secondItem="KnA-fN-H2T" secondAttribute="centerY" id="3KS-vH-9A8"/>
<constraint firstAttribute="trailing" secondItem="KnA-fN-H2T" secondAttribute="trailing" constant="15" id="luy-4A-RBW"/>
<constraint firstItem="KnA-fN-H2T" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="x5e-s3-lVB"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="searchTextField" destination="KnA-fN-H2T" id="vBa-kJ-dN3"/>
</connections>
</tableViewCell>
</objects>
</document>