我有一个自定义视图NSView,我想禁用userinteraction,但我不知道如何做到这一点.
我的想法是:
[myView setEnabled:NO];
Run Code Online (Sandbox Code Playgroud)
但这是错误的,不起作用.我怎样才能做到这一点,它只对用户可见,而不是别的什么?
我仍然使用getElementsByID,这一切都是上帝.但现在我想用ByClassName来做,但它不起作用.
我希望得到这个页面的温度:http://www.weatherman.com/us/ny/new-york.html 类名是:temp tempF
但是这段代码不起作用:
tempString = [deg stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"document.getElementByClassName('temp tempF').innerText;"]];
deg是我的WebView显示页面.
如果我用左上角的红色x关闭我的应用程序,我无法重新打开它.为什么以及如何更改此信息.
我想一次又一次关闭后打开窗户.