나는 전원 끄기 아래에 respring 슬라이더를 배치 할 아이폰 조정을하고있다. 적절한 클래스를 찾았습니다. 재정의했습니다. 클릭 할 때 장치를 다시 호출하는 버튼을 삽입 할 수있었습니다. 그러나, 그 위에 "Slide to power off"바처럼 "respring to Slide to"막대를 사용하여 그 버튼을 대체해야합니다. 어떻게해야합니까? 미리 감사드립니다! :)잠금 해제 막대를 사용하여 이벤트를 발생 시키시겠습니까?
편집 :
#import "substrate.h"
#import <UIKit/UIKit.h>
@interface MultiBar
-(void)action;
@end
static UIButton *button;
static UIView *lockView;
%hook SBPowerDownView
-(void)finishedAnimatingIn
{
lockView = MSHookIvar<UIView *>(self, "_dimView");
button = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain];
[button addTarget:self action:@selector(action) forControlEvents:UIControlEventTouchUpInside];
[button setTitle:@"Respring" forState:UIControlStateNormal];
button.frame = CGRectMake(80,100,160,40);
[lockView addSubview:button];
[button release];
%orig;
}
%new([email protected]:)
-(void)action
{
[[UIApplication sharedApplication] relaunchSpringBoard];
}
%end
TelephonyUI.framework
에서 당신이 재료와 영수증을 가지고 우리가 당신에게 케이크를 만들고 싶어 보인다. – Malloc내 소스 코드가 추가되었습니다. 또한, 나는 실제 "슬라이드 바를 여는 슬라이드"를 어디서 찾을 지 모른다. 게다가 잠금 해제 될 때 메소드를 호출하도록해야합니다. 적어도 제게 몇 가지 조언을주세요. :) –