dillidon/alerts-and-pickers

Cannot invoke initializer for type 'Range<_>' with an argument list of type '(Range<String.Index>)'

dabanlee opened this issue · 3 comments

you can change this line

return String(self[NSRange(start ..< end)])

for this:

    let range: Range<Index> = start..<end
    return String(self[range])

Regards!!!

@dverdugo85 Thanks!
Dev should update his code and example code

asar1 commented

you can change this line

return String(self[NSRange(start ..< end)])

for this:

    let range: Range<Index> = start..<end
    return String(self[range])

Regards!!!

After updating this,
i've got this error:
Type 'String.Index' does not conform to protocol 'FixedWidthInteger'