我有一个按钮在锁屏显示一个警告时被触摸,我只是玩这个东西,并试图做到这一点,但是当我触摸按钮它崩溃并respring以安全模式进入。我在我的iPhone.Here狄奥运行它是我的代码:按钮不能在锁屏工作
#import <UIKit/UIKit.h>
@interface SBAwayView : UIView
@end
@interface SBAwayController
UIButton *myButton;
-(void)unlockWithSound : (BOOL)sound;
@end
%hook SBAwayController
-(id)lock{
SBAwayView *v = MSHookIvar<id>(self, "_awayView");
myButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
myButton.frame = CGRectMake(21, 80, 100, 35);
[myButton setTitle:@"My Button" forState:UIControlStateNormal];
[myButton addTarget:self action:@selector(myButtonPressed) forControlEvents:UIControlEventTouchUpInside];
[v addSubview:myButton];
%orig;
}
-(void)myButtonPressed{
UIAlertView *theAlert = [[UIAlertView alloc] initWithTitle:@"Title of Alert" message:@"Message of Alert" delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
[theAlert show];
[theAlert release];
}
%end
给我们一些日志。安装来自Cydia的Crash Reporter,然后通过SSH尾部-f/var/log/syslog获取正在运行的“实时”报告。它会在终端窗口中打印日志。 –
这是如何,我试图ssh我的iphone,然后-f/var/log/syslog,但说命令没有找到,在崩溃记者应用程序我有一个崩溃日志你需要跳板崩溃日志吗? – user1628700
我不认为你把尾巴命令。 “tail -f/var/log/syslog”。让我看看这里的崩溃输入。我们可以使用跳板故障日志,但“飞行中”可以更容易地获取崩溃日志。 –