mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-21 02:36:19 +10:00
remove unused code
This commit is contained in:
@@ -207,10 +207,6 @@
|
||||
50A640EA1B6F45FA0050E4A3 /* DoNotDisturbPeriodCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 50A640E81B6F45FA0050E4A3 /* DoNotDisturbPeriodCell.xib */; };
|
||||
50A640EC1B6F4E420050E4A3 /* DoNotDisturbPeriodViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50A640EB1B6F4E420050E4A3 /* DoNotDisturbPeriodViewController.swift */; };
|
||||
50A820241B969B0F007CD30E /* NSTimeZone+Yep.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50A820231B969B0F007CD30E /* NSTimeZone+Yep.swift */; };
|
||||
50A93A931BD8B883007005DB /* PickFeedSkillView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50A93A921BD8B883007005DB /* PickFeedSkillView.swift */; settings = {ASSET_TAGS = (); }; };
|
||||
50A93A971BD8BB0A007005DB /* PickFeedSkillCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50A93A951BD8BB0A007005DB /* PickFeedSkillCell.swift */; settings = {ASSET_TAGS = (); }; };
|
||||
50A93A981BD8BB0A007005DB /* PickFeedSkillCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 50A93A961BD8BB0A007005DB /* PickFeedSkillCell.xib */; settings = {ASSET_TAGS = (); }; };
|
||||
50A93A9B1BD8BFC3007005DB /* PickFeedSkillLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50A93A9A1BD8BFC3007005DB /* PickFeedSkillLayout.swift */; settings = {ASSET_TAGS = (); }; };
|
||||
50A93A9D1BD8C515007005DB /* FeedSkillPickerItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50A93A9C1BD8C515007005DB /* FeedSkillPickerItemView.swift */; settings = {ASSET_TAGS = (); }; };
|
||||
50A9D44B1ACD37A8000B2599 /* NSFileManager+Yep.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50A9D44A1ACD37A8000B2599 /* NSFileManager+Yep.swift */; };
|
||||
50A9D44E1ACD382B000B2599 /* NSDateTimeAgo.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 50A9D44C1ACD382B000B2599 /* NSDateTimeAgo.bundle */; };
|
||||
@@ -515,10 +511,6 @@
|
||||
50A640E81B6F45FA0050E4A3 /* DoNotDisturbPeriodCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = DoNotDisturbPeriodCell.xib; path = Views/Cells/DoNotDisturb/DoNotDisturbPeriodCell.xib; sourceTree = "<group>"; };
|
||||
50A640EB1B6F4E420050E4A3 /* DoNotDisturbPeriodViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DoNotDisturbPeriodViewController.swift; path = ViewControllers/DoNotDisturbPeriod/DoNotDisturbPeriodViewController.swift; sourceTree = "<group>"; };
|
||||
50A820231B969B0F007CD30E /* NSTimeZone+Yep.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSTimeZone+Yep.swift"; path = "Extensions/NSTimeZone+Yep.swift"; sourceTree = "<group>"; };
|
||||
50A93A921BD8B883007005DB /* PickFeedSkillView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PickFeedSkillView.swift; path = Views/PickFeedSkill/PickFeedSkillView.swift; sourceTree = "<group>"; };
|
||||
50A93A951BD8BB0A007005DB /* PickFeedSkillCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PickFeedSkillCell.swift; path = Views/Cells/PickFeedSkill/PickFeedSkillCell.swift; sourceTree = "<group>"; };
|
||||
50A93A961BD8BB0A007005DB /* PickFeedSkillCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = PickFeedSkillCell.xib; path = Views/Cells/PickFeedSkill/PickFeedSkillCell.xib; sourceTree = "<group>"; };
|
||||
50A93A9A1BD8BFC3007005DB /* PickFeedSkillLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PickFeedSkillLayout.swift; path = Views/PickFeedSkill/PickFeedSkillLayout.swift; sourceTree = "<group>"; };
|
||||
50A93A9C1BD8C515007005DB /* FeedSkillPickerItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FeedSkillPickerItemView.swift; path = Views/PickerItems/FeedSkill/FeedSkillPickerItemView.swift; sourceTree = "<group>"; };
|
||||
50A9D44A1ACD37A8000B2599 /* NSFileManager+Yep.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSFileManager+Yep.swift"; path = "Extensions/NSFileManager+Yep.swift"; sourceTree = "<group>"; };
|
||||
50A9D44C1ACD382B000B2599 /* NSDateTimeAgo.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = NSDateTimeAgo.bundle; path = Extensions/NSDateTimeAgo.bundle; sourceTree = "<group>"; };
|
||||
@@ -1004,7 +996,6 @@
|
||||
50AACEC91BB54132004DD54B /* Feed */,
|
||||
50F5AF891BBBB2B30033C9BC /* HorizontalLine */,
|
||||
50535D1B1BCD19B4002FE1A4 /* TouchClosures */,
|
||||
50A93A941BD8B887007005DB /* PickFeedSkill */,
|
||||
50A93A9E1BD8C51D007005DB /* PickerItems */,
|
||||
);
|
||||
name = Views;
|
||||
@@ -1064,7 +1055,6 @@
|
||||
502B605C1BD1102F00D9C17E /* Title */,
|
||||
502B60611BD112EA00D9C17E /* QuickPickPhotos */,
|
||||
502B60661BD1209300D9C17E /* Camera */,
|
||||
50A93A991BD8BB26007005DB /* PickFeedSkill */,
|
||||
);
|
||||
name = Cells;
|
||||
sourceTree = "<group>";
|
||||
@@ -1689,24 +1679,6 @@
|
||||
name = DoNotDisturbPeriod;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
50A93A941BD8B887007005DB /* PickFeedSkill */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
50A93A921BD8B883007005DB /* PickFeedSkillView.swift */,
|
||||
50A93A9A1BD8BFC3007005DB /* PickFeedSkillLayout.swift */,
|
||||
);
|
||||
name = PickFeedSkill;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
50A93A991BD8BB26007005DB /* PickFeedSkill */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
50A93A951BD8BB0A007005DB /* PickFeedSkillCell.swift */,
|
||||
50A93A961BD8BB0A007005DB /* PickFeedSkillCell.xib */,
|
||||
);
|
||||
name = PickFeedSkill;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
50A93A9E1BD8C51D007005DB /* PickerItems */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -2216,7 +2188,6 @@
|
||||
0A8F54BB1AB67D11004AD60E /* LaunchScreen.xib in Resources */,
|
||||
5053AD511AF82A1700B3CBFA /* PickLocationCell.xib in Resources */,
|
||||
5011382D1BCB5E150055A014 /* FeedConversationDockCell.xib in Resources */,
|
||||
50A93A981BD8BB0A007005DB /* PickFeedSkillCell.xib in Resources */,
|
||||
5053AD5B1AF83B4200B3CBFA /* ChatLeftLocationCell.xib in Resources */,
|
||||
0A8F54B81AB67D11004AD60E /* Images.xcassets in Resources */,
|
||||
50EB8CC51AE89F12001AC1EE /* ChatRightVideoCell.xib in Resources */,
|
||||
@@ -2359,7 +2330,6 @@
|
||||
0A9018821B0120A500AE4B7F /* OAuthViewController.swift in Sources */,
|
||||
508D17471ACCF4710092D666 /* ChatLeftAudioCell.swift in Sources */,
|
||||
50894D021AEA6433000981AF /* EditProfileLessInfoCell.swift in Sources */,
|
||||
50A93A931BD8B883007005DB /* PickFeedSkillView.swift in Sources */,
|
||||
501138261BCB59120055A014 /* FeedConversationsViewController.swift in Sources */,
|
||||
50894CFA1AEA54BA000981AF /* SettingsMoreCell.swift in Sources */,
|
||||
50AFBF4B1BB2A44C007D19DA /* InfoView.swift in Sources */,
|
||||
@@ -2382,7 +2352,6 @@
|
||||
50535D201BCE43ED002FE1A4 /* ImageCacheController.swift in Sources */,
|
||||
50FA9A441B661698009BF2A0 /* UIViewController+Yep.swift in Sources */,
|
||||
0AC25F061B1105D5009E6E13 /* YepChildScrollView.swift in Sources */,
|
||||
50A93A971BD8BB0A007005DB /* PickFeedSkillCell.swift in Sources */,
|
||||
0A943A7B1B0F8EAE0022DD67 /* BaseViewController.swift in Sources */,
|
||||
50165C451AC2860900C7AEBE /* ConversationLayout.swift in Sources */,
|
||||
50AFBF491BB2830E007D19DA /* EdgeBorderButton.swift in Sources */,
|
||||
@@ -2461,7 +2430,6 @@
|
||||
50F5AF8C1BBBB64C0033C9BC /* FeedCell.swift in Sources */,
|
||||
50894CF11AEA4726000981AF /* SettingsViewController.swift in Sources */,
|
||||
5023DE2A1AB685BA00B3EE96 /* ContactsViewController.swift in Sources */,
|
||||
50A93A9B1BD8BFC3007005DB /* PickFeedSkillLayout.swift in Sources */,
|
||||
50CDBE491ACBAD3200459CE0 /* ChatLeftImageCell.swift in Sources */,
|
||||
5033159C1AC101C80008A209 /* ChatRightTextCell.swift in Sources */,
|
||||
50E1D7291B870D7500D90A82 /* NSParagraphStyle+Yep.swift in Sources */,
|
||||
|
||||
@@ -15,14 +15,12 @@ import RealmSwift
|
||||
|
||||
class NewFeedViewController: UIViewController {
|
||||
|
||||
@IBOutlet weak var feedWhiteBGView: UIView!
|
||||
|
||||
var afterCreatedFeedAction: ((feed: DiscoveredFeed) -> Void)?
|
||||
|
||||
@IBOutlet weak var feedWhiteBGView: UIView!
|
||||
|
||||
@IBOutlet weak var messageTextView: UITextView!
|
||||
@IBOutlet weak var mediaCollectionView: UICollectionView!
|
||||
//@IBOutlet weak var pickFeedSkillView: PickFeedSkillView!
|
||||
//@IBOutlet weak var pickFeedSkillViewHeightConstraint: NSLayoutConstraint!
|
||||
|
||||
@IBOutlet weak var channelView: UIView!
|
||||
@IBOutlet weak var channelViewTopConstraint: NSLayoutConstraint!
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// PickFeedSkillCell.swift
|
||||
// Yep
|
||||
//
|
||||
// Created by nixzhu on 15/10/22.
|
||||
// Copyright © 2015年 Catch Inc. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class PickFeedSkillCell: UICollectionViewCell {
|
||||
|
||||
@IBOutlet weak var skillLabel: UILabel!
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="PickFeedSkillCell" id="gTV-IL-0wX" customClass="PickFeedSkillCell" customModule="Yep" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="175" height="66"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="175" height="66"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="skill_bubble" translatesAutoresizingMaskIntoConstraints="NO" id="rbs-eo-Stc">
|
||||
<rect key="frame" x="100" y="21" width="55" height="24"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Swift" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gCn-cn-cak">
|
||||
<rect key="frame" x="110" y="24" width="35" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstItem="rbs-eo-Stc" firstAttribute="trailing" secondItem="gCn-cn-cak" secondAttribute="trailing" constant="10" id="APC-CQ-dSH"/>
|
||||
<constraint firstItem="rbs-eo-Stc" firstAttribute="centerY" secondItem="gCn-cn-cak" secondAttribute="centerY" id="PQO-l9-Kiv"/>
|
||||
<constraint firstItem="gCn-cn-cak" firstAttribute="leading" secondItem="rbs-eo-Stc" secondAttribute="leading" constant="10" id="cCp-L6-8jS"/>
|
||||
<constraint firstAttribute="trailing" secondItem="gCn-cn-cak" secondAttribute="trailing" constant="30" id="nc0-il-oEt"/>
|
||||
<constraint firstItem="gCn-cn-cak" firstAttribute="centerY" secondItem="gTV-IL-0wX" secondAttribute="centerY" id="oW5-7z-3TF"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="175" height="66"/>
|
||||
<connections>
|
||||
<outlet property="skillLabel" destination="gCn-cn-cak" id="4bn-i3-wVB"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="146.5" y="316"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="skill_bubble" width="26" height="24"/>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -1,61 +0,0 @@
|
||||
//
|
||||
// PickFeedSkillLayout.swift
|
||||
// Yep
|
||||
//
|
||||
// Created by nixzhu on 15/10/22.
|
||||
// Copyright © 2015年 Catch Inc. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class PickFeedSkillLayout: UICollectionViewFlowLayout {
|
||||
|
||||
override func prepareLayout() {
|
||||
super.prepareLayout()
|
||||
|
||||
minimumLineSpacing = 0
|
||||
}
|
||||
|
||||
override func targetContentOffsetForProposedContentOffset(proposedContentOffset: CGPoint, withScrollingVelocity velocity: CGPoint) -> CGPoint {
|
||||
|
||||
if let cv = self.collectionView {
|
||||
|
||||
let cvBounds = cv.bounds
|
||||
let halfWidth = cvBounds.size.width * 0.5;
|
||||
let proposedContentOffsetCenterX = proposedContentOffset.x + halfWidth;
|
||||
|
||||
if let attributesForVisibleCells = layoutAttributesForElementsInRect(cvBounds) {
|
||||
|
||||
var candidateAttributes : UICollectionViewLayoutAttributes?
|
||||
for attributes in attributesForVisibleCells {
|
||||
|
||||
// == Skip comparison with non-cell items (headers and footers) == //
|
||||
if attributes.representedElementCategory != UICollectionElementCategory.Cell {
|
||||
continue
|
||||
}
|
||||
|
||||
if let candAttrs = candidateAttributes {
|
||||
|
||||
let a = attributes.center.x - proposedContentOffsetCenterX
|
||||
let b = candAttrs.center.x - proposedContentOffsetCenterX
|
||||
|
||||
if abs(a) < abs(b) {
|
||||
candidateAttributes = attributes;
|
||||
}
|
||||
|
||||
} else { // == First time in the loop == //
|
||||
|
||||
candidateAttributes = attributes;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return CGPoint(x: round(candidateAttributes!.center.x - halfWidth), y: proposedContentOffset.y)
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback
|
||||
return super.targetContentOffsetForProposedContentOffset(proposedContentOffset)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
//
|
||||
// PickFeedSkillView.swift
|
||||
// Yep
|
||||
//
|
||||
// Created by nixzhu on 15/10/22.
|
||||
// Copyright © 2015年 Catch Inc. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class PickFeedSkillView: UIView {
|
||||
|
||||
let pickFeedSkillCellID = "PickFeedSkillCell"
|
||||
|
||||
lazy var skillsCollectionView: UICollectionView = {
|
||||
|
||||
let layout = PickFeedSkillLayout()
|
||||
|
||||
let view = UICollectionView(frame: CGRectZero, collectionViewLayout: layout)
|
||||
|
||||
view.pagingEnabled = true
|
||||
|
||||
view.backgroundColor = UIColor.lightGrayColor()
|
||||
|
||||
view.registerNib(UINib(nibName: self.pickFeedSkillCellID, bundle: nil), forCellWithReuseIdentifier: self.pickFeedSkillCellID)
|
||||
|
||||
view.dataSource = self
|
||||
view.delegate = self
|
||||
|
||||
return view
|
||||
}()
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
|
||||
makeUI()
|
||||
}
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
|
||||
makeUI()
|
||||
}
|
||||
|
||||
private func makeUI() {
|
||||
|
||||
backgroundColor = UIColor.lightGrayColor()
|
||||
|
||||
addSubview(skillsCollectionView)
|
||||
skillsCollectionView.translatesAutoresizingMaskIntoConstraints = false
|
||||
|
||||
let views = [
|
||||
"skillsCollectionView": skillsCollectionView,
|
||||
]
|
||||
|
||||
let skillsCollectionViewConstraintsH = NSLayoutConstraint.constraintsWithVisualFormat("H:|[skillsCollectionView]|", options: NSLayoutFormatOptions(rawValue: 0), metrics: nil, views: views)
|
||||
|
||||
let skillsCollectionViewConstraintsV = NSLayoutConstraint.constraintsWithVisualFormat("V:|[skillsCollectionView]|", options: NSLayoutFormatOptions(rawValue: 0), metrics: nil, views: views)
|
||||
|
||||
NSLayoutConstraint.activateConstraints(skillsCollectionViewConstraintsH)
|
||||
NSLayoutConstraint.activateConstraints(skillsCollectionViewConstraintsV)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - UICollectionViewDataSource, UICollectionViewDelegate
|
||||
|
||||
extension PickFeedSkillView: UICollectionViewDataSource, UICollectionViewDelegate {
|
||||
|
||||
func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
return 15
|
||||
}
|
||||
|
||||
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
|
||||
|
||||
let cell = collectionView.dequeueReusableCellWithReuseIdentifier(pickFeedSkillCellID, forIndexPath: indexPath) as! PickFeedSkillCell
|
||||
|
||||
cell.skillLabel.text = "Swift \(indexPath.item)"
|
||||
|
||||
return cell
|
||||
}
|
||||
|
||||
func collectionView(collectionView: UICollectionView!, layout collectionViewLayout: UICollectionViewLayout!, sizeForItemAtIndexPath indexPath: NSIndexPath!) -> CGSize {
|
||||
|
||||
return CGSize(width: collectionView.bounds.width, height: 44)
|
||||
}
|
||||
|
||||
func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAtIndex section: Int) -> UIEdgeInsets {
|
||||
|
||||
return UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user