【发布时间】:2012-05-20 15:56:01
【问题描述】:
我正在尝试使用徽标挂钩CLLocationManager's 委托属性的设置。我当前的代码如下所示:
%hook CLLocationManager
-(void)startUpdatingLocation
{
%orig;
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"test"
message:@"hello!"
delegate:nil
cancelButtonTitle:@"Bye"
otherButtonTitles:nil];
[alert show];
[alert release];
}
%end
我想覆盖委托属性的设置,这样我就可以创建一个代理类来过滤发送到应用程序的位置。有没有什么漂亮的方法可以使用徽标来做到这一点?
谢谢!
【问题讨论】: