Passing image from one view to another

后端 未结 3 1409
迷失自我
迷失自我 2021-01-01 02:54

I\'m getting an image from the user from the photo gallery, and I want to pass it to a another view...

I\'ve read that I should be able to simply do something like t

3条回答
  •  失恋的感觉
    2021-01-01 03:06

    First Viewcontroller:

    -(void)passimage
    {
        Second_ViewController *select_main = [[UIStoryboard storyboardWithName:@"Main" bundle:nil]instantiateViewControllerWithIdentifier:@"Second_ViewController"];
        select_main.tt_image = _bg_imageview.image;
        [[self navigationController]  pushViewController:select_main animated:YES];
    }
    

    Second Viewcontroller pass UIImage object:

    - (void)viewDidLoad {
    
        _bg_imageview.image = _bb_image;
    }
    

提交回复
热议问题