jjzjj

SeparatedByString

全部标签

javascript - Objective C 组件SeparatedByString

我正在尝试使用window.location将url从JavaScript传递到ObjectiveC。我的JavaScript代码如下所示:varstr="http://sampleurl:8080/abc";window.location.href="jscall:myapp:"+str;在Objective-C中:NSString*requestString=[[requestURL]absoluteString];NSArray*components=[requestStringcomponentsSeparatedByString:@":"];if([componentscou