fixed auto login issue, fixed ui bugs in settings view, made all images circular, and app will reload data now. Will work on fixing filter songs selection button in select song view controller

This commit is contained in:
Okechi 2016-02-23 20:14:55 -05:00
parent 77c4a76e39
commit 84453584dd
13 changed files with 62 additions and 30 deletions

View File

@ -41,6 +41,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate , CLLocationManagerDelegat
print(paths[0])
startSignificantChangeUpdates()
//check if user logged in on app startup
if(PFUser.currentUser() != nil){
var storyboard = UIStoryboard(name: "Main", bundle: nil)
var initialViewController = storyboard.instantiateViewControllerWithIdentifier("HomeVC") as! HomeScreenViewController
self.window?.rootViewController = initialViewController
self.window?.makeKeyAndVisible()
}
return true
}

View File

@ -103,6 +103,8 @@ class FriendRequestViewController: UIViewController{
super.viewDidLoad()
searchBar.delegate = self
self.displayImage.layer.cornerRadius = self.displayImage.frame.size.width/2
self.displayImage.clipsToBounds = true
self.sendRequest.enabled = false
self.sendRequest.tintColor = UIColor.grayColor()

View File

@ -32,12 +32,14 @@ class FriendsListViewController: UIViewController, UITableViewDelegate, UITableV
self.request = requst
self.party = party
}
override func viewDidLoad() {
super.viewDidLoad()
self.table.delegate = self
self.table.dataSource = self
self.title = "Friends"
self.navigationController?.navigationBarHidden = false
//self.navigationItem.rightBarButtonItem = self.editButtonItem()
//self.friends = manager.getFriends()
@ -47,6 +49,7 @@ class FriendsListViewController: UIViewController, UITableViewDelegate, UITableV
}
/*func refreshTable(notification: NSNotification){
self.friends = manager.getFriends()
self.table.reloadData()
@ -96,9 +99,8 @@ class FriendsListViewController: UIViewController, UITableViewDelegate, UITableV
//rounds uiimage and configures UIImageView
//cell!.proImage.layer.borderWidth = 3.0
//cell!.proImage.clipsToBounds = true
cell!.proImage.layer.cornerRadius = cell!.proImage.frame.size.width/2
cell!.proImage.clipsToBounds = true
//cell!.proImage.layer.borderColor = UIColor.whiteColor().CGColor
//cell!.proImage.layer.masksToBounds = true

View File

@ -9,12 +9,13 @@
import UIKit
class HomeScreenViewController: UIViewController {
var usrDataManager = UserParseDataSource()
var frndDataManager = FriendDataSource()
var usrDataManager: UserParseDataSource!
var frndDataManager: FriendDataSource!
var friendData: [FriendData] = []
var requestData: [FriendData] = []
var userData: [UserParseData] = []
let partyData = PartyServiceManager()
var firstTime: Bool = true
@IBOutlet weak var CreateAPartyBtn: UIButton!
@ -34,13 +35,18 @@ class HomeScreenViewController: UIViewController {
}
func refreshUserData(notification:NSNotification){
self.userData = self.usrDataManager.getUser()
self.partyData.setPeerID((self.userData[0].displayName))
self.partyData.setAdvertiser()
if(self.firstTime == true){
self.partyData.setPeerID((self.userData[0].displayName))
self.partyData.setAdvertiser()
//start peer-to-peer advertising
self.partyData.startListening()
self.firstTime = false
}
//start peer-to-peer advertising
self.partyData.startListening()
}
func loadID(notification: NSNotification){
@ -70,7 +76,21 @@ class HomeScreenViewController: UIViewController {
NSNotificationCenter.defaultCenter().addObserver(self, selector: "refreshFriendData:", name: "refreshTableView", object: nil)
NSNotificationCenter.defaultCenter().addObserver(self, selector: "refreshUserData:", name: "refreshSettingsView", object: nil) }
NSNotificationCenter.defaultCenter().addObserver(self, selector: "refreshUserData:", name: "refreshSettingsView", object: nil)
}
override func viewWillAppear(animated: Bool) {
self.userData = []
self.friendData = []
dispatch_async(dispatch_get_main_queue(), {
self.usrDataManager = UserParseDataSource()
self.frndDataManager = FriendDataSource()
})
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()

View File

@ -60,12 +60,8 @@ class InPartyViewController: UIViewController, UICollectionViewDataSource, UICol
}
//rounds uiimage and configures UIImageView
//cell!.proImage.layer.borderWidth = 3.0
//cell!.proImage.clipsToBounds = true
cell.friendImage.layer.cornerRadius = cell.friendImage.frame.size.width/2
//cell.alpha = 0.5
//cell!.proImage.layer.borderColor = UIColor.whiteColor().CGColor
//cell!.proImage.layer.masksToBounds = true
cell.friendImage.clipsToBounds = true
return cell

View File

@ -84,12 +84,9 @@ class LoadingPartyViewController: UIViewController, UICollectionViewDataSource,
}
//rounds uiimage and configures UIImageView
//cell!.proImage.layer.borderWidth = 3.0
//cell!.proImage.clipsToBounds = true
cell.friendImage.layer.cornerRadius = cell.friendImage.frame.size.width/2
cell.friendImage.clipsToBounds = true
cell.alpha = 0.5
//cell!.proImage.layer.borderColor = UIColor.whiteColor().CGColor
//cell!.proImage.layer.masksToBounds = true
return cell

View File

@ -38,16 +38,20 @@ class LoginController: UIViewController, PFLogInViewControllerDelegate, UITextFi
@IBAction func signUpBtnPressed(sender: UIButton){
self.performSegueWithIdentifier("signUpSegue", sender: self)
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
//check if user already signed in
if(PFUser.currentUser() != nil){
/*if(PFUser.currentUser() != nil){
presentLoggedInAlert()
}
}*/
self.userEmailField.delegate = self
self.password.delegate = self
self.signIn.layer.borderWidth = 1

View File

@ -1646,9 +1646,9 @@
<image name="Turntable@3x.png" width="434" height="434"/>
</resources>
<inferredMetricsTieBreakers>
<segue reference="hDN-yC-fGj"/>
<segue reference="41S-h6-flP"/>
<segue reference="OpG-wQ-NAH"/>
<segue reference="hjX-RT-64R"/>
<segue reference="5pn-ck-WiI"/>
<segue reference="bZG-mB-VR5"/>
<segue reference="OpG-wQ-NAH"/>
</inferredMetricsTieBreakers>
</document>

View File

@ -90,7 +90,7 @@ class PartyServiceManager: NSObject {
func chooseNextHost(){
var numPeers = self.connectedPeers().count
var nextHostIndex = Int(arc4random_uniform(UInt32(numPeers)))
var nextHostIndex: Int = Int(arc4random_uniform(UInt32(numPeers)))
if (self.connectedPeers()[nextHostIndex].displayName == self.currentHost){
chooseNextHost()

View File

@ -143,10 +143,8 @@ class PendingRequestViewController: UITableViewController {
}
//rounds uiimage and configures UIImageView
//cell!.proImage.layer.borderWidth = 3.0
//cell!.proImage.clipsToBounds = true
cell!.proImg.layer.cornerRadius = cell!.proImg.frame.size.width/2
cell!.proImg.clipsToBounds = true
//cell!.proImage.layer.borderColor = UIColor.whiteColor().CGColor
//cell!.proImage.layer.masksToBounds = true

View File

@ -212,6 +212,7 @@ class ProfileDetailViewController: UIViewController, UINavigationControllerDeleg
self.img.image = self.profileImg.image!
}
self.img.layer.cornerRadius = self.img!.frame.size.width/2
self.img.clipsToBounds = true
self.ChngPhtoBtn!.layer.borderWidth = 1
self.ChngPhtoBtn!.layer.cornerRadius = 5

View File

@ -53,6 +53,7 @@ class SettingsTableViewController: UIViewController, UITableViewDataSource, UITa
self.table.dataSource = self
self.table.delegate = self
self.navigationController?.navigationBarHidden = false
self.table.tableFooterView = UIView(frame: CGRectZero)
//NSNotificationCenter.defaultCenter().addObserver(self, selector: "refreshTable:", name: "refreshSettingsView", object: nil)
self.table.reloadData()

View File

@ -131,11 +131,10 @@ class TestInviteFriendsController: UIViewController, UITableViewDelegate, UITabl
//rounds uiimage and configures UIImageView
//cell!.proImage.layer.borderWidth = 3.0
//cell!.proImage.clipsToBounds = true
cell!.proImage.layer.cornerRadius = cell!.proImage.frame.size.width/2
//cell!.proImage.layer.borderColor = UIColor.whiteColor().CGColor
//cell!.proImage.layer.masksToBounds = true
cell!.proImage.clipsToBounds = true
cell!.rdioButton.layer.cornerRadius = cell!.rdioButton.frame.size.width/2
cell!.rdioButton.clipsToBounds = true
//for testing purposes - MPCBrowsing
if(self.isInvitable[indexPath.row] == true){