gpt4 book ai didi

ios - swift 2.0 : Type of Expression is ambiguous without more context?

转载 作者:IT王子 更新时间:2023-10-29 07:39:29 29 4
gpt4 key购买 nike

以下用于 Swift 1.2:

var recordSettings = [
AVFormatIDKey: kAudioFormatMPEG4AAC,
AVEncoderAudioQualityKey : AVAudioQuality.Max.rawValue,
AVEncoderBitRateKey : 320000,
AVNumberOfChannelsKey: 2,
AVSampleRateKey : 44100.0]

现在,它给出错误:

"Type expression is ambiguous without more context".

最佳答案

你可以给编译器更多的信息:

let recordSettings : [String : Any] =
[
AVFormatIDKey: kAudioFormatMPEG4AAC,
AVEncoderAudioQualityKey : AVAudioQuality.Max.rawValue,
AVEncoderBitRateKey : 320000,
AVNumberOfChannelsKey: 2,
AVSampleRateKey : 44100.0
]

关于ios - swift 2.0 : Type of Expression is ambiguous without more context?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32663364/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com