Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to set Outlet Value TopViewController of NavigationController in PreapreForSegue
    primarykey
    data
    text
    <p>My project has the following scenario:</p> <p>[Preview View Controller] --(Modal)--> Navigation Controller --(Top)--> [Photo Setting View Controller]</p> <p>In the [Preview View Controller], I have a button that will perform a modal segue (identifier="PreviewToSetting"), I have in my [Preview View Controller].m file define the prepareForSegue method:</p> <pre><code>- (void)prepareForSegue:(UIStoryboardSegue *) segue sender:(id)sender { if ([segue.identifier isEqualToString:@"PreviewToSetting"]) { UINavigationController *unc=segue.destinationViewController; PhotoSettingViewController *psvc=(PhotoSettingViewController *) unc.topViewController; psvc.lblAudio.text=@"TEST"; } } </code></pre> <p>I set the breakpoint in this procedure and did see the above block running without error. The segue does perform successfully and lead me to the "Photo Setting" scene, however the text of lblAudio was not set to "TEST" as I thought it should be, anyone knows why?</p> <p>Some more information: </p> <ul> <li>lblAudio is an UILabel Outlet property in PhotoSettingViewController (UITableViewController Subclass) in a static table cell within a table section</li> <li><p>lblAudio is sycthesized and defined as</p> <p>@property (strong,nonatomic)IBOutlet UILabel *lblAudio;</p></li> <li><p>The lblAudio IBOutlet is properly bind such that if I redefine the text property in viewWillAppear method like self.lblAudio.text=@"TEST", the label text will be properly get changed to "TEST".</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload