获取这两个类之间的返回值
下面是我正在为 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
below is part of my code that I'm working on for quick reply on iOS 5, what i want to know is how to get the return values from the 3 methods under SBBulletinBannerItem to show up in the title and message fields accordingly, after i get this sorted out, I'm going to use the _appName return value to tell the gesture to open the quick reply alert if its sms, or to open the app if its anything else, I've tried quite a bit of things and can't seem to get it to work, thank you
%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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论