UIView doesn't resize to full screen when hiding the nav bar & tab bar

后端 未结 15 1556
情歌与酒
情歌与酒 2020-12-02 07:28

I have an app that has a tab bar & nav bar for normal interaction. One of my screens is a large portion of text, so I allow the user to tap to go full screen (sort of l

15条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-02 08:27

    Put the code in a prepare for segue like this, works perfectly for me:

    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
    {
    if ([[segue identifier] isEqualToString:@"ViewPhoto"]) {
    
        ImageView *vc = [segue destinationViewController];
    
        NSInteger selectedIndex = [[self.tableView indexPathForSelectedRow] row];
    
            NSString *Title = [photoNames objectAtIndex:selectedIndex];
            [vc setSelectedTitle:[NSString stringWithFormat:@"%@", Title]];
    
            vc.hidesBottomBarWhenPushed = YES;
    
            }
        }
    

提交回复
热议问题