iOS 由cell获取到controller

2018-11-12  本文已影响10人  咸鱼有只喵

在简书上看到了一个很牛逼的方法,记录下来,不用响应链两行搞定;

    UICollectionView *collection = (UICollectionView *) self.superview;
    
    UIViewController *vc = (UIViewController *) collection.dataSource;
    [vc presentViewController:alertController animated:YES completion:nil];
上一篇 下一篇

猜你喜欢

热点阅读