mirror of
https://github.com/oonyeje/Get-Hip.git
synced 2025-12-25 11:47:41 +00:00
decided to make another view controller for going back to the home screen while in party, a lot simpler and less issues with multiple party instances
This commit is contained in:
parent
2458a66327
commit
9a646cea6d
@ -60,6 +60,7 @@
|
||||
3E43B8C91C37639C002F97A7 /* FBSDKCoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E1BDA751C3713F900EE3B84 /* FBSDKCoreKit.framework */; };
|
||||
3E43B8CA1C37639C002F97A7 /* FBSDKLoginKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E43B8C51C375E73002F97A7 /* FBSDKLoginKit.framework */; };
|
||||
3E43B8CF1C376F9F002F97A7 /* Logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 3E43B8CE1C376F9F002F97A7 /* Logo.png */; };
|
||||
3E50E0401C74B97300EB9EA9 /* BackToHomeScreenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E50E03F1C74B97300EB9EA9 /* BackToHomeScreenViewController.swift */; };
|
||||
3E5485B31C69A7DA00E7D5AB /* LoadingPartyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E5485B21C69A7DA00E7D5AB /* LoadingPartyViewController.swift */; };
|
||||
3E5485B51C69CE2F00E7D5AB /* InvitedCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E5485B41C69CE2F00E7D5AB /* InvitedCollectionViewCell.swift */; };
|
||||
3E5952631C39DBC900C88C71 /* Friends.png in Resources */ = {isa = PBXBuildFile; fileRef = 3E59525A1C39DBC900C88C71 /* Friends.png */; };
|
||||
@ -199,6 +200,7 @@
|
||||
3E43B8C41C375E73002F97A7 /* Bolts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Bolts.framework; path = ../../FacebookSDK/Bolts.framework; sourceTree = "<group>"; };
|
||||
3E43B8C51C375E73002F97A7 /* FBSDKLoginKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBSDKLoginKit.framework; path = ../../FacebookSDK/FBSDKLoginKit.framework; sourceTree = "<group>"; };
|
||||
3E43B8CE1C376F9F002F97A7 /* Logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Logo.png; path = "../../../Dropbox/gethip/Screens/6 Login/Assets/Logo.png"; sourceTree = "<group>"; };
|
||||
3E50E03F1C74B97300EB9EA9 /* BackToHomeScreenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackToHomeScreenViewController.swift; sourceTree = "<group>"; };
|
||||
3E5485B21C69A7DA00E7D5AB /* LoadingPartyViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoadingPartyViewController.swift; sourceTree = "<group>"; };
|
||||
3E5485B41C69CE2F00E7D5AB /* InvitedCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InvitedCollectionViewCell.swift; sourceTree = "<group>"; };
|
||||
3E59525A1C39DBC900C88C71 /* Friends.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Friends.png; path = "../Get Hip/Get Hip/Assets/Friends.png"; sourceTree = "<group>"; };
|
||||
@ -455,6 +457,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3E1EE6381C6D02EB00F5C5D7 /* InPartyViewController.swift */,
|
||||
3E50E03F1C74B97300EB9EA9 /* BackToHomeScreenViewController.swift */,
|
||||
);
|
||||
name = InParty;
|
||||
sourceTree = "<group>";
|
||||
@ -853,6 +856,7 @@
|
||||
3E627FE81C55AE35005C0372 /* TDAudioMetaInfo.m in Sources */,
|
||||
3E6738F51C6E9C7700B47C3E /* LoginController.swift in Sources */,
|
||||
3E34125B1C54C73A006226E0 /* PartySession.swift in Sources */,
|
||||
3E50E0401C74B97300EB9EA9 /* BackToHomeScreenViewController.swift in Sources */,
|
||||
3E627FF01C55AE35005C0372 /* TDAudioStream.m in Sources */,
|
||||
3E627FE91C55AE35005C0372 /* TDAudioPlayer.m in Sources */,
|
||||
3EDA82E31C4741C70081ED53 /* FriendDataSource.swift in Sources */,
|
||||
|
||||
56
GetHip/BackToHomeScreenViewController.swift
Normal file
56
GetHip/BackToHomeScreenViewController.swift
Normal file
@ -0,0 +1,56 @@
|
||||
//
|
||||
// BackToHomeScreenViewController.swift
|
||||
// GetHip
|
||||
//
|
||||
// Created by Okechi on 2/17/16.
|
||||
// Copyright (c) 2016 Kroleo. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class BackToHomeScreenViewController: UIViewController {
|
||||
var friendData: [FriendData] = []
|
||||
var requestData: [FriendData] = []
|
||||
var userData: [UserParseData] = []
|
||||
var partyData: PartyServiceManager!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
|
||||
override func didReceiveMemoryWarning() {
|
||||
super.didReceiveMemoryWarning()
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
func setData(prty:PartyServiceManager, user: [UserParseData], friends: [FriendData], request: [FriendData]){
|
||||
self.partyData = prty
|
||||
self.userData = user
|
||||
self.friendData = friends
|
||||
self.requestData = request
|
||||
}
|
||||
// MARK: - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
|
||||
|
||||
if segue.identifier == "FromPartySettingsSegue" {
|
||||
let nav: UINavigationController = (segue.destinationViewController as? UINavigationController)!
|
||||
|
||||
let vc: SettingsTableViewController = (nav.viewControllers[0] as? SettingsTableViewController)!
|
||||
vc.setData(self.userData, prty: self.partyData)
|
||||
}
|
||||
|
||||
if segue.identifier == "FromPartyFriendsSegue" {
|
||||
let nav: UINavigationController = (segue.destinationViewController as? UINavigationController)!
|
||||
|
||||
let vc: FriendsListViewController = (nav.viewControllers[0] as? FriendsListViewController)!
|
||||
vc.setData(self.friendData, requst: self.requestData)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -10,6 +10,13 @@ import UIKit
|
||||
import MediaPlayer
|
||||
|
||||
class CurrentlyPlayingViewController: UIViewController {
|
||||
//persistant data
|
||||
var party: PartyServiceManager!
|
||||
var usr: [UserParseData] = []
|
||||
var frnds: [FriendData] = []
|
||||
var requestData: [FriendData] = []
|
||||
|
||||
//controller data
|
||||
@IBOutlet var songImg: UIImageView!
|
||||
@IBOutlet var titleLabel: UILabel!
|
||||
@IBOutlet var artistAndAlbumLabel: UILabel!
|
||||
@ -27,18 +34,8 @@ class CurrentlyPlayingViewController: UIViewController {
|
||||
|
||||
//Guest buttons
|
||||
|
||||
//Regular buttons
|
||||
@IBAction func partyView(sender: UIButton){
|
||||
self.performSegueWithIdentifier("InPartySegue", sender: self)
|
||||
}
|
||||
|
||||
@IBAction func backToHome(sender: UIButton){
|
||||
self.performSegueWithIdentifier("BackToHomeScreenSegue", sender: self)
|
||||
}
|
||||
|
||||
|
||||
|
||||
var party: PartyServiceManager!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
@ -56,8 +53,11 @@ class CurrentlyPlayingViewController: UIViewController {
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
func setData(prty: PartyServiceManager){
|
||||
func setData(prty:PartyServiceManager, user: [UserParseData], friends: [FriendData], request: [FriendData]){
|
||||
self.party = prty
|
||||
self.usr = user
|
||||
self.frnds = friends
|
||||
self.requestData = request
|
||||
}
|
||||
|
||||
|
||||
@ -77,9 +77,8 @@ class CurrentlyPlayingViewController: UIViewController {
|
||||
}
|
||||
|
||||
if segue.identifier == "BackToHomeScreenSegue" {
|
||||
let vc: HomeScreenViewController = (segue.destinationViewController as? HomeScreenViewController)!
|
||||
vc.comingFromParty = true
|
||||
vc.partyData = self.party
|
||||
let vc: BackToHomeScreenViewController = (segue.destinationViewController as? BackToHomeScreenViewController)!
|
||||
vc.setData(self.party, user: self.usr, friends: self.frnds, request: self.requestData)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -14,8 +14,7 @@ class HomeScreenViewController: UIViewController {
|
||||
var friendData: [FriendData] = []
|
||||
var requestData: [FriendData] = []
|
||||
var userData: [UserParseData] = []
|
||||
var partyData = PartyServiceManager()
|
||||
var comingFromParty: Bool!
|
||||
let partyData = PartyServiceManager()
|
||||
|
||||
@IBOutlet weak var CreateAPartyBtn: UIButton!
|
||||
|
||||
@ -87,7 +86,7 @@ class HomeScreenViewController: UIViewController {
|
||||
self.partyData.setRole(PeerType(rawValue: 0)!)
|
||||
|
||||
|
||||
vc.setData(self.userData, frndData: self.friendData, party: self.partyData)
|
||||
vc.setData(self.userData, frndData: self.friendData, party: self.partyData, request: self.requestData)
|
||||
}
|
||||
|
||||
if segue.identifier == "SettingsSegue" {
|
||||
|
||||
@ -10,8 +10,13 @@ import UIKit
|
||||
import MediaPlayer
|
||||
|
||||
class LoadingPartyViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate{
|
||||
//persistant data
|
||||
var party: PartyServiceManager!
|
||||
|
||||
var usr: [UserParseData] = []
|
||||
var frnds: [FriendData] = []
|
||||
var requestData: [FriendData] = []
|
||||
|
||||
//controller data
|
||||
@IBOutlet var songImg: UIImageView!
|
||||
@IBOutlet var invitedFriends: UICollectionView!
|
||||
@IBOutlet var songLabel: UILabel!
|
||||
@ -59,8 +64,11 @@ class LoadingPartyViewController: UIViewController, UICollectionViewDataSource,
|
||||
}
|
||||
}
|
||||
|
||||
func setData(prty: PartyServiceManager){
|
||||
func setData(prty:PartyServiceManager, user: [UserParseData], friends: [FriendData], request: [FriendData]){
|
||||
self.party = prty
|
||||
self.usr = user
|
||||
self.frnds = friends
|
||||
self.requestData = request
|
||||
}
|
||||
|
||||
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
|
||||
@ -101,7 +109,7 @@ class LoadingPartyViewController: UIViewController, UICollectionViewDataSource,
|
||||
// Pass the selected object to the new view controller.
|
||||
if(segue.identifier == "CurrentlyPlayingSegue"){
|
||||
let vc: CurrentlyPlayingViewController = (segue.destinationViewController as? CurrentlyPlayingViewController)!
|
||||
vc.setData(self.party)
|
||||
vc.setData(self.party, user: self.usr, friends: self.frnds, request: self.requestData)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ class LoginController: UIViewController, PFLogInViewControllerDelegate, UITextFi
|
||||
if(user != nil){
|
||||
self.performSegueWithIdentifier("LoginToHomeSegue", sender: self)
|
||||
}else{
|
||||
var alert = UIAlertController(title: "Invalid Login", message: "Your friend request was sent successfully!", preferredStyle: .Alert)
|
||||
var alert = UIAlertController(title: "Invalid Login", message: "Your username/email or password is incorrect!", preferredStyle: .Alert)
|
||||
alert.addAction(UIAlertAction(title: "OK", style: .Default, handler:{(action: UIAlertAction!) in alert.dismissViewControllerAnimated(true, completion: nil)}))
|
||||
|
||||
self.presentViewController(alert, animated: true, completion: nil)
|
||||
@ -69,17 +69,16 @@ class LoginController: UIViewController, PFLogInViewControllerDelegate, UITextFi
|
||||
|
||||
}
|
||||
// MARK: - Navigation
|
||||
|
||||
/*
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
|
||||
|
||||
if segue.identifier == "LoginToHomeSegue" {
|
||||
let vc: HomeScreenViewController = (segue.destinationViewController as? HomeScreenViewController)!
|
||||
vc.comingFromParty = false
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
func textFieldShouldReturn(textField: UITextField) -> Bool {
|
||||
self.view.endEditing(true)
|
||||
return false
|
||||
|
||||
@ -1027,7 +1027,9 @@
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="Agu-kd-wvl"/>
|
||||
<navigationItem key="navigationItem" id="Agu-kd-wvl">
|
||||
<barButtonItem key="leftBarButtonItem" title="Close" id="9LU-py-b7m"/>
|
||||
</navigationItem>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
|
||||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
|
||||
<connections>
|
||||
@ -1057,6 +1059,45 @@
|
||||
</objects>
|
||||
<point key="canvasLocation" x="4301" y="-630"/>
|
||||
</scene>
|
||||
<!--Back To Home Screen View Controller-->
|
||||
<scene sceneID="gCm-Fo-tYn">
|
||||
<objects>
|
||||
<viewController id="Voh-zF-gkm" customClass="BackToHomeScreenViewController" customModule="GetHip" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Mgc-0w-XIy"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="nZn-3W-l13"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="3oq-w0-Q09">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uly-3t-3t6">
|
||||
<rect key="frame" x="271" y="44" width="30" height="29"/>
|
||||
<state key="normal" image="Settings.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<segue destination="0Tt-tN-iza" kind="show" identifier="FromPartySettingsSegue" id="WxI-P3-JZ9"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="78r-X0-7he">
|
||||
<rect key="frame" x="19" y="44" width="56" height="32"/>
|
||||
<state key="normal" image="Friends.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<segue destination="hDZ-CA-Hsj" kind="show" identifier="FromPartyFriendsSegue" id="wiM-xb-lpR"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="khD-ct-hT7" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="3869" y="-1391"/>
|
||||
</scene>
|
||||
<!--Currently Playing View Controller-->
|
||||
<scene sceneID="GJX-js-Rhq">
|
||||
<objects>
|
||||
@ -1072,23 +1113,13 @@
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HKj-kH-yf5">
|
||||
<rect key="frame" x="0.0" y="65" width="320" height="320"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="V0r-OV-CXi">
|
||||
<rect key="frame" x="226" y="16" width="81" height="41"/>
|
||||
<state key="normal" image="Party.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="partyView:" destination="5Fd-vs-lX1" eventType="touchUpInside" id="Npy-DJ-Lfa"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ubi-iW-9FF">
|
||||
<rect key="frame" x="13" y="22" width="34" height="34"/>
|
||||
<rect key="frame" x="13" y="23" width="34" height="34"/>
|
||||
<state key="normal" image="Home Copy.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="backToHome:" destination="5Fd-vs-lX1" eventType="touchUpInside" id="fuE-mc-aza"/>
|
||||
<segue destination="i3K-xv-zw1" kind="presentation" identifier="BackToHomeScreenSegue" id="Ank-g9-HFe"/>
|
||||
<segue destination="Voh-zF-gkm" kind="presentation" identifier="BackToHomeScreenSegue" id="avk-9c-Kgu"/>
|
||||
</connections>
|
||||
</button>
|
||||
<progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wy0-d1-PlB">
|
||||
@ -1153,6 +1184,15 @@
|
||||
<action selector="playPauseFav:" destination="5Fd-vs-lX1" eventType="touchUpInside" id="AgY-Dl-2AA"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="V0r-OV-CXi">
|
||||
<rect key="frame" x="226" y="16" width="81" height="41"/>
|
||||
<state key="normal" image="Party.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<segue destination="enX-CI-fki" kind="show" identifier="InPartySegue" id="OD2-Xh-xf2"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
@ -1166,7 +1206,6 @@
|
||||
<outlet property="songImg" destination="HKj-kH-yf5" id="UAh-IG-J3y"/>
|
||||
<outlet property="titleLabel" destination="tHQ-qY-ZrL" id="RE7-2e-ghS"/>
|
||||
<outlet property="volCtrl" destination="AA9-Xx-q9o" id="3yD-gc-O6r"/>
|
||||
<segue destination="enX-CI-fki" kind="show" identifier="InPartySegue" id="fAI-IV-wRT"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="qk5-ei-kCM" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
@ -1467,6 +1506,7 @@
|
||||
<image name="Cancel.png" width="28" height="28"/>
|
||||
<image name="Change Song.png" width="152" height="24"/>
|
||||
<image name="Create@3x.png" width="471" height="93"/>
|
||||
<image name="Friends.png" width="73" height="42"/>
|
||||
<image name="Friends@3x.png" width="219" height="126"/>
|
||||
<image name="Home Copy.png" width="34" height="34"/>
|
||||
<image name="Lower.png" width="7" height="10"/>
|
||||
@ -1476,12 +1516,15 @@
|
||||
<image name="Raise.png" width="14" height="13"/>
|
||||
<image name="Send Invites Button.png" width="375" height="46"/>
|
||||
<image name="Send.png" width="152" height="24"/>
|
||||
<image name="Settings.png" width="39" height="38"/>
|
||||
<image name="Settings@3x.png" width="116" height="113"/>
|
||||
<image name="Star@3x.png" width="172" height="166"/>
|
||||
<image name="Tap Circle.png" width="28" height="27"/>
|
||||
<image name="Turntable@3x.png" width="434" height="434"/>
|
||||
</resources>
|
||||
<inferredMetricsTieBreakers>
|
||||
<segue reference="Ank-g9-HFe"/>
|
||||
<segue reference="WxI-P3-JZ9"/>
|
||||
<segue reference="5pn-ck-WiI"/>
|
||||
<segue reference="wiM-xb-lpR"/>
|
||||
</inferredMetricsTieBreakers>
|
||||
</document>
|
||||
|
||||
@ -10,8 +10,10 @@ import UIKit
|
||||
import MediaPlayer
|
||||
|
||||
class SongSelectionViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
|
||||
var party: PartyServiceManager! = nil
|
||||
|
||||
var party: PartyServiceManager!
|
||||
var usr: [UserParseData] = []
|
||||
var frnds: [FriendData] = []
|
||||
var requestData: [FriendData] = []
|
||||
|
||||
@IBOutlet weak var table: UITableView!
|
||||
|
||||
@ -85,8 +87,11 @@ class SongSelectionViewController: UIViewController, UITableViewDelegate, UITabl
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
func setData(prty:PartyServiceManager){
|
||||
func setData(prty:PartyServiceManager, user: [UserParseData], friends: [FriendData], request: [FriendData]){
|
||||
self.party = prty
|
||||
self.usr = user
|
||||
self.frnds = friends
|
||||
self.requestData = request
|
||||
}
|
||||
|
||||
func numberOfSectionsInTableView(tableView: UITableView) -> Int {
|
||||
@ -269,7 +274,7 @@ class SongSelectionViewController: UIViewController, UITableViewDelegate, UITabl
|
||||
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
|
||||
if(segue.identifier == "LoadingPartySegue"){
|
||||
let vc: LoadingPartyViewController = (segue.destinationViewController as? LoadingPartyViewController)!
|
||||
vc.setData(self.party)
|
||||
vc.setData(self.party, user: self.usr, friends: self.frnds, request: self.requestData)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@ import MultipeerConnectivity
|
||||
class TestInviteFriendsController: UIViewController, UITableViewDelegate, UITableViewDataSource {
|
||||
var usr: [UserParseData] = []
|
||||
var frnds: [FriendData] = []
|
||||
var requestData: [FriendData] = []
|
||||
var isFriendSelected: [Bool] = []
|
||||
var partyData: PartyServiceManager! = nil
|
||||
|
||||
@ -41,10 +42,11 @@ class TestInviteFriendsController: UIViewController, UITableViewDelegate, UITabl
|
||||
}
|
||||
|
||||
|
||||
func setData(usrDat: [UserParseData], frndData: [FriendData], party: PartyServiceManager){
|
||||
func setData(usrDat: [UserParseData], frndData: [FriendData], party: PartyServiceManager, request: [FriendData]){
|
||||
self.usr = usrDat
|
||||
self.frnds = frndData
|
||||
self.partyData = party
|
||||
self.requestData = request
|
||||
|
||||
for i in 0..<self.frnds.count{
|
||||
self.isFriendSelected.append(false)
|
||||
@ -137,7 +139,7 @@ class TestInviteFriendsController: UIViewController, UITableViewDelegate, UITabl
|
||||
}
|
||||
self.partyData.invitedFriends = invited
|
||||
let vc: SongSelectionViewController = (segue.destinationViewController as? SongSelectionViewController)!
|
||||
vc.setData(self.partyData)
|
||||
vc.setData(self.partyData, user: self.usr, friends: self.frnds, request: self.requestData)
|
||||
println(invited.count)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user