mirror of
https://github.com/oonyeje/Get-Hip.git
synced 2025-12-25 03:37:40 +00:00
working in image downloading for all views
This commit is contained in:
parent
9bf1d93d4c
commit
b263ce3a22
@ -21,6 +21,7 @@
|
||||
3E1BDA6B1C37111D00EE3B84 /* GetHipTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E1BDA6A1C37111D00EE3B84 /* GetHipTests.swift */; };
|
||||
3E1DE9A81C3837E800CA6CD4 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E1DE9A71C3837E800CA6CD4 /* AudioToolbox.framework */; };
|
||||
3E1DE9AE1C38395F00CA6CD4 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E1DE9AD1C38395F00CA6CD4 /* SystemConfiguration.framework */; };
|
||||
3E1EE6391C6D02EB00F5C5D7 /* InPartyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E1EE6381C6D02EB00F5C5D7 /* InPartyViewController.swift */; };
|
||||
3E24F9FF1C5B51690091B9D9 /* Send@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3E24F9FE1C5B51690091B9D9 /* Send@2x.png */; };
|
||||
3E326BCC1C51C20000F785CF /* SettingsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E326BCB1C51C20000F785CF /* SettingsTableViewController.swift */; };
|
||||
3E326BCE1C51C77600F785CF /* SettingsCellWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E326BCD1C51C77600F785CF /* SettingsCellWrapper.swift */; };
|
||||
@ -152,6 +153,7 @@
|
||||
3E1DE9A71C3837E800CA6CD4 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
3E1DE9AB1C3838A800CA6CD4 /* libsystem_network.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsystem_network.dylib; path = usr/lib/system/libsystem_network.dylib; sourceTree = SDKROOT; };
|
||||
3E1DE9AD1C38395F00CA6CD4 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||
3E1EE6381C6D02EB00F5C5D7 /* InPartyViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InPartyViewController.swift; sourceTree = "<group>"; };
|
||||
3E24F9FE1C5B51690091B9D9 /* Send@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Send@2x.png"; path = "../../../Dropbox/Gethip/Screens/Friends + Invite Screens/i5/Friend Found/Send@2x.png"; sourceTree = "<group>"; };
|
||||
3E326BCB1C51C20000F785CF /* SettingsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewController.swift; sourceTree = "<group>"; };
|
||||
3E326BCD1C51C77600F785CF /* SettingsCellWrapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsCellWrapper.swift; sourceTree = "<group>"; };
|
||||
@ -333,6 +335,7 @@
|
||||
3E101F041C52E50400C895CA /* PartySessionSource */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3E1EE6371C6D029800F5C5D7 /* InParty */,
|
||||
3E34125A1C54C73A006226E0 /* PartySession.swift */,
|
||||
3E627FC21C55978E005C0372 /* PartySessionManager.swift */,
|
||||
3E101F071C52E65300C895CA /* PartyServiceManager.swift */,
|
||||
@ -436,6 +439,14 @@
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3E1EE6371C6D029800F5C5D7 /* InParty */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3E1EE6381C6D02EB00F5C5D7 /* InPartyViewController.swift */,
|
||||
);
|
||||
name = InParty;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3E3412551C54C2BC006226E0 /* SelectSong */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -812,6 +823,7 @@
|
||||
3E101F081C52E65300C895CA /* PartyServiceManager.swift in Sources */,
|
||||
3E330B1A1C38502F00276FE4 /* LoginViewController.swift in Sources */,
|
||||
3E627FEA1C55AE35005C0372 /* TDAudioFileStream.m in Sources */,
|
||||
3E1EE6391C6D02EB00F5C5D7 /* InPartyViewController.swift in Sources */,
|
||||
3E627FC31C55978E005C0372 /* PartySessionManager.swift in Sources */,
|
||||
3E627FE61C55AE35005C0372 /* NSInputStream+URLInitialization.m in Sources */,
|
||||
3E5485B51C69CE2F00E7D5AB /* InvitedCollectionViewCell.swift in Sources */,
|
||||
|
||||
@ -19,15 +19,17 @@ class CurrentlyPlayingViewController: UIViewController {
|
||||
|
||||
//Host buttons
|
||||
@IBOutlet var volCtrl: UISlider!
|
||||
@IBOutlet var ppButton: UIButton!
|
||||
@IBAction func endParty(sender: AnyObject){
|
||||
@IBOutlet var ppfButton: UIButton!
|
||||
@IBAction func playPauseFav(sender: UIButton){
|
||||
|
||||
}
|
||||
|
||||
//Guest buttons
|
||||
@IBOutlet var favButton: UIButton!
|
||||
@IBAction func favoriteSong(sender: AnyObject){
|
||||
|
||||
//Guest buttons
|
||||
|
||||
//Regular buttons
|
||||
@IBAction func partyView(sender: UIButton){
|
||||
self.performSegueWithIdentifier("InPartySegue", sender: nil)
|
||||
}
|
||||
|
||||
|
||||
@ -55,14 +57,18 @@ class CurrentlyPlayingViewController: UIViewController {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
// 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?) {
|
||||
// Get the new view controller using segue.destinationViewController.
|
||||
// Pass the selected object to the new view controller.
|
||||
|
||||
if(segue.identifier == "InPartySegue"){
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ import Foundation
|
||||
|
||||
class FriendData {
|
||||
var displayName: String!
|
||||
var profileImg: UIImage!
|
||||
var profileImg: UIImageView!
|
||||
var status: String!
|
||||
|
||||
init(display: String, status: String){
|
||||
|
||||
@ -33,19 +33,21 @@ class FriendDataSource{
|
||||
let userName = object.objectForKey("OtherUser")!.objectForKey("username") as! String
|
||||
let requestStatus = object.objectForKey("RequestStatus")! as! String
|
||||
|
||||
/* let pimage:PFFile = object["profilePicture"] as! PFFile
|
||||
|
||||
pimage.getDataInBackgroundWithBlock({
|
||||
(imageData, error) -> Void in
|
||||
var newFriend: FriendData = FriendData(display: userName, status: requestStatus)
|
||||
|
||||
if !(error != nil) {
|
||||
image = UIImage(data: imageData!)!
|
||||
}
|
||||
})*/
|
||||
var img = object.objectForKey("OtherUser")!.objectForKey("profilePicture")! as? PFFile
|
||||
|
||||
var newFriend: FriendData = FriendData(display: userName, status: requestStatus)
|
||||
//print(userName)
|
||||
self.dataSource.append(newFriend)
|
||||
dispatch_async(dispatch_get_main_queue(), {
|
||||
img!.getDataInBackgroundWithBlock({
|
||||
(imgData, error) -> Void in
|
||||
|
||||
var downloadedImg = UIImage(data: imgData!)
|
||||
newFriend.profileImg.image = downloadedImg
|
||||
})
|
||||
})
|
||||
//print(userName)
|
||||
self.dataSource.append(newFriend)
|
||||
|
||||
|
||||
}
|
||||
@ -64,8 +66,20 @@ class FriendDataSource{
|
||||
|
||||
let userName = object.objectForKey("OtherUser")!.objectForKey("username") as! String
|
||||
let requestStatus = object.objectForKey("RequestStatus")! as! String
|
||||
|
||||
var newFriend: FriendData = FriendData(display: userName, status: requestStatus)
|
||||
|
||||
var img = object.objectForKey("OtherUser")!.objectForKey("profilePicture")! as? PFFile
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), {
|
||||
img!.getDataInBackgroundWithBlock({
|
||||
(imgData, error) -> Void in
|
||||
|
||||
var downloadedImg = UIImage(data: imgData!)
|
||||
newFriend.profileImg.image = downloadedImg
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
//print(userName)
|
||||
self.dataSource.append(newFriend)
|
||||
|
||||
|
||||
@ -59,8 +59,9 @@ class FriendRequestViewController: UIViewController{
|
||||
|
||||
println(friendRequest.objectId!)
|
||||
var params = NSMutableDictionary()
|
||||
params.setObject(friendRequest.objectId! as String!, forKey: "friendRequest")
|
||||
params.setObject((object!.objectForKey("username") as! String!), forKey: "otherUser")
|
||||
|
||||
PFCloud.callFunctionInBackground("alertPotentialFriend", withParameters: params as [NSObject : AnyObject])
|
||||
//var params = NSMutableDictionary()
|
||||
//params.s
|
||||
//var param = ["friendRequest" : friendRequest.objectId!]
|
||||
@ -148,6 +149,19 @@ extension FriendRequestViewController: UITextFieldDelegate{
|
||||
(object: PFObject?, error: NSError?) -> Void in
|
||||
if(error == nil){
|
||||
self.foundName.text = object?.objectForKey("username") as? String
|
||||
|
||||
//download profile imge
|
||||
var img = object!.objectForKey("profilePicture")! as? PFFile
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), {
|
||||
img!.getDataInBackgroundWithBlock({
|
||||
(imgData, error) -> Void in
|
||||
|
||||
var downloadedImg = UIImage(data: imgData!)
|
||||
self.displayImage.image = downloadedImg
|
||||
})
|
||||
})
|
||||
|
||||
self.sendRequest.enabled = true
|
||||
}else{
|
||||
self.foundName.text = "No Friend Found :("
|
||||
|
||||
@ -84,7 +84,7 @@ class FriendsListViewController: UIViewController, UITableViewDelegate, UITableV
|
||||
cell!.proImage.backgroundColor = UIColor.grayColor()
|
||||
}
|
||||
else{
|
||||
|
||||
cell!.proImage.image = friend?.profileImg!.image!
|
||||
}
|
||||
|
||||
//rounds uiimage and configures UIImageView
|
||||
@ -143,12 +143,15 @@ class FriendsListViewController: UIViewController, UITableViewDelegate, UITableV
|
||||
if segue.identifier == "FriendRequestSegue" {
|
||||
var frndNames: [String] = []
|
||||
println(self.friends.count)
|
||||
for i in 0...self.friends.count-1{
|
||||
var frends: FriendData! = self.friends[i] as! FriendData
|
||||
println(frends.displayName!)
|
||||
frndNames.append(frends.displayName!)
|
||||
if (self.friends.count != 0){
|
||||
for i in 0...self.friends.count-1{
|
||||
var frends: FriendData! = self.friends[i] as! FriendData
|
||||
println(frends.displayName!)
|
||||
frndNames.append(frends.displayName!)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*for name in self.friends{
|
||||
//bad instruction here, fix later
|
||||
println(name.displayName as String!)
|
||||
|
||||
49
GetHip/InPartyViewController.swift
Normal file
49
GetHip/InPartyViewController.swift
Normal file
@ -0,0 +1,49 @@
|
||||
//
|
||||
// InPartyViewController.swift
|
||||
// GetHip
|
||||
//
|
||||
// Created by Okechi on 2/11/16.
|
||||
// Copyright (c) 2016 Kroleo. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class InPartyViewController: UIViewController {
|
||||
var party: PartyServiceManager!
|
||||
@IBOutlet var friendsInParty: UICollectionView!
|
||||
@IBOutlet var AddMore: UIButton!
|
||||
@IBOutlet var leaveOrEnd: UIButton!
|
||||
|
||||
//Only visible for host
|
||||
@IBAction func inviteMore(sender: UIButton!){
|
||||
|
||||
}
|
||||
|
||||
//Alternates to either end a party or leave a party depending on host or guest role
|
||||
@IBAction func endOrLeaveParty(sender: UIButton){
|
||||
|
||||
}
|
||||
|
||||
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.
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// 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?) {
|
||||
// Get the new view controller using segue.destinationViewController.
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
@ -54,7 +54,7 @@
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="No Friend Found :(" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wxx-ws-paN">
|
||||
<rect key="frame" x="0.0" y="143" width="320" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Search for a new Friend" textAlignment="center" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="EAo-0U-cmz">
|
||||
@ -656,39 +656,6 @@
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="J3e-IP-vgR">
|
||||
<rect key="frame" x="70" y="74" width="180" height="180"/>
|
||||
</imageView>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="fnx-cI-MJO">
|
||||
<rect key="frame" x="60" y="317" width="200" height="100"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="bFM-de-c07">
|
||||
<size key="itemSize" width="50" height="50"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
<cells>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="InvitedCollectionCell" id="flV-pJ-j2W" customClass="InvitedCollectionViewCell" customModule="GetHip" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="vfW-Rs-nkH">
|
||||
<rect key="frame" x="6" y="6" width="38" height="38"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="friendImage" destination="vfW-Rs-nkH" id="GQs-NP-3tl"/>
|
||||
</connections>
|
||||
</collectionViewCell>
|
||||
</cells>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="C6s-vA-8F4" id="mnd-HU-wEj"/>
|
||||
<outlet property="delegate" destination="C6s-vA-8F4" id="00s-dO-Lj4"/>
|
||||
</connections>
|
||||
</collectionView>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="syM-XP-IbG">
|
||||
<rect key="frame" x="0.0" y="527" width="320" height="41"/>
|
||||
<color key="backgroundColor" red="1" green="0.18659413420000001" blue="0.1031019395" alpha="1" colorSpace="calibratedRGB"/>
|
||||
@ -744,7 +711,7 @@
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Starting in:" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="g1w-zi-xQ8">
|
||||
<rect key="frame" x="105" y="444" width="111" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="W8b-ej-1Jf">
|
||||
@ -752,7 +719,7 @@
|
||||
<attributedString key="attributedText">
|
||||
<fragment content="30">
|
||||
<attributes>
|
||||
<color key="NSColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="NSColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<font key="NSFont" size="17" name="HelveticaNeue"/>
|
||||
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="wordWrapping" baseWritingDirection="natural"/>
|
||||
</attributes>
|
||||
@ -760,6 +727,39 @@
|
||||
</attributedString>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="fnx-cI-MJO">
|
||||
<rect key="frame" x="60" y="317" width="200" height="100"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="bFM-de-c07">
|
||||
<size key="itemSize" width="50" height="50"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
<cells>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="InvitedCollectionCell" id="flV-pJ-j2W" customClass="InvitedCollectionViewCell" customModule="GetHip" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="vfW-Rs-nkH">
|
||||
<rect key="frame" x="6" y="6" width="38" height="38"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="friendImage" destination="vfW-Rs-nkH" id="GQs-NP-3tl"/>
|
||||
</connections>
|
||||
</collectionViewCell>
|
||||
</cells>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="C6s-vA-8F4" id="mnd-HU-wEj"/>
|
||||
<outlet property="delegate" destination="C6s-vA-8F4" id="00s-dO-Lj4"/>
|
||||
</connections>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
@ -776,10 +776,10 @@
|
||||
</objects>
|
||||
<point key="canvasLocation" x="3346" y="-630"/>
|
||||
</scene>
|
||||
<!--View Controller-->
|
||||
<!--In Party View Controller-->
|
||||
<scene sceneID="xQq-TX-8TP">
|
||||
<objects>
|
||||
<viewController id="TaI-jj-ubR" sceneMemberID="viewController">
|
||||
<viewController id="TaI-jj-ubR" customClass="InPartyViewController" customModule="GetHip" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="uLS-vF-X15"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="hSQ-bx-ISt"/>
|
||||
@ -788,8 +788,28 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="m2x-Bt-FQ4">
|
||||
<rect key="frame" x="89" y="340" width="152" height="38"/>
|
||||
<state key="normal" image="Add More.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="inviteMore:" destination="TaI-jj-ubR" eventType="touchUpInside" id="hEJ-yo-qrs"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Tzv-Vd-uaH">
|
||||
<rect key="frame" x="0.0" y="527" width="320" height="41"/>
|
||||
<color key="backgroundColor" red="0.98431372549019602" green="0.082352941176470587" blue="0.086274509803921567" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<state key="normal" title="End Party">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="endOrLeaveParty:" destination="TaI-jj-ubR" eventType="touchUpInside" id="nRC-pt-ZfN"/>
|
||||
</connections>
|
||||
</button>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="Ahn-du-dnu">
|
||||
<rect key="frame" x="0.0" y="65" width="320" height="267"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="Nyu-XJ-vfP">
|
||||
<size key="itemSize" width="50" height="50"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
@ -808,22 +828,16 @@
|
||||
</collectionViewCell>
|
||||
</cells>
|
||||
</collectionView>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Tzv-Vd-uaH">
|
||||
<rect key="frame" x="0.0" y="528" width="320" height="41"/>
|
||||
<state key="normal" image="Leave Party.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="m2x-Bt-FQ4">
|
||||
<rect key="frame" x="89" y="340" width="152" height="38"/>
|
||||
<state key="normal" image="Add More.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="Agu-kd-wvl"/>
|
||||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
|
||||
<connections>
|
||||
<outlet property="AddMore" destination="m2x-Bt-FQ4" id="mHd-3O-0yy"/>
|
||||
<outlet property="friendsInParty" destination="Ahn-du-dnu" id="eZ5-uK-afd"/>
|
||||
<outlet property="leaveOrEnd" destination="Tzv-Vd-uaH" id="fbb-vx-UD8"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="YYE-fc-I8V" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
@ -849,6 +863,9 @@
|
||||
<state key="normal" image="Party.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<segue destination="TaI-jj-ubR" kind="show" identifier="InPartySegue" id="Nob-LL-SKW"/>
|
||||
</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"/>
|
||||
@ -865,7 +882,7 @@
|
||||
<attributedString key="attributedText">
|
||||
<fragment content="0:00">
|
||||
<attributes>
|
||||
<color key="NSColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="NSColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<font key="NSFont" size="13" name="HelveticaNeue"/>
|
||||
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural"/>
|
||||
</attributes>
|
||||
@ -878,7 +895,7 @@
|
||||
<attributedString key="attributedText">
|
||||
<fragment content="10:00">
|
||||
<attributes>
|
||||
<color key="NSColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="NSColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<font key="NSFont" size="13" name="HelveticaNeue"/>
|
||||
<paragraphStyle key="NSParagraphStyle" alignment="right" lineBreakMode="wordWrapping" baseWritingDirection="natural"/>
|
||||
</attributes>
|
||||
@ -891,7 +908,7 @@
|
||||
<attributedString key="attributedText">
|
||||
<fragment content="Song Title">
|
||||
<attributes>
|
||||
<color key="NSColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="NSColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<font key="NSFont" size="17" name="HelveticaNeue-Bold"/>
|
||||
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="wordWrapping" baseWritingDirection="natural"/>
|
||||
</attributes>
|
||||
@ -902,48 +919,31 @@
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Artist - Album" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VtF-OO-Edp">
|
||||
<rect key="frame" x="13" y="442" width="294" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<slider opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="AA9-Xx-q9o">
|
||||
<rect key="frame" x="26" y="465" width="268" height="31"/>
|
||||
</slider>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sFb-YR-QlX">
|
||||
<rect key="frame" x="138" y="20" width="44" height="43"/>
|
||||
<rect key="frame" x="138" y="505" width="44" height="43"/>
|
||||
<state key="normal" image="StarPlayer.png">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="favoriteSong:" destination="5Fd-vs-lX1" eventType="touchUpInside" id="I7l-Fn-CW4"/>
|
||||
<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="LsI-8y-Mtz">
|
||||
<rect key="frame" x="0.0" y="529" width="320" height="39"/>
|
||||
<color key="backgroundColor" red="1" green="0.18659413420000001" blue="0.1031019395" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<state key="normal" title="End Party">
|
||||
<color key="titleColor" red="0.98961303099999998" green="1" blue="0.94095818539999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="endParty:" destination="5Fd-vs-lX1" eventType="touchUpInside" id="HJi-Qc-wsY"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7fd-Tq-ezH">
|
||||
<rect key="frame" x="137" y="498" width="46" height="30"/>
|
||||
<state key="normal" title="Button">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
<slider opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="AA9-Xx-q9o">
|
||||
<rect key="frame" x="26" y="465" width="268" height="31"/>
|
||||
</slider>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
|
||||
<connections>
|
||||
<outlet property="artistAndAlbumLabel" destination="VtF-OO-Edp" id="qtZ-o0-88p"/>
|
||||
<outlet property="favButton" destination="sFb-YR-QlX" id="lE0-U8-PXL"/>
|
||||
<outlet property="maxLabel" destination="okD-F3-qgw" id="hUU-67-4zW"/>
|
||||
<outlet property="minLabel" destination="80y-aA-luy" id="cze-2A-X7w"/>
|
||||
<outlet property="ppButton" destination="7fd-Tq-ezH" id="BHL-aZ-6eJ"/>
|
||||
<outlet property="ppfButton" destination="sFb-YR-QlX" id="POG-Fe-CTk"/>
|
||||
<outlet property="progressBar" destination="wy0-d1-PlB" id="tz6-o2-Q21"/>
|
||||
<outlet property="songImg" destination="HKj-kH-yf5" id="UAh-IG-J3y"/>
|
||||
<outlet property="titleLabel" destination="tHQ-qY-ZrL" id="RE7-2e-ghS"/>
|
||||
@ -1249,7 +1249,6 @@
|
||||
<image name="Create@3x.png" width="471" height="93"/>
|
||||
<image name="Friends@3x.png" width="219" height="126"/>
|
||||
<image name="Home Copy.png" width="34" height="34"/>
|
||||
<image name="Leave Party.png" width="320" height="41"/>
|
||||
<image name="No Friend Requests i5.png" width="320" height="568"/>
|
||||
<image name="Party.png" width="81" height="41"/>
|
||||
<image name="Send Invites Button.png" width="375" height="46"/>
|
||||
|
||||
@ -133,7 +133,7 @@ class PendingRequestViewController: UITableViewController {
|
||||
cell!.proImg.backgroundColor = UIColor.grayColor()
|
||||
}
|
||||
else{
|
||||
|
||||
cell!.proImg.image = pending?.profileImg.image!
|
||||
}
|
||||
|
||||
//rounds uiimage and configures UIImageView
|
||||
|
||||
@ -198,19 +198,20 @@ class ProfileDetailViewController: UIViewController, UINavigationControllerDeleg
|
||||
}
|
||||
|
||||
|
||||
func setData(){
|
||||
self.profileImg = nil
|
||||
func setData(proImage:UIImageView){
|
||||
self.profileImg = proImage
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
self.img!.layer.cornerRadius = self.img!.frame.size.width/2
|
||||
|
||||
if self.profileImg == nil{
|
||||
self.img!.backgroundColor = UIColor.grayColor()
|
||||
}
|
||||
else{
|
||||
self.img = self.profileImg
|
||||
self.img.image = self.profileImg.image!
|
||||
}
|
||||
self.img.layer.cornerRadius = self.img!.frame.size.width/2
|
||||
|
||||
self.ChngPhtoBtn!.layer.borderWidth = 1
|
||||
self.ChngPhtoBtn!.layer.cornerRadius = 5
|
||||
|
||||
@ -210,7 +210,7 @@ class SettingsTableViewController: UIViewController, UITableViewDataSource, UITa
|
||||
|
||||
if self.user.count > 0 {
|
||||
let vc: ProfileDetailViewController = (segue.destinationViewController as? ProfileDetailViewController)!
|
||||
vc.setData()
|
||||
vc.setData((self.user[0] as? UserParseData)!.profileImg)
|
||||
println("img")
|
||||
}
|
||||
|
||||
|
||||
@ -33,6 +33,8 @@ class UserParseDataSource{
|
||||
usrName = object.objectForKey("username")! as! String
|
||||
displayName = object.objectForKey("displayName") as! String
|
||||
|
||||
|
||||
|
||||
if displayName.isEmpty {
|
||||
displayName = usrName
|
||||
}
|
||||
@ -41,6 +43,18 @@ class UserParseDataSource{
|
||||
|
||||
|
||||
usr = UserParseData(usrName: usrName, dispName: displayName, email: email)
|
||||
|
||||
var img = object.objectForKey("profilePicture")! as? PFFile
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), {
|
||||
img!.getDataInBackgroundWithBlock({
|
||||
(imgData, error) -> Void in
|
||||
|
||||
var downloadedImg = UIImage(data: imgData!)
|
||||
usr.profileImg = UIImageView(image: downloadedImg)
|
||||
})
|
||||
})
|
||||
|
||||
self.user.append(usr)
|
||||
//print(userName)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user