Guest User

Untitled

a guest
May 10th, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.35 KB | None | 0 0
  1. private enum MyEntry: ItemListEntry {
  2.     case foo(String)
  3.     case bar(String, Bool)
  4.     case spam(String)
  5.     case ham(String, Bool)
  6.     case spamham(String)
  7.  
  8.     var stableId: Int32 {
  9.         switch self {
  10.         case .foo:
  11.             return 1
  12.         case .bar:
  13.             return 2
  14.         case .spam:
  15.             return 3
  16.         case .ham:
  17.             return 4
  18.         case .spamham:
  19.             return 5
  20.         }
  21.     }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment