无法将nsrange类型的值转换为范围

时间:2017-12-02 12:13:17

标签: ios swift migration

如何在Swift中将NSRange转换为Range?

var copyRange = NSRange()
            copyRange.location = 0
            copyRange.length = 44
            var tmpAudioData = NSMutableData()

            tmpAudioData.appendData(audioPlayer.data?.subdata(in: copyRange)) //<- error at this line  

0 个答案:

没有答案