SHARE
TWEET

Untitled

a guest May 19th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import Foundation
  2.  
  3. class BGCategory{
  4.     var title: String?
  5.     var placeHolderURL: String?
  6.     var placeholderDocumentPath: String?
  7.     var bgItems: [BGItem] = []
  8.     var isGallery = false
  9.    
  10.     init(title: String, placeholderDocumentPath: String) {
  11.         self.title = title
  12. //        self.bgItems = bgItems
  13.         self.placeholderDocumentPath = placeholderDocumentPath
  14.     }
  15.    
  16.     static func prepareDummyData() -> [BGCategory] {
  17.         var categories: [BGCategory] = []
  18.         let gallery = BGCategory(title: "", placeholderDocumentPath: "Gallery")
  19.         let category01 = BGCategory(title: "Glitter", placeholderDocumentPath: "glitter01")
  20.         category01.bgItems = [BGItem(documentPath: "glitter01"),
  21.                               BGItem(documentPath: "glitter02"),
  22.                               BGItem(documentPath: "glitter03"),
  23.                               BGItem(documentPath: "glitter04"),
  24.                              
  25.                               BGItem(documentPath: "PaperTextureOriginal.jpg"),
  26.                               BGItem(documentPath: "PaperTexture570"),
  27.                               BGItem(documentPath: "PaperTexture570@2x"),
  28.                               BGItem(documentPath: "PaperTexture570@3x")]
  29.        
  30.         let category02 = BGCategory(title: "Gradient", placeholderDocumentPath: "gradient01")
  31.         category02.bgItems = [
  32.             BGItem(documentPath: "gradient01"),
  33.             BGItem(documentPath: "gradient02"),
  34.             BGItem(documentPath: "gradient03"),
  35.             BGItem(documentPath: "gradient04"),
  36.             BGItem(documentPath: "PaperTextureOriginal1"),
  37.             BGItem(documentPath: "PaperTextureTest1"),
  38.             BGItem(documentPath: "PaperTextureTest2"),
  39.             BGItem(documentPath: "PaperTextureTest3") ]
  40.         let category03 = BGCategory(title: "Pattern", placeholderDocumentPath: "pattern01")
  41.         category03.bgItems = [BGItem(documentPath: "pattern01"), BGItem(documentPath: "pattern02"), BGItem(documentPath: "pattern03"), BGItem(documentPath: "pattern04")]
  42.         categories.append(gallery)
  43.         categories.append(category01)
  44.         categories.append(category02)
  45.         categories.append(category03)
  46.        
  47.         return categories
  48.     }
  49.    
  50. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top