【发布时间】:2025-12-31 22:35:01
【问题描述】:
【问题讨论】:
标签: swift methods arguments uicolor theos
【问题讨论】:
标签: swift methods arguments uicolor theos
如您所见,目标类是:CNContactView 目标方法是:-(void) setBackgroundColor:(id)
你可以用你需要的任何值替换 (id) .. 在你的情况下 (UIColor *) 然后添加 "arg" 所以它会是 (UIColor *)arg
在你的 Tweak.x 中应该是这样的:
%hook CNContactView
-(void) setBackgroundColor:(UIColor *)arg {
// You can use this one
arg = [UIColor redColor];
// Or this one
arg = [UIColor colorWithRed:36.0f/255.0f green:52.0f/255.0f blue:71.0f/255.0f alpha:1.0];
return %orig;
}
%end
【讨论】: