SBLockScreenDateViewController 锁屏日期没有编程测试数据

   %hook SBLockScreenDateViewController
  • (void)setCustomSubtitleText:(id)arg1 withColor:(id)arg2{
    %orig(@“测试数据”,arg2);
    }
    %end

    Making all for tweak iostest…
    ==> Preprocessing Tweak.xm…
    ==> Compiling Tweak.xm (arm64)…
    ==> Linking tweak iostest (arm64)…
    ==> Generating debug symbols for iostest (arm64)…
    ==> Merging tweak iostest…
    ==> Signing iostest…

Making stage for tweak iostest…

编译安装成功 测试机 iPhone5s ios9.3.2系统

我测试了也没有,应该是系统更新了以后方法名什么的变更了。你需要重新获取你系统版本的对应方法。

%hook SBFLockScreenDateSubtitleView

  • (void)setString:(id)arg1{
    %orig(@“现在的努力,是为了以前吹的牛逼”);
    }
    %end
    试试这个!!

我也是,跟着书上的例子,hook不生效。
按照@xybp888 这位兄弟的代码是可以的,不过代码格式有问题,我重新发一下:

%hook SBFLockScreenDateSubtitleView

-(void)setString:(id)arg1
{
    %orig(@"hello, edwardsbean");
}
%end
1 个赞