小编Ami*_*reh的帖子

如何在 React Native 中调用 AlertIOS

我是一名 iOS 开发人员,但我知道一点 javascript。我正在尝试使用 AlertIOS,文档 api 是这样的

static alert(title: string, message?: string, buttons?: Array<{ text: ?string; onPress: ?Function; }>) 
Run Code Online (Sandbox Code Playgroud)

我对参数感到困惑。我试着这样写,但它给了我错误。AlertIOS('用户名为空', '请输入您的用户名', buttons: {{text: 'Cancel', onPress: onPressCancel}});

如何正确使用AlertIOS

javascript ios react-native

5
推荐指数
1
解决办法
2552
查看次数

标签 统计

ios ×1

javascript ×1

react-native ×1