presentModalViewController:Animated is deprecated in ios6

前端 未结 5 1299
醉梦人生
醉梦人生 2020-12-07 14:19

I am using the following code for an image picker. But when I run it in the simulator, I have a memory leak and I get a warning about presentModalViewcontroller:animat

5条回答
  •  盖世英雄少女心
    2020-12-07 15:15

    As Vishal mentioned

    [self presentViewController:imagePicker animated:YES completion:nil];
    [self dismissViewControllerAnimated:YES completion:nil];
    

    make sure you have added "completion:nil" as well

提交回复
热议问题