我正在学习MVC设计模式。所以我有一个问题,我对这更好的事情感到困惑。 看看我的代码: LINK source code screenshot
代码段:
class DataModel: UIViewController {
struct Alerts {
static let DismissAlert = "Dismiss"
static let RecordingDisabledTitle = "Recording Disabled"
static let RecordingDisabledMessage = "You've disabled this app from recording your microphone. Check Settings."
static let RecordingFailedTitle = "Recording Failed"
static let RecordingFailedMessage = "Something went wrong with your recording."
static let AudioRecorderError = "Audio Recorder Error"
static let AudioSessionError = "Audio Session Error"
static let AudioRecordingError = "Audio Recording Error"
static let AudioFileError = "Audio File Error"
static let AudioEngineError = "Audio Engine Error"
}
let helpText: [String:String] = [
"startRecordText" : "Tap to record",
"recordingText" : "Recording...",
"pauseRecordText" : "Paused",
]
let hintText:[String] = [
"Avoid noise to record better.",
"Use pause button to pause recording progress",
"Make some funny melody :D"
]
我不知道哪个更好更有效:
希望你们帮助我解释这个问题:D
非常感谢。