2012-02-19 34 views

回答

0

我在另一個線程中寫了一個答案,這個線程顯然是一些人非常喜歡的;看看它here

不過,@ EvilPenguin的回答是完全正確的,我只是在這裏和那裏解釋一些事情,但它最終會將您重定向到同一個地方。

0
#import <SpringBoard/SpringBoard.h> // for SBScreenFlash 
%hook SBAwayLockBar 
-(void)unlock // the method you’re hooking 
{ 
%orig; 
[[%c(SBScreenFlash) sharedInstance] flash]; 
} 
%end 

如果你使用Slider解鎖你的設備,它會截屏你的屏幕。它不是一個好的調整,但它只是你所要求的。

#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 

這會提示alertview給你打個招呼世界;) 玩得開心