English 中文(简体)
本土土著发展协会无法从本土的IOS中看到土著反应。
原标题:react native can not find view by nativeID from native IOS

我曾尝试过,但我没有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
  }

帮助

问题回答

暂无回答




相关问题
HandleClick not being recognized as a prop

I m trying to get my menu to show when I click the sidebar, but I m getting an error "react-dom.development.js:86 Warning: React does not recognize the handleClick prop on a DOM " import { ...

Is there an equivalent to localStorage in React Native?

I d like to implement the equivalent to the javascript localStorage in my React Native app. But I m unsure how to set. To function how I want it to, I would like the localStorage to be stored every ...

Video Calling in Expo React Native Application

I am building a React Native Application using Expo and I want to integrate a 1:1 video calling functionality in the app. From what I have researched so far on the topic is that I can use SDKs of ...

热门标签