Theos for iOS 8을 사용하여 비틀기를 만들려고합니다. 마지막 응용 프로그램이 닫힐 때 (SpringBoard 카드 만 남아있을 때) 응용 프로그램 전환기가 닫히는 것으로 약속이 구성됩니다. 여기에 전체 소스 코드 (UIKit/UIKit.h에 관심을 지불하지 마십시오, 나는 또한이 있어야 알고 <>) : 나는 "설치 패키지를 만들"로 컴파일하려고Theos "make"오류 : 클래스 메소드를 찾을 수 없습니다.
#import UIKit/UIKit.h
@interface SBAppSwitcherIconController {
NSMutableArray *_appList;
}
@end
@interface SBAppSwitcherController
- (void)_quitAppWithDisplayItem:(id)arg1;
//custom method
- (void)_dismissAppSwitcher;
@end
@interface SBUIController
+ (id)sharedInstance;
- (void)dismissSwitcherAnimated:(_Bool)arg1;
@end
%hook SBAppSwitcherController
- (void)_quitAppWithDisplayItem:(id)arg1 {
%orig();
if ([[%c(SBAppSwitcherIconController) _appList] count] == 0) {
[NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(_dismissAppSwitcher) userInfo:nil repeats:NO];
}
}
%new
- (void)_dismissAppSwitcher {
[[%c(SBUIController) sharedInstance] dismissSwitcherAnimated:YES];
}
%end
명령은,이 오류가 발생합니다 :
Tweak.xm:38:65: error: class method '+_appList' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
if ([[_logos_static_class_lookup$SBAppSwitcherIconController() _appList] count] == 0) {
감사합니다!
자, 제발 말해 줄 수 있습니까? SBAppSwitcherIconController의 _appList를 SBAppSwitcherController에서 가져 오는 방법 - (void) _quitAppWithDisplayItem ...? – vanelizarov