0

我想知道如何制作一个基本的“你好,世界!” MobileSubstrate调整。

4

3 回答 3

2

入门将帮助您设置开发环境。这个IPF将帮助您了解构建您的调整/应用程序,您可以查看我的github以获取代码示例。

于 2012-03-15T14:52:04.350 回答
0

我在另一个线程中写了一个答案,显然有些人非常喜欢;看看这里

尽管如此,@EvilPenguin 的回答是完全正确的,我只是在这里和那里解释了几件事,但它最终会将你重定向到同一个地方。

于 2012-08-05T22:06:31.200 回答
0
#import <SpringBoard/SpringBoard.h> // for SBScreenFlash
%hook SBAwayLockBar
-(void)unlock // the method you’re hooking
{
 %orig;
[[%c(SBScreenFlash) sharedInstance] flash];
}
%end

如果您使用滑块解锁设备,它将截取您的屏幕。这不是一个好的调整,但这是你所要求的。

 #import <SpringBoard/SpringBoard.h> // for SBScreenFlash
    %hook SBAwayLockBar
    -(void)unlock // the method you’re hooking
    {
     %orig;
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Hello World!" message:@"my first Tweak" delegate:nil cancelButtonTitle:@"Cool" otherButtonTitles:nil];
[alert show];
[alert release];
    }
    %end

这将提示您向您说 hello world 的 alertview ;) 玩得开心

于 2012-10-11T17:21:12.560 回答