Skip to content

Instantly share code, notes, and snippets.

@KentarouKanno
Last active October 27, 2015 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KentarouKanno/1a28e9113b414832acb8 to your computer and use it in GitHub Desktop.
Save KentarouKanno/1a28e9113b414832acb8 to your computer and use it in GitHub Desktop.
アプリ内で使用するメッセージを管理するクラス
// 使用例
let errorMessage = MessageManager.LoginView.IDMaxLengthError
//=> IDは10桁で入力してください。
struct MessageManager {
/** 入力画面 */
struct InputView {
/** 年齢を入力してください。 */
static let noInputBirthDay = "年齢を入力してください。"
/** 性別を選択してください。 */
static let noSelectGender = "性別を選択してください。"
/** 全角で入力してください。 */
static let noFullWidthInput = "全角で入力してください。"
}
/** ログイン画面 */
struct LoginView {
/** IDを入力してください。 */
static let noInputID = "IDを入力してください。"
/** IDは10桁で入力してください。 */
static let IDMaxLengthError = "IDは10桁で入力してください。"
/** パスワードを入力してください。 */
static let noInputPassWord = "パスワードを入力してください。"
}
/** ネットワークエラー */
struct NetworkError {
/** 圏外です */
static let noConnectError = "圏外です "
/** タイムアウトしました。 */
static let connectTimeOutError = "タイムアウトしました。"
}
}
@KentarouKanno
Copy link
Author

te7eport3wqrpatqdvj0wkfuuxiwixlhhw21osxtxm0
x42vejidzoxr_ssruitfisutkmqqxjw_s-lhcn2xxow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment