diff --git a/GetHip/FriendsListViewController.swift b/GetHip/FriendsListViewController.swift index a7e2b34..76373b4 100644 --- a/GetHip/FriendsListViewController.swift +++ b/GetHip/FriendsListViewController.swift @@ -67,6 +67,7 @@ class FriendsListViewController: UIViewController, UITableViewDelegate, UITableV if( indexPath.row == 0){ let cell = self.table.dequeueReusableCellWithIdentifier("RequestCell", forIndexPath: indexPath) as? FriendRequestCell + self.table.rowHeight = cell!.bounds.size.height //sets count for current number of request cell?.requestNumber.text = String(self.request.count) return cell! @@ -79,6 +80,7 @@ class FriendsListViewController: UIViewController, UITableViewDelegate, UITableV //sets display name of friend (print for debugging purposes) cell!.friendName.text = friend!.displayName + self.table.rowHeight = cell!.bounds.size.height //println(friend!.displayName) //sets profile image of current cell @@ -116,6 +118,20 @@ class FriendsListViewController: UIViewController, UITableViewDelegate, UITableV } + /*func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { + println(indexPath.row) + if indexPath.row == 0{ + let cell = self.table.dequeueReusableCellWithIdentifier("RequestCell", forIndexPath: indexPath) as? FriendRequestCell + + return cell?.bounds.size.height as CGFloat! + }else{ + let cell = self.table.dequeueReusableCellWithIdentifier("FriendCell", forIndexPath: indexPath) as? FriendsCell + + return cell?.bounds.size.height as CGFloat! + + } + }*/ + override func setEditing(editing: Bool, animated: Bool) { super.setEditing(editing, animated: animated) self.table.setEditing(editing, animated: true) diff --git a/GetHip/LoginController.swift b/GetHip/LoginController.swift index 77fac1b..0e9c612 100644 --- a/GetHip/LoginController.swift +++ b/GetHip/LoginController.swift @@ -44,13 +44,17 @@ class LoginController: UIViewController, PFLogInViewControllerDelegate { // Do any additional setup after loading the view. //check if user already signed in if(PFUser.currentUser() != nil){ + presentLoggedInAlert() + } self.signIn.layer.borderWidth = 1 self.signIn.layer.cornerRadius = 5 self.signIn.layer.borderColor = UIColor.whiteColor().CGColor - self.navigationController?.navigationBarHidden = true + //self.navigationController?.navigationBarHidden = true + + } @@ -60,7 +64,8 @@ class LoginController: UIViewController, PFLogInViewControllerDelegate { } func presentLoggedInAlert() { - self.performSegueWithIdentifier("LoginToHomeSegue", sender: self) + var story = UIStoryboard(name: "Main", bundle: nil) + var homeVC: HomeScreenViewController = story.instantiateViewControllerWithIdentifier("HomeVC") as! HomeScreenViewController! } /* // MARK: - Navigation diff --git a/GetHip/Main.storyboard b/GetHip/Main.storyboard index 01084a8..2962414 100644 --- a/GetHip/Main.storyboard +++ b/GetHip/Main.storyboard @@ -353,20 +353,20 @@ - + - + - + @@ -484,7 +484,7 @@ - + @@ -1153,7 +1153,7 @@ - +