samedi 30 janvier 2016

Can't return to app after launching web page

Hi i am working on a source code and I noticed when testing that I can't return to the app once I tap on my dos and about button. Ince I tap those button I get directed to my TOS web page and no return or back button show. I did see an answer that addresses this but I am new to coding and so I don't know what code I need and where to put it on my code to fix this. My code: import UIKit

class AboutViewController: UITableViewController {

@IBOutlet weak var termsText: UILabel!
@IBOutlet weak var aboutApp: UILabel!
@IBOutlet weak var logoutt: UILabel!
@IBOutlet weak var refresh: UILabel!






override func viewDidLoad() {
    super.viewDidLoad()

    self.tableView.backgroundColor = backColor

    self.termsText.textColor  = colorText
    self.aboutApp.textColor  = colorText
    self.logoutt.textColor  = colorText
    self.refresh.textColor  = colorText

}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()

    // Dispose of any resources that can be recreated.
}

override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
    if indexPath.section == 1 {
        if indexPath.row == 0 {
            PFUser.logOut()
            currentuser = nil
            let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
            let loginvc = storyb.instantiateViewControllerWithIdentifier("loginvc") as! LoginViewController
            appDelegate.window?.rootViewController = loginvc

        }
        if indexPath.row == 1 {
            currentuser.removeObjectForKey("viewedUsers")
            currentuser.saveInBackgroundWithBlock({ (done, error) -> Void in
                let alert = UIAlertView(title: "Done", message: "Now you can see all users again", delegate: self, cancelButtonTitle: "okay")
                alert.show()
            })
        }
    }
}

}

Can this resolution help me in this case and if so how do I code it After viewing web in app, cannot return to app without closing it and relaunching

Thanks so much

Kyle




Aucun commentaire:

Enregistrer un commentaire