在html中需要什么特别的东西,或者在UIWebView中使用回调来处理带有href的锚标签,或者在href中有一个带有mailto链接的锚标签有什么特别之处吗?
我在Eclipse(Mac OS X)中有一个简单的应用程序HelloWorld Android应用程序,当我安装到模拟器/ AVD时,应用程序显示在"设置 - > [设备]应用程序"中,但不在启动器中.我在logcat中注意到我得到了这些错误
W/ActivityManager( 160): No content provider found for permission revoke: file:///data/local/tmp/HelloWorld.apk
W/ActivityManager( 160): No content provider found for permission revoke: file:///data/local/tmp/HelloWorld.apk
I/PackageManager( 160): Running dexopt on: com.example.helloworld
D/dalvikvm( 870): DexOpt: load 124ms, verify+opt 459ms, 720236 bytes
I/ActivityManager( 160): Force stopping package com.example.helloworld uid=10044
Run Code Online (Sandbox Code Playgroud)
我在.android目录上设置了读/写/执行权限.
我试图确定UILabel是否被触及,如果有的话.给..
.
.
.
UILabel * site = [[UILabel alloc] initWithFrame:CGRectMake(0, 185, 320, 30)];
site.text = [retriever.plistDict valueForKey:@"url"];
site.textAlignment =UITextAlignmentCenter;
site.backgroundColor = [UIColor clearColor];
site.textColor = [UIColor whiteColor];
site.userInteractionEnabled = YES;
[theBgView addSubview:site];
[site release];
.
.
.
Run Code Online (Sandbox Code Playgroud)
然后我写回调.
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
retriever = [PListRetriever sharedInstance];
CGPoint pt = [[touches anyObject] locationInView: self];
NSURL *target = [[NSURL alloc] initWithString:[retriever.plistDict valueForKey:@"url"]];
[[UIApplication sharedApplication] openURL:target];
}
Run Code Online (Sandbox Code Playgroud)
现在的问题是,无论我在视图中触摸的位置是打开的.如何确定是否仅触摸了我的标签?
我从pkg安装程序安装了node.js v0.8.8并从源代码编译.但是在尝试运行npm时出现以下错误.任何帮助,将不胜感激.
> $ npm --help
>
> /usr/lib/node_modules/npm/lib/utils/config-defs.js:5 , stdio =
> process.binding("stdio")
> ^ Error: No such module
> at Object.<anonymous> (/usr/lib/node_modules/npm/lib/utils/config-defs.js:5:21)
> at Module._compile (module.js:449:26)
> at Object.Module._extensions..js (module.js:467:10)
> at Module.load (module.js:356:32)
> at Function.Module._load (module.js:312:12)
> at Module.require (module.js:362:17)
> at require (module.js:378:17)
> at Object.<anonymous> (/usr/lib/node_modules/npm/lib/utils/ini.js:43:18)
> at Module._compile (module.js:449:26)
> at Object.Module._extensions..js (module.js:467:10)
Run Code Online (Sandbox Code Playgroud) 专门针对Twisted,我希望能够确定所连接的服务器是否支持主动或被动模式。参见API。
如果有人可以用FTP协议解释或提供示例,则如何确定服务器支持主动还是被动模式。