Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 否'-添加子视图';方法发现_Iphone_Objective C - Fatal编程技术网

Iphone 否'-添加子视图';方法发现

Iphone 否'-添加子视图';方法发现,iphone,objective-c,Iphone,Objective C,我找到“no'-addSubView”方法 当我尝试向窗口添加子视图时,在本例中,我尝试添加按钮。这是我的密码 @interface SBUIController  -(id)window; @end @interface SBAwayView  -(void)chargingView; -(void)showChargingView; -(void)hideChargingView; -(void)showBulletinView; -(BOOL)shouldShowCharging

我找到“no'-addSubView”方法

当我尝试向窗口添加子视图时,在本例中,我尝试添加按钮。这是我的密码

@interface SBUIController 

-(id)window;

@end


@interface SBAwayView 

-(void)chargingView;
-(void)showChargingView;
-(void)hideChargingView;
-(void)showBulletinView;
-(BOOL)shouldShowChargingView;
-(void)hideCameraButton;

@end

%hook SBAwayController

-(void)_tearDownCameraPreview{

//SBAwayView *v = MSHookIvar<id>(self, //"_awayView");

UIButton *myButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; myButton.frame = CGRectMake(21, 80, 100, 35); [myButton setTitle:@"My Button" forState:UIControlStateNormal];

SBUIController *ui = MSHookIvar<id>(self, "_uiController");


[[ui window] addSubView:myButton];

%orig; }

%end
@interface-sbler
-(id)窗口;
@结束
@界面SBAwayView
-(无效)chargingView;
-(无效)showChargingView;
-(无效)hideChargingView;
-(无效)showBulletinView;
-(BOOL)应显示ChargingView;
-(无效)hideCameraButton;
@结束
%吊钩式自动控制器
-(无效)_拆卸检查{
//SBAwayView*v=MSHookIvar(self,/“_awayView”);
UIButton*myButton=[UIButton Button类型为:UIButtonTypeRoundRect];myButton.frame=cDirectMake(21,80,100,35);[myButton设置标题:@“我的按钮”表示状态:UIControlStateNormal];
SBUIController*ui=MSHookIvar(self,“\u uiController”);
[[ui窗口]添加子视图:myButton];
%来源;}
%结束

该消息称为
addSubview:
,而不是
addSubview:

[[ui window] addSubview:myButton];

这是什么东西?!MS=MobileSubstrate,一个修补框架(用于越狱设备)。方法名称在
视图中没有大写字母“V”,它是
-addSubView