Basically what I'm trying to do is call the attemptDeviceUnlockWithPassword
method from SBDeviceLockScreenViewController
's lockScreenView
method. What is the proper way to call an instance method from a different class?
%hook SBLockScreenViewController
-(void)lockScreenView:(id)view didScrollToPage:(int)page
{
if (page==0)
{
//call attemptDeviceUnlockWithPassword:@"0000" appRequested:NO
}
%orig;
}
%end
%hook SBDeviceLockController
- (BOOL)attemptDeviceUnlockWithPassword:(NSString *)passcode appRequested:(BOOL)requested
{
return %orig;
}
%end