Switch two view controller and back not work

Friday, July 4, 2014

im have two view controller UserListView and UserProfileView! in UserListView view controller i'm have a button for swtich to UserProfileView and here is code.


UserListView.m - Click Action



- (IBAction)SettingClick:(id)sender
{
UserList *UserProfile = [self.storyboard instantiateViewControllerWithIdentifier:@"UserProfileView"];
[self presentViewController:UserProfile animated:YES completion:nil];
}


And code working fine, when user switch to profile (UserProfileView) have a close button back to UserListView and here is code.


UserProfileView.m - Close click action



- (IBAction)CloseClick:(id)sender
{
[self dismissViewControllerAnimated:YES completion:nil];
UserProfile *UseList = [self.storyboard instantiateViewControllerWithIdentifier:@"UserListView"];
[self presentViewController:UseList animated:YES completion:nil];
}


in this code i will using [self dismissViewControllerAnimated:YES completion:nil]; to close UserProfileView view controller for low ram usage and it work.


But affter i close UserProfileView i want to open this view controller again and it do not work, UserProfileView not showing again??


i using xcode 5 and building an App for ios 7, please help.


Thanks for your time.







http://ift.tt/1q20IYQ