简体   繁体   English

React-Native:如何在应用程序设置iOS中添加按钮?

[英]React-Native: How it can be added buttons in the application settings iOS?

I am trying to add some debug information in my application data when you go to Settings -> Your app. 转到“设置”->“您的应用程序”时,我试图在我的应用程序数据中添加一些调试信息。 I will like to add informations about the application version and a button to delete the application data. 我想添加有关应用程序版本的信息和一个删除应用程序数据的按钮。

I could not find informations to help me making it. 我找不到信息来帮助我实现目标。 Is it a way to make it? 有办法吗?

This has nothing to do with react-native it self. 这与本机自身无关。

You have to follow this guide in order to do so. 您必须遵循本指南才能这样做。

Its a bunch of configs in plist files that will enable you to do so. 它是plist文件中的一堆配置,使您能够做到这一点。

https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html

After that you use this API to get/set values from keys 之后,您可以使用此API从键中获取/设置值

https://facebook.github.io/react-native/docs/settings.html https://facebook.github.io/react-native/docs/settings.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM