[英]Make the inner elements accessible when accessible={true} for the outer view in React native- iOS
I am very new to react native.我对本地反应很陌生。 I have a view which is having a text containing a url.我有一个视图,其中包含一个包含 url 的文本。 I want to make the outer view accessible and then when the user swipes right it should focus on the url/link as we do in iOS.我想让外部视图可访问,然后当用户向右滑动时,它应该像我们在 iOS 中那样专注于 url/link。 For me when I make the outer view accessible={true} the inner elements will be non accessible.对我来说,当我使外部视图可访问={true} 时,内部元素将不可访问。 And also I am not able to find out much content regarding the same.而且我也无法找到很多关于相同的内容。 Can anyone give an insight on this.任何人都可以对此提供见解。
<View><Text>Some text</Text><View>
<View><Text>Text with url</Text></View>
</View>
As I mentioned above I want both outer and inner views accessible.正如我上面提到的,我希望可以访问外部和内部视图。 It works fine in android but not in iOS.Any help is appreciated.它在 android 中运行良好,但在 iOS 中不能正常工作。感谢任何帮助。
After some investigation on the above issue, I reached to a conclusion like, in iOS if we add accessibile={true} to the outer view , it will not allow the inner views to be accessible which is the default behaviour in iOS.在对上述问题进行了一些调查之后,我得出了一个结论,例如,在 iOS 中,如果我们将 accessibile={true} 添加到外部视图,它将不允许访问内部视图,这是 iOS 中的默认行为。 In android normally it works in the other way.在android中,它通常以另一种方式工作。 Android equivalent of accessible property is 'importantForAccessibility'. Android 中可访问属性的等效项是“importantForAccessibility”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.