swift | fix style guidelines

This commit is contained in:
Damian Rzeszot 2017-10-09 12:02:29 +02:00
parent d01e5242e1
commit 9a9e52b54b
7 changed files with 21 additions and 21 deletions

View File

@ -459,10 +459,10 @@ var suitValue: Suit = .hearts
// Nicht-Integer-Enums brauchen direkt zugewiesene "Rohwerte"
enum BookName: String {
case John = "John"
case Luke = "Luke"
case john = "John"
case luke = "Luke"
}
print("Name: \(BookName.John.rawValue)")
print("Name: \(BookName.john.rawValue)")
// Enum mit assoziierten Werten
enum Furniture {

View File

@ -463,10 +463,10 @@ var suitValue: Suit = .hearts
// Enums de tipo no-entero requiere asignaciones de valores crudas directas
enum BookName: String {
case John = "John"
case Luke = "Luke"
case john = "John"
case luke = "Luke"
}
print("Name: \(BookName.John.rawValue)")
print("Name: \(BookName.john.rawValue)")
// Enum con valores asociados
enum Furniture {

View File

@ -463,10 +463,10 @@ var suitValue: Suit = .hearts
// Enums que não sejam inteiros obrigam a atribuições valor bruto (raw value) diretas
enum BookName: String {
case John = "John"
case Luke = "Luke"
case john = "John"
case luke = "Luke"
}
print("Name: \(BookName.John.rawValue)")
print("Name: \(BookName.john.rawValue)")
// Enum com valores associados
enum Furniture {

View File

@ -553,10 +553,10 @@ var suitValue: Suit = .hearts
// Значения нецелочисленных перечислений должны быть указаны явно
// или могут выводится с помощью функции `rawValue` из имени
enum BookName: String {
case John
case Luke = "Лука"
case john
case luke = "Лука"
}
print("Имя: \(BookName.John.rawValue)")
print("Имя: \(BookName.john.rawValue)")
// Перечисление (enum) со связанными значениями
enum Furniture {

View File

@ -536,10 +536,10 @@ var suitValue: Suit = .hearts
// String enums can have direct raw value assignments
// or their raw values will be derived from the Enum field
enum BookName: String {
case John
case Luke = "Luke"
case john
case luke = "Luke"
}
print("Name: \(BookName.John.rawValue)")
print("Name: \(BookName.john.rawValue)")
// Enum with associated Values
enum Furniture {

View File

@ -459,10 +459,10 @@ var kartTipi: Kart = .kupa
// Integer olmayan enumlar direk değer (rawValue) atama gerektirir.
enum KitapAdi: String {
case John = "John"
case Luke = "Luke"
case john = "John"
case luke = "Luke"
}
print("Name: \(KitapAdi.John.rawValue)")
print("Name: \(KitapAdi.john.rawValue)")
// Değerlerle ilişkilendirilmiş Enum
enum Mobilya {

View File

@ -461,10 +461,10 @@ var suitValue: Suit = .hearts
// 非整型的枚举类型需要在定义时赋值
enum BookName: String {
case John = "John"
case Luke = "Luke"
case john = "John"
case luke = "Luke"
}
print("Name: \(BookName.John.rawValue)")
print("Name: \(BookName.john.rawValue)")
// 与特定数据类型关联的枚举
enum Furniture {