我曾尝试过,但我没有uck。
if let nativeID = nativeID{
if let controller = RCTPresentedViewController(){
if let imageView = self.searchForView(view: controller.view, nativeId: nativeID){
// imageView.hero.id = nativeID
}
}
}
此处为查询方法
func searchForView(view: UIView, nativeId: String) -> UIView? {
if (view.nativeID == nativeId) {
return view
}else{
for subView in view.subviews {
if let v = searchForView(view: subView, nativeId: nativeId) {
return v
}
}
}
return nil
}
帮助