0

我需要能够在不按默认提供的按钮的情况下启动此示例中的身份验证过程。

我要运行的操作是 -(void)buttonPressed 方法,但是如果我尝试手动调用它,插件就会崩溃。它是通过按下该按钮自动调用的,但如果能够按下回车就很好了。

4

1 回答 1

1

This should all be obvious after a single glance in the plugin source code you linked!

While it shouldn't crash (after a quick look into the class code), you probably do not supply the appropriate sender when sending buttonPressed: from your code. The method is defined as

- (void)buttonPressed:(SFButtonType)inButtonType

Which clearly shows the button that was pressed is given as sender. So in your code when calling buttonPressed: do for example like:

["referenceRToClass" buttonPressed:SFButtonTypeOK];
于 2014-03-31T10:25:20.937 回答