0

I have connected a UITableViewController "ObservationTableViewController" (say: UITVC1) (selected in the screenshots) to another one "ObservationContextTableViewController" (UITVC2) (on the top in the screenshot of the storyboard), via a push segue. When performing the segue by code, based on certain parameters - the new view (UITVC2) does not actually show (on top/ instead of the UITVC1 one); only the title/header shows (mix/blend) of both table view controllers, see screenshot of iPhone. The cells you see are still of the UITVC1.

...
if (nil != self.specialMessage) {
   [self performSegueWithIdentifier:@"segObservationContextTable" sender:self];
   return;
}

and in:

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 
{
    [super prepareForSegue:segue sender:sender];
    if ([segue.identifier isEqualToString:@"segObservationContextTable"]) {
        [[segue destinationViewController] setFieldwork:self.fieldwork];
        if ([TboHelper isProjectNSCRCIT]) {
            [[segue destinationViewController] setContextValuekey:self.specialMessage];
        }
    }
}

The new UITVC2 does run appropriately, code wise, (viewDidLoad, viewWillAppear, etc.) all breakpointed etcetera, no issues - the app does not crash or report any errors. It runs from an actual iPhone (iOS 7.1.2), connected or not through xCode - same thing. Strangely the emulator works perfectly fine, as does on iOS8 devices: the the UITVC2 properly shows instead (pushed) of the UITVC1.

Since views of UITVC1 and UITVC2 seem to blend (title shows, and blends) but cells of the new view UITVC2 do not appear, the interactivity still comes from the UITVC1 'below', from where the segue was performed. The cells of UITVC1 still react to touch, and endlessly (on each touch) push to its own connected UITVC's (say: UITVC3) connected by push segues that act on touching it's cells of UITVC1 - again not actually showing their next views now (under these circumstances of having UITVC2 'on top' though not fully showing), but again only pushing the title to blend with the UITVC from the performed segue. When UITVC2 is not triggered, UITVC1 works fine, and correctly pushes UITV3 on cell touching, by the way.

All this described does not happen when the segue is defined as modal instead of push, but I do not want a modal segue performed, for reasons to be using nav/tool bar options etc.

What is lacking or incorrect since UITVC2 does not properly show itself when pushed; only the title shows, and blends with UITVC1, cells of UITVC2 do not show. All works fine when the segue is a modal segue..

enter image description here

screenshot Xcode

enter image description here

Zoom on UITVCs

enter image description here

LenArt
  • 333
  • 3
  • 6
  • If you are doing anything "by code" then provide the code. :) – Fogmeister Oct 14 '14 at 09:14
  • Need push to use navigation bar and it's options: http://stackoverflow.com/a/15689499/2455390 – LenArt Oct 14 '14 at 09:17
  • Not sure what that means. But can you show some code. – Fogmeister Oct 14 '14 at 09:18
  • Code is here. The prepareForSegue code is not new to me, since I have been using it many times before when attaching segues to specific or prototyped cells. Now the segue is connected via de UITVC in the storyboard, and called by performSegueWithIdentifier which might be the only difference to me, it seems. Again, when using that call with modal segues attached to the UITVC, all is fine. – LenArt Oct 14 '14 at 09:25
  • You are calling it in code. That's fine. But do you also have the segue connected to the Cells in the View Controller? I'm just trying to work out what's going on. It's hard to see what is happening here. Can you show the storyboard maybe? Is the Table View Controller inside a navigation controller? – Fogmeister Oct 14 '14 at 09:28
  • The segue we're talking about, as mentioned in my comment above, is connected to the UITVC not to any cells, since it is triggere by circumstances other than touching a cell. The cells in the view 'below' have segues to other UITVCs, which work fine. Simple push segues when touching the cells. Screenshot attached, of storyboard – LenArt Oct 14 '14 at 09:35
  • OK first off... (UITVC is the same initials for controller and cells :P ). OK, what "other circumstances" trigger this segue? What does 'below' mean? Is this table inside a navigation controller? You are doing really well at obscuring all the information we would need to be able to help you. The best thing to do is to use common terms that everyone knows and not hides things behind phrases like "other circumstances". Without all the info it's really hard to help. – Fogmeister Oct 14 '14 at 09:42
  • Maybe some concrete references too. Instead of UITVC and UITVC. I think (from reading again) that one UITVC that you refer to is not the same as the other UITVC? Is that right? The one "below" is the UITVC that you have tried to segue from? – Fogmeister Oct 14 '14 at 09:44
  • Changed my question, specifying table view controllers. Could not make it any clearer. Otherwise let's wait for some more input from other experts. Thank you. – LenArt Oct 14 '14 at 10:03
  • Is UITVC1 in a navigation controller? I keep asking but you haven't answered yet. – Fogmeister Oct 14 '14 at 11:01

0 Answers0