Advertisement
Guest User

Untitled

a guest
May 6th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1. return [super newWithComponent:
  2. [CKInsetComponent
  3. newWithInsets:{}
  4. component:
  5. [CKStackLayoutComponent
  6. newWithView:{}
  7. size:{
  8. }
  9. style:{
  10. .direction = CKStackLayoutDirectionVertical,
  11. }
  12. children:{
  13.  
  14. {[CKInsetComponent
  15. newWithInsets:{.top = 20, .left = 20}
  16. component:
  17. [CKStackLayoutComponent
  18. newWithView:{}
  19. size:{}
  20. style:{
  21. .direction = CKStackLayoutDirectionHorizontal,
  22. }
  23. children:{
  24.  
  25. {[CKComponent
  26. newWithView:{
  27. [UIImageView class],
  28. {
  29. {@selector(setImage:), [UIImage imageNamed:@"LosAngeles"]},
  30. {@selector(setContentMode:), @(UIViewContentModeScaleAspectFill)},
  31. {@selector(setClipsToBounds:), @YES},
  32. }
  33. }
  34. size:{ .width = 50, .height = 50}]},
  35. {[CKInsetComponent
  36. newWithInsets:{.left = 10, .top = 8}
  37. component:
  38. [CKStackLayoutComponent
  39. newWithView:{}
  40. size:{}
  41. style:{
  42.  
  43. }
  44. children:{
  45.  
  46. {
  47. [CKInsetComponent
  48. newWithInsets:{.bottom = 4,}
  49. component:[CKLabelComponent
  50. newWithLabelAttributes:{
  51. .string = @"Khant Thu Linn Khant Thu Linn Khant Thu Linn Khant Thu Linn Khant Thu Linn Khant Thu Linn",
  52. .font = [UIFont fontWithName:@"Baskerville" size:14],
  53. .maximumNumberOfLines = 0,
  54. .lineBreakMode = NSLineBreakByWordWrapping
  55. }
  56. viewAttributes:{
  57. {@selector(setBackgroundColor:), [UIColor clearColor]},
  58. {@selector(setUserInteractionEnabled:), @NO},
  59. }
  60. size:{ }]]
  61. },
  62.  
  63. {[CKLabelComponent
  64. newWithLabelAttributes:{
  65. .string = @"Posted on Monday",
  66. .font = [UIFont fontWithName:@"Baskerville" size:14]
  67. }
  68. viewAttributes:{
  69. {@selector(setBackgroundColor:), [UIColor clearColor]},
  70. {@selector(setUserInteractionEnabled:), @NO},
  71. }
  72. size:{ }]
  73. }
  74. }]]}
  75.  
  76. }]]},
  77.  
  78. {[CKInsetComponent
  79. newWithInsets:{.left = 20, .top = 8}
  80. component:
  81. [CKStackLayoutComponent
  82. newWithView:{}
  83. size:{}
  84. style:{
  85.  
  86. }
  87. children:{
  88. {[CKLabelComponent
  89. newWithLabelAttributes:{
  90. .string = @"This shall be context",
  91. .font = [UIFont fontWithName:@"Baskerville" size:14]
  92. }
  93. viewAttributes:{
  94. {@selector(setBackgroundColor:), [UIColor clearColor]},
  95. {@selector(setUserInteractionEnabled:), @NO},
  96. }
  97. size:{ }]
  98. }
  99. }]]}
  100. }]]];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement