Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/102.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios “…”不是后缀一元运算符-Swift 3_Ios_Xcode_Swift3 - Fatal编程技术网

Ios “…”不是后缀一元运算符-Swift 3

Ios “…”不是后缀一元运算符-Swift 3,ios,xcode,swift3,Ios,Xcode,Swift3,我只想去掉绳子的一部分 if let dotRange = detailArticleContent?.range(of: "<iframe") { detailArticleContent.removeSubrange( dotRange.lowerBound... < detailArticleContent.endIndex ) //In this line i got err : '...' is not a postfix unary operator

我只想去掉绳子的一部分

if let dotRange = detailArticleContent?.range(of: "<iframe") {

    detailArticleContent.removeSubrange( dotRange.lowerBound... < detailArticleContent.endIndex )
    //In this line i got err : '...' is not a postfix unary operator 

   }

使用任何一个。。。近距离或..使用。。。近距或..在我的例子中,我给了介于0之间的空间..在我的例子中,我给了介于0之间的空间..那你为什么还要用这个操作符呢?刚刚分开?您要执行的范围是什么?我要将字符串的一半,如detailArticleContent=detailArticleContent.Components由字符串分隔,因为它是可选字符串,您需要检查在调试器中分隔I跟踪值后是否有任何内容,但我将在调试器中仔细检查surenot跟踪,签入代码,让编译器知道一切都正常,分离的组件将可用。为什么你们还要放这个操作符呢?刚刚分开?您要执行的范围是什么?我要将字符串的一半,如detailArticleContent=detailArticleContent.Components由字符串分隔,因为它是可选字符串,您需要检查在调试器中分隔I跟踪值后是否有任何内容,但我将在调试器中仔细检查surenot跟踪,签入代码,让编译器知道一切正常,分离的组件将可用
0..<dictionary.count

//Wrong 
let dictionary = dic["predictions"] as! [String:Any]
    print(dictionary)
    for index in 0..< dictionary.count {
        print(<#T##items: Any...##Any#>)
    }

//Correct 
let dictionary = dic["predictions"] as! [String:Any]
    print(dictionary)
    for index in 0..<dictionary.count {
        print(<#T##items: Any...##Any#>)
    }