首页 > 解决方案 > 灯箱控制器尝试呈现

问题描述

尝试在视图不在窗口层次结构中的 <UIViewController: 0x7f8865d2d630> 上呈现 <Lightbox.LightboxController: 0x7f8862022600>![在此处输入图像描述][1]

更多描述请参见附件... [1]:https ://i.stack.imgur.com/XTnvs.png

请帮助解决此错误

在 UITableViewCell 中调用(preVC 是主视图控制器)

let controller = LightboxController(images: self.imgArrMain, startIndex: indexPath.row)
    controller.pageDelegate         = self
    controller.dismissalDelegate    = self
    controller.dynamicBackground    = true
    controller.modalPresentationStyle = .fullScreen
    preVC.present(controller, animated: true, completion: nil)}

标签: swiftlightbox

解决方案


推荐阅读