Quantcast
Channel: 睿论坛 - 最新话题
Viewing all articles
Browse latest Browse all 5702

Hook SpringBoard无效,没有Alert弹框。求路过大神指点下小白!!!

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 5702

Trending Articles