在XCode版本11.2(11B52)中使用Objective-C,在iOS版本12.4.3中使用macOS Catalina Beta 10.15.2。 在Xcode中访问Local html元素时出现不同的布局约束错误。 感谢您的帮助。
尝试了这些:
view.userInteractionEnabled =是 view.translatesAutoresizingMaskintoConstraints = NO
NSString *filePath=[[NSBundle mainBundle]pathForResource:@"search" ofType:@"html" inDirectory:nil];
NSLog(@"%@",filePath);
self.webView.translatesAutoresizingMaskintoConstraints = NO;
self.webView.userInteractionEnabled=YES;
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:filePath]]];
预期:在手机上的Xcode中运行它时,在html中选择下拉列表或搜索文本框时,会出现所有布局和约束错误。
实际:必须获取所选项目并转到下一个屏幕以打印结果。