 import ParseUI
 import MBProgressHUD
 
-enum ActionSheetTags: Int {
-    case MainAction = 0,
-    ConfirmDeleteAction = 1
-}
-
 let kPAPCellInsetWidth: CGFloat = 0.0
 
-class PAPPhotoDetailsViewController : PFQueryTableViewController, UITextFieldDelegate, UIActionSheetDelegate, PAPPhotoDetailsHeaderViewDelegate, PAPBaseTextCellDelegate {
+class PAPPhotoDetailsViewController : PFQueryTableViewController, UITextFieldDelegate, PAPPhotoDetailsHeaderViewDelegate, PAPBaseTextCellDelegate {
     private(set) var photo: PFObject?
     private var likersQueryInProgress: Bool
     

        return textField.resignFirstResponder()
    }


    // MARK - UIActionSheetDelegate

    // FIXME!!!!!!!!!
    func actionSheet(actionSheet: UIActionSheet, clickedButtonAtIndex buttonIndex: Int) {
        if actionSheet.tag == ActionSheetTags.MainAction.rawValue {
            if actionSheet.destructiveButtonIndex == buttonIndex {
                // prompt to delete
                let actionSheet: UIActionSheet = UIActionSheet(title: NSLocalizedString("Are you sure you want to delete this photo?", comment: ""), delegate: self, cancelButtonTitle: NSLocalizedString("Cancel", comment: ""), destructiveButtonTitle: NSLocalizedString("Yes, delete photo", comment: ""), otherButtonTitles: "")
                actionSheet.tag = ActionSheetTags.ConfirmDeleteAction.rawValue
                actionSheet.showFromTabBar(self.tabBarController!.tabBar)
            } else {
                self.activityButtonAction(actionSheet)
            }
        } else if actionSheet.tag == ActionSheetTags.ConfirmDeleteAction.rawValue {
            if actionSheet.destructiveButtonIndex == buttonIndex {
                
                self.shouldDeletePhoto()
            }
        }
    }


    // MARK:- UIScrollViewDelegate

    override func scrollViewWillBeginDragging(scrollView: UIScrollView) {

        commentTextField!.delegate = self
        self.tableView.tableFooterView = footerView

        self.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Action, target: self, action: Selector("actionButtonAction:"))
        
        // Register to be notified when the keyboard will be shown to scroll the view
        NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("keyboardWillShow:"), name: UIKeyboardWillShowNotification, object: nil)
