diff --git a/Yep.xcodeproj/project.pbxproj b/Yep.xcodeproj/project.pbxproj index 41ddabf8..1ba195c2 100644 --- a/Yep.xcodeproj/project.pbxproj +++ b/Yep.xcodeproj/project.pbxproj @@ -245,6 +245,7 @@ 50E114FC1ABC549300F13000 /* ContactsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E114FA1ABC549300F13000 /* ContactsCell.swift */; }; 50E114FD1ABC549300F13000 /* ContactsCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 50E114FB1ABC549300F13000 /* ContactsCell.xib */; }; 50E18BB71B180F7D0076C3C6 /* BottomButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E18BB61B180F7D0076C3C6 /* BottomButtonView.swift */; }; + 50E1CE891BDA3CED0025B933 /* SkillHome.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 50E1CE881BDA3CED0025B933 /* SkillHome.storyboard */; }; 50E1D7291B870D7500D90A82 /* NSParagraphStyle+Yep.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1D7281B870D7500D90A82 /* NSParagraphStyle+Yep.swift */; }; 50E3488E1B905C0100A8E699 /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E3488D1B905C0100A8E699 /* AboutViewController.swift */; }; 50E348921B9063A700A8E699 /* AboutCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E348901B9063A700A8E699 /* AboutCell.swift */; }; @@ -551,6 +552,7 @@ 50E114FA1ABC549300F13000 /* ContactsCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ContactsCell.swift; path = Views/Cells/Contacts/ContactsCell.swift; sourceTree = ""; }; 50E114FB1ABC549300F13000 /* ContactsCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ContactsCell.xib; path = Views/Cells/Contacts/ContactsCell.xib; sourceTree = ""; }; 50E18BB61B180F7D0076C3C6 /* BottomButtonView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BottomButtonView.swift; path = Views/SayHi/BottomButtonView.swift; sourceTree = ""; }; + 50E1CE881BDA3CED0025B933 /* SkillHome.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SkillHome.storyboard; path = ViewControllers/SkillHome/SkillHome.storyboard; sourceTree = ""; }; 50E1D7281B870D7500D90A82 /* NSParagraphStyle+Yep.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSParagraphStyle+Yep.swift"; path = "Extensions/NSParagraphStyle+Yep.swift"; sourceTree = ""; }; 50E3488D1B905C0100A8E699 /* AboutViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AboutViewController.swift; path = ViewControllers/About/AboutViewController.swift; sourceTree = ""; }; 50E348901B9063A700A8E699 /* AboutCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AboutCell.swift; path = Views/Cells/About/AboutCell.swift; sourceTree = ""; }; @@ -634,6 +636,7 @@ isa = PBXGroup; children = ( 0A1CAC6D1AFA42D400826B45 /* SkillHomeViewController.swift */, + 50E1CE881BDA3CED0025B933 /* SkillHome.storyboard */, ); name = SkillHome; sourceTree = ""; @@ -2203,6 +2206,7 @@ 0A8F54BB1AB67D11004AD60E /* LaunchScreen.xib in Resources */, 5053AD511AF82A1700B3CBFA /* PickLocationCell.xib in Resources */, 5011382D1BCB5E150055A014 /* FeedConversationDockCell.xib in Resources */, + 50E1CE891BDA3CED0025B933 /* SkillHome.storyboard in Resources */, 5053AD5B1AF83B4200B3CBFA /* ChatLeftLocationCell.xib in Resources */, 0A8F54B81AB67D11004AD60E /* Images.xcassets in Resources */, 50EB8CC51AE89F12001AC1EE /* ChatRightVideoCell.xib in Resources */, diff --git a/Yep/Base.lproj/Main.storyboard b/Yep/Base.lproj/Main.storyboard index f5f3572c..c3db4f2c 100644 --- a/Yep/Base.lproj/Main.storyboard +++ b/Yep/Base.lproj/Main.storyboard @@ -245,13 +245,13 @@ - + - + @@ -498,12 +498,12 @@ - + @@ -553,71 +553,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -974,7 +909,7 @@ - - - + @@ -1214,14 +1149,14 @@ - + + + + + + + + @@ -2053,8 +1996,8 @@ - + diff --git a/Yep/ViewControllers/Profile/ProfileViewController.swift b/Yep/ViewControllers/Profile/ProfileViewController.swift index 69ba3b2f..69e2d641 100644 --- a/Yep/ViewControllers/Profile/ProfileViewController.swift +++ b/Yep/ViewControllers/Profile/ProfileViewController.swift @@ -1053,34 +1053,44 @@ class ProfileViewController: UIViewController { override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { - - if segue.identifier == "showSkillHome" { - noNeedToChangeStatusBar = false - } else { - noNeedToChangeStatusBar = false - } - + +// if segue.identifier == "showSkillHome" { +// noNeedToChangeStatusBar = false +// } else { +// noNeedToChangeStatusBar = false +// } + if segue.identifier == "showConversation" { let vc = segue.destinationViewController as! ConversationViewController vc.conversation = sender as! Conversation - } else if segue.identifier == "showSkillHome" { - - if let skillInfo = sender as? [String: AnyObject] { - let vc = segue.destinationViewController as! SkillHomeViewController - vc.hidesBottomBarWhenPushed = true + } else if segue.identifier == "showFeedsWithSkill" { - if let preferedSkillSet = skillInfo["preferedSkillSet"] as? Int { - vc.preferedSkillSet = SkillSet(rawValue: preferedSkillSet) - } + let vc = segue.destinationViewController as! FeedsViewController - vc.skill = skillInfo["skill"] as? SkillCell.Skill - - vc.afterUpdatedSkillCoverAction = { [weak self] in - self?.updateProfileCollectionView() - } + if let + skillInfo = sender as? [String: AnyObject], + skill = skillInfo["skill"] as? SkillCell.Skill { + vc.skill = Skill(category: nil, id: skill.ID, name: skill.localName, localName: skill.localName, coverURLString: skill.coverURLString) } + vc.hidesBottomBarWhenPushed = true + +// if let skillInfo = sender as? [String: AnyObject] { +// let vc = segue.destinationViewController as! SkillHomeViewController +// vc.hidesBottomBarWhenPushed = true +// +// if let preferedSkillSet = skillInfo["preferedSkillSet"] as? Int { +// vc.preferedSkillSet = SkillSet(rawValue: preferedSkillSet) +// } +// +// vc.skill = skillInfo["skill"] as? SkillCell.Skill +// +// vc.afterUpdatedSkillCoverAction = { [weak self] in +// self?.updateProfileCollectionView() +// } +// } + } else if segue.identifier == "showEditSkills" { if let skillInfo = sender as? [String: AnyObject] { @@ -1265,7 +1275,8 @@ extension ProfileViewController: UICollectionViewDataSource, UICollectionViewDel cell.skill = profileUser?.cellSkillInSkillSet(.Master, atIndexPath: indexPath) cell.tapAction = { [weak self] skill in - self?.performSegueWithIdentifier("showSkillHome", sender: ["skill": skill, "preferedSkillSet": SkillSet.Master.rawValue]) + //self?.performSegueWithIdentifier("showSkillHome", sender: ["skill": skill, "preferedSkillSet": SkillSet.Master.rawValue]) + self?.performSegueWithIdentifier("showFeedsWithSkill", sender: ["skill": skill, "preferedSkillSet": SkillSet.Master.rawValue]) } return cell @@ -1276,7 +1287,8 @@ extension ProfileViewController: UICollectionViewDataSource, UICollectionViewDel cell.skill = profileUser?.cellSkillInSkillSet(.Learning, atIndexPath: indexPath) cell.tapAction = { [weak self] skill in - self?.performSegueWithIdentifier("showSkillHome", sender: ["skill": skill, "preferedSkillSet": SkillSet.Learning.rawValue]) + //self?.performSegueWithIdentifier("showSkillHome", sender: ["skill": skill, "preferedSkillSet": SkillSet.Learning.rawValue]) + self?.performSegueWithIdentifier("showFeedsWithSkill", sender: ["skill": skill, "preferedSkillSet": SkillSet.Learning.rawValue]) } return cell diff --git a/Yep/ViewControllers/SkillHome/SkillHome.storyboard b/Yep/ViewControllers/SkillHome/SkillHome.storyboard new file mode 100644 index 00000000..ccbbac20 --- /dev/null +++ b/Yep/ViewControllers/SkillHome/SkillHome.storyboard @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +