diff --git a/Yep/Services/YepService.swift b/Yep/Services/YepService.swift index 89dd26db..d21dead9 100644 --- a/Yep/Services/YepService.swift +++ b/Yep/Services/YepService.swift @@ -2306,7 +2306,7 @@ struct DiscoveredFeed: Hashable { let parseFeeds: JSONDictionary -> [DiscoveredFeed]? = { data in - println("feedsData: \(data)") + //println("feedsData: \(data)") if let feedsData = data["topics"] as? [JSONDictionary] { return feedsData.map({ DiscoveredFeed.fromJSONDictionary($0) }).flatMap({ $0 }) diff --git a/Yep/ViewControllers/NewFeed/NewFeed.storyboard b/Yep/ViewControllers/NewFeed/NewFeed.storyboard index e9df6cd8..8632631c 100644 --- a/Yep/ViewControllers/NewFeed/NewFeed.storyboard +++ b/Yep/ViewControllers/NewFeed/NewFeed.storyboard @@ -54,31 +54,52 @@ - + + + + + + + + + + + + + + + - + - + + + + + + + + @@ -86,7 +107,6 @@ - @@ -99,6 +119,10 @@ + + + + diff --git a/Yep/ViewControllers/NewFeed/NewFeedViewController.swift b/Yep/ViewControllers/NewFeed/NewFeedViewController.swift index 1d3cf872..550d9ab2 100644 --- a/Yep/ViewControllers/NewFeed/NewFeedViewController.swift +++ b/Yep/ViewControllers/NewFeed/NewFeedViewController.swift @@ -23,6 +23,13 @@ class NewFeedViewController: UIViewController { @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! + + @IBOutlet weak var channelViewTopLineView: HorizontalLineView! + @IBOutlet weak var channelViewBottomLineView: HorizontalLineView! + @IBOutlet weak var skillPickerView: UIPickerView! var imageAssets: [PHAsset] = [] @@ -88,6 +95,17 @@ class NewFeedViewController: UIViewController { pickedSkill = skills[centerRow % skills.count] } + // pick skill + + channelViewTopConstraint.constant = 30 + + skillPickerView.alpha = 0 + + channelView.backgroundColor = UIColor.whiteColor() + channelView.userInteractionEnabled = true + let tap = UITapGestureRecognizer(target: self, action: "showSkillPickerView:") + channelView.addGestureRecognizer(tap) + // try turn on location let locationResource = PrivateResource.Location(.WhenInUse) @@ -131,6 +149,24 @@ class NewFeedViewController: UIViewController { // MARK: Actions + func showSkillPickerView(tap: UITapGestureRecognizer) { + + UIView.animateWithDuration(0.25, delay: 0.0, options: .CurveEaseInOut, animations: { [weak self] in + + self?.channelView.backgroundColor = UIColor.clearColor() + self?.channelViewTopLineView.alpha = 0 + self?.channelViewBottomLineView.alpha = 0 + + self?.skillPickerView.alpha = 1 + + self?.channelViewTopConstraint.constant = 108 + self?.view.layoutIfNeeded() + + }, completion: { [weak self] _ in + self?.channelView.userInteractionEnabled = false + }) + } + func cancel(sender: UIBarButtonItem) { messageTextView.resignFirstResponder() self.dismissViewControllerAnimated(true, completion: nil)