【发布时间】:2018-10-08 16:22:30
【问题描述】:
在这段代码中
text = prospectiveText.substring( with: Range<String.Index>(prospectiveText.startIndex ..< prospectiveText.characters.index(prospectiveText.startIndex, offsetBy: maxLength)) )
我将 xcode 更新为 10.01 后收到错误 Extraneous argument label 'with:' in call
如何修复错误?
【问题讨论】:
-
去掉多余的标签?
-
@Paulw11 删除后,我得到
Cannot invoke initializer for type 'Range<String.Index>' with an argument list of type '(Range<String.Index>)'这个错误