Makefile内容
include theos/makefiles/common.mk
TWEAK_NAME = iOSRE
iOSRE_FILES = Tweak.xm
iOSRE_FRAMEWORKS = UIKit
include $(THEOS_MAKE_PATH)/tweak.mk
after-install::
install.exec “killall -9 com.aplle.mobilephone”
tweak.xm内容%hook ScriptListViewController
-
(id)initWithNibName:(id)arg1 bundle:(id)arg2
{
%orig;[self setTitle:@“微信精灵”];
return self;
}
%end
%hook PreferenceViewController
-
(id)initWithNibName:(id)arg1 bundle:(id)arg2
{
%orig;[self setTitle:@“微信精灵”];
return self;
}
%end
%hook AboutViewController
-
(id)initWithNibName:(id)arg1 bundle:(id)arg2
{
%orig;
UIView *view = [UIView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];CGRect r = UIScreen mainScreen ].applicationFrame;
CGRect textViewFrame = CGRectMake(r.size.width0.05f, r.size.height0.1f, r.size.width0.9f, r.size.height0.8f);
CGRect cnameViewFrame =CGRectMake(r.size.width0.06f, r.size.height0.04f, r.size.width0.9f, r.size.height0.2f);
UITextView *label = [UITextView alloc]initWithFrame:cnameViewFrame];
NSString * cname = @“crows”;
//label.center = view.center;
label.font = [UIFont fontWithName:@“Arial” size:18.0];//设置字体名字和字体大小
label.text = cname;
label.editable = NO;
label.textAlignment = UITextAlignmentCenter;//CGRect textViewFrame = CGRectMake();
UITextView *textView = [UITextView alloc] initWithFrame:textViewFrame];//UITextView *textView = [UITextView alloc] init]; //初始化大小并自动释放
textView.font = [UIFont fontWithName:@“Arial” size:14.0];//设置字体名字和字体大小
textView.textColor = [UIColor blackColor];//设置textview里面的字体颜色
//textView.delegate = self;//设置它的委托方法
textView.backgroundColor = [UIColor whiteColor];//设置它的背景颜色
textView.text = @“crows”;//设置它显示的内容textView.returnKeyType = UIReturnKeyDefault;//返回键的类型
textView.keyboardType = UIKeyboardTypeDefault;//键盘类型
textView.scrollEnabled = YES;//是否可以拖动
textView.editable = NO;//不可编辑
textView.autoresizingMask = UIViewAutoresizingFlexibleHeight;//自适应高度
textView.backgroundColor = [UIColor whiteColor];
label.backgroundColor = [UIColor whiteColor];
view.backgroundColor = [UIColor whiteColor];
//label.center = CGPointMake(view.bounds.size.width/2,view.bounds.size.height/2);//textView.returnKeyType = UIReturnKeyDone;
[view addSubview:label];[view addSubview:textView];
[self setView:view];return self;
}
%end