ltebean / Live

Demonstrates how to build a live broadcast app(Swift 3)
2.41k stars 419 forks source link

[iOS] BUILD ERROR: Switch Must Be Exhaustive, consider adding a default clause. #32

Open joeydambrosio opened 7 years ago

joeydambrosio commented 7 years ago

codew1

Giggs123 commented 6 years ago

add default: break on your Switch Case

func liveSession(_ session: LFLiveSession?, liveStateDidChange state: LFLiveState) { switch state { case .error: statusLabel.text = "error" case .pending: statusLabel.text = "pending" case .ready: statusLabel.text = "ready" case.start: statusLabel.text = "start" case.stop: statusLabel.text = "stop" default: break // Add this line for Swift 3 加这里 } }