我正在尝试UIWebView
在 iOS 上转换 asetTransform
并且我也尝试使用setHidden
.
这些功能在当前设置loadRequest
中都不起作用,但可以;为什么会这样,我怎样才能得到setTransform
和setHidden
工作?
// ViewController.h
@class EAGLView, ARUtils;
@interface ViewController : ARViewController {
UIWebView* webview;
}
@property (assign) UIWebView* webview;
// ViewController.mm
@synthesize webview;
-(void)viewDidLoad{
[super viewDidLoad];
webview = [[[UIWebView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease];
[self.view addSubview:webview];
}
// EAGLView.mm
ViewController* uic;
for( UIView* next = [self superview]; next; next = next.superview){
UIResponder* nextResponder = [next nextResponder];
if([nextResponder isKindOfClass:[ViewController class]]){
uic = (ViewController*)nextResponder;
}
}
// These functions don't work:
[[[uic webview] layer] setTransform:matrix];
[[uic webview] setHidden:YES];
// And this one does:
[[uic webview] loadRequest:requestObj];
提前致谢!