Ios 使用Theos在iPhone/iPad上的应用程序ViewController中添加UIButton
好的,我有一个想法,为iPhone做一个MobileSubstrate调整 在这个想法中,我想在MobileSMS.app ViewController中添加一个按钮,以便在应用程序打开时显示该按钮 如果有人可以帮助编码,如果这将是非常感谢 另外,如果有一种方法可以和提奥斯一起做,那就太好了Ios 使用Theos在iPhone/iPad上的应用程序ViewController中添加UIButton,ios,objective-c,tweak,theos,Ios,Objective C,Tweak,Theos,好的,我有一个想法,为iPhone做一个MobileSubstrate调整 在这个想法中,我想在MobileSMS.app ViewController中添加一个按钮,以便在应用程序打开时显示该按钮 如果有人可以帮助编码,如果这将是非常感谢 另外,如果有一种方法可以和提奥斯一起做,那就太好了 谢谢MobileSMS.app使用私有框架聊天包。 所以 要获取UIButton,必须以编程方式创建,请检查下面的代码 #import <UIKit/UIKit.h> @interface C
谢谢MobileSMS.app使用私有框架聊天包。 所以 要获取UIButton,必须以编程方式创建,请检查下面的代码
#import <UIKit/UIKit.h>
@interface CKConversationListController : UIViewController
- (void)loadView;
@end
%hook CKConversationListController
- (void)loadView {
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
// now you can customize it for your own ;)
[self.view addSubview:button]; // looks like CKConversationListController subclass of UIViewcontroller ;)
%orig;
}
%end
#导入
@接口CKConversationListController:UIViewController
-(无效)负荷视图;
@结束
%钩子CKConversationListController
-(void)负荷视图{
UIButton*button=[UIButton button类型:UIButtonyPeroundRect];
//现在,您可以为自己定制它;)
[self.view addSubview:button];//看起来像UIViewcontroller的CKConversationListController子类;)
%奥利格;
}
%结束
然后别忘了在MakeFile中将ChatKit链接为XXX\u PRIVATE\u FRAMEWORKS=ChatKit
祝你好运;)