In my App after signup/login I want to move control to specific tab of UITabBarController
on some conditions. My login or Signup Pages are not in UITabBarController
.
Here is the code of my login button I have tried but it only works with identifier or UITabBarController
. In my case I want to move to specific tab like 2nd or 3rd tab.
@IBAction func btn_login(sender: AnyObject) {
activityIndicator.progressBarDisplayer("Logging In", true, uiView: self.view)
let timezone = GLib.timezone();
let parameters = ["email": txtemail.text!,"password": txtpassword.text!,"time_zone": timezone]
GLib.fetch("www.abc.com/test/auth/login", parameters: parameters, localkey: "user"){
(isResponse) -> Void in
if(isResponse == true)
{
self.activityIndicator.strLabel.text = "Personalizing Data";
let viewController:UIViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewControllerWithIdentifier("some identifier") as UIViewController;
self.presentViewController(viewController, animated: false, completion: nil);
}else
{
self.show_alert("Attention Please!", message: self.GLib.error)
}
}
I have seen many posts but found nothing similar to my mechanism.
I am new to iOS
programming so don't know how to figure out this issue.