Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/96.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 获取这两个类之间的返回值_Iphone_Ios_Class_Return Value_Uialertview - Fatal编程技术网

Iphone 获取这两个类之间的返回值

Iphone 获取这两个类之间的返回值,iphone,ios,class,return-value,uialertview,Iphone,Ios,Class,Return Value,Uialertview,下面是我为在iOS 5上快速回复而编写的代码的一部分,我想知道的是如何从SBBulletinBannerItem下的3个方法中获取返回值,并相应地显示在标题和消息字段中,在我整理好之后,我将使用_appName返回值来告诉手势,如果是短信,则打开快速回复提醒,如果是其他内容,则打开应用程序。我尝试了很多方法,但似乎无法使其正常工作,谢谢 %hook SBBulletinBannerController - (void)_handleBannerTapGesture:(id)qreply {

下面是我为在iOS 5上快速回复而编写的代码的一部分,我想知道的是如何从SBBulletinBannerItem下的3个方法中获取返回值,并相应地显示在标题和消息字段中,在我整理好之后,我将使用_appName返回值来告诉手势,如果是短信,则打开快速回复提醒,如果是其他内容,则打开应用程序。我尝试了很多方法,但似乎无法使其正常工作,谢谢

%hook SBBulletinBannerController

- (void)_handleBannerTapGesture:(id)qreply

{
    qreply = [[UIAlertView alloc] initWithTitle:@"title" message:@"message" delegate:self cancelButtonTitle:@"Close" otherButtonTitles:@"Reply", nil];
    [qreply show];
    [qreply release];
}

%end

%hook SBBulletinBannerItem

- (id)_appName { return %orig; }
- (id)title { return %orig; }
- (id)message { return %orig; }

%end

这是什么代码?它不是Objective C。它使用theos,它的obj-C,但它使用预处理器添加适当的前缀,并更改一些值,例如%orig;这将在不进行修改的情况下完成原始方法