views:

33

answers:

1

I have a UITableViewController that is pushing some views when clicking on a cell:

switch(indexPath.row) {
                case kFollowerSectionUpdatesCountRow:                   
                    stockTwitsView.reloadUpdates = TRUE;
                    stockTwitsView.showHomeButton = TRUE; //** reversed, true means hide the button
                    stockTwitsView.profileName = self.user_name;
                    stockTwitsView.msgSource = self.message_source;
                    [self.navigationController pushViewController:stockTwitsView animated:YES];
                    break;
                case kFollowerSectionFollowerCountRow:                  
                    followSectionDetailView.username = self.user_name;
                    followSectionDetailView.loadFollowers = TRUE;
                    [self.navigationController pushViewController:followSectionDetailView animated:YES];
                    break;
                case kFollowerSectionFollowingCountRow:                 
                    followSectionDetailView.username = self.user_name;
                    followSectionDetailView.loadFollowing = TRUE;
                    [self.navigationController pushViewController:followSectionDetailView animated:YES];
                    break;
            }

Everything works fine, except for kFollowerSectionUpdatesCountRow. It will push the view, but if I click the back button, it loads the same view again instead of going back? I have to click back again in order to get back to my original screen. This does not happen with any of the other views being pushed.

Not sure why?

UPDATE: What is odd is this section is the 3rd section of my UITableView. If i change it to the 2nd section, the view controller only gets pushed once. Why?

A: 

Are you by any chance calling pushViewController when you are going 'back'? If so, don't do that. No need to call pushViewController when navigating back to parent caller.

AlvinfromDiaspar
I am not calling anything when I am going back. I'm letting the OS handle everything.
Sheehan Alam