Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/19.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
Xcode RecordBTN.enabled==假swift_Xcode_Swift_Swift2.1 - Fatal编程技术网

Xcode RecordBTN.enabled==假swift

Xcode RecordBTN.enabled==假swift,xcode,swift,swift2.1,Xcode,Swift,Swift2.1,这意味着什么?我如何修复它 //result of call to '==' is unused 编译器告诉我表达式类型不明确,没有更多内容 RecordBTN.enabled == false 在语句RecordBTN.enabled==false中,您将RecordBTN.enabled与false进行比较,但对比较结果(布尔值)没有做任何操作。您可能希望将结果存储在变量中,或在if语句中使用它 如果试图将RecordBTN.enabled设置为false,请使用赋值运算符(单个“=

这意味着什么?我如何修复它

 //result of call to '==' is unused 
编译器告诉我表达式类型不明确,没有更多内容

RecordBTN.enabled == false

在语句
RecordBTN.enabled==false
中,您将
RecordBTN.enabled
false
进行比较,但对比较结果(布尔值)没有做任何操作。您可能希望将结果存储在变量中,或在
if
语句中使用它

如果试图将
RecordBTN.enabled
设置为
false
,请使用赋值运算符(单个“=”):

接线员是

 var recordSettings: [String: AnyObject] = [AVFormatIDKey : kAudioFormatAppleLossless, AVEncoderAudioQualityKey : AVAudioQuality.Max.rawValue, AVEncoderBitRateKey : 320000, AVNumberOfChannelsKey : 2, AVSampleRateKey : 44100.0 ]
RecordBTN.enabled = false