2
的Xcode 7和我的代碼的價值:無法將類型 '[RKDataStreamingMask]' 預期參數類型 'RKDataStreamingMask'
func sendSetDataStreamingCommand {
let mask = RKDataStreamingMask.AccelerometerFilteredAll |
RKDataStreamingMask.IMUAnglesFilteredAll |
RKDataStreamingMask.QuaternionAll ;
self.robot.enableSensors(mask,atStreamingRate:RKStreamingRate.DataStreamingRate10);
}
的警告是:
swift Binary operator '|' cannot be applied to two UIViewAutoresizing operands
然後更改代碼:
func sendSetDataStreamingCommand {
let mask=[RKDataStreamingMask.AccelerometerFilteredAll,
RKDataStreamingMask.IMUAnglesFilteredAll,
RKDataStreamingMask.QuaternionAll]
self.robot.enableSensors(mask,atStreamingRate:RKStreamingRate.DataStreamingRate10);
}
then then warning in last sentence is:
Cannot convert value of type '[RKDataStreamingMask]' to expected argument type 'RKDataStreamingMask'
請教我該怎麼辦?謝謝。
恩,謝謝你的幫助! ^^ – Yuri