@Eisen wrote:
环境:6P 9.3.2
我的Tweak.xm的代码如下:
%hook SpringBoard
- (void)applicationDidFinishLaunching:(id)arg1
{
%orig;
UIAlertView *alertView=[[UIAlertView alloc] initWithTitle:@"提示" message:@"test" delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil, nil];
[alertView show];
[alertView release];
}
%end
网上看到帖子说,要用新的接口,我换成下面这个:
%hook SBLockScreenManager
- (void)lockUIFromSource:(NSUInteger)source withOptions:(id)options {
%orig;UIAlertController* alerView = [UIAlertController alertControllerWithTitle:@"Toast" message:@"hahahaha" preferredStyle:UIAlertControllerStyleAlert]; [self presentViewController:alerView animated:YES completion:nil];
}
%end
可是依旧没有出现这个弹窗。
Posts: 2
Participants: 2