如何自定义“登录错误无效的登录凭据"? [英] How do I customize "Login Error invalid login credentials"?

查看:262
本文介绍了如何自定义“登录错误无效的登录凭据"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Parse.com上遇到登录问题.

I am having trouble with a login issue on Parse.com.

当用户输入错误的用户名或密码信息时,将显示一条消息:

When the user enters wrong information for the username or password, a message shows up:

登录错误无效的登录凭据

Login Error invalid login credentials

从功能上来说还可以,但是我无法确定此消息的来源,以便对其进行自定义.

Thats is functionally fine, but I can’t figure out where this message is coming from, in order to customize it.

我首先想到了这个方法

- (void)logInViewController:(PFLogInViewController *)logInController
    didFailToLogInWithError:(NSError *)error

将是我一直在寻找的东西.但是在尝试之后,似乎并非如此. 即使我覆盖了它,旧消息仍然在我覆盖的方法之上出现.

would be what I was looking for. But after trying out, it appears that it is not. Even if I overwrite it, the old message is still coming up, on top of my overwritten method.

关于我如何更改此消息的任何想法?

Any idea about how I can change this message?

推荐答案

您可能可以通过以下操作进行自定义:

You might be able to customize by doing the following:

从Parse.com -无法在当前的SDK,但是您可以提供一个覆盖以下字符串的Localizable.strings文件:

From Parse.com - The alert cannot be removed in the current SDK, but you can provide a Localizable.strings file that overrides the following strings:

NSString *ok = NSLocalizedString(@"OK", @"OK");
NSString *title = NSLocalizedString(@"Your Error Title", @"Login Error");
NSString *message = NSLocalizedString(@"Your Error Message", @"invalid login credentials");

将您的错误标题或消息替换为您想要向用户显示的内容.

Replace Your Error Title or Message with what you would like to display to the user.

这篇关于如何自定义“登录错误无效的登录凭据"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆