Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.76 KB | None | 0 0
  1. superbgImageView.frame = self.view.bounds
  2. bgImageView.frame = CGRect(x: w/2-w/3, y: h/8, width: 2*w/3, height: 3*h/4)
  3. regButton.frame = CGRect(x: w/2-h/10, y: 3*h/4, width: h/5, height: h/5)
  4. loginTextField.frame = CGRect(x: w/2-w/8, y: h/3, width: w/4, height: h/8)
  5. passFTextField.frame = CGRect(x: w/2-w/8, y: h/3+h/6, width: w/4, height: h/8)
  6.  
  7. errorMsgLabel.frame = CGRect(x: w/2-w/6, y: 2*h/3 , width: w/3, height: h/8)
  8. //bgImageView.layer.zPosition = -2
  9. //imageHeader.layer.zPosition = -1
  10. loginTextField.font = UIFont(name: "Marker Felt", size: h/16)
  11. passFTextField.font = UIFont(name: "Marker Felt", size: h/16)
  12.  
  13. backButton.frame = CGRect(x: 5, y:5, width: h/10, height: h/10)
  14.  
  15.  
  16. imageHeader.frame = CGRect(x: w/2-w/3, y:h/24, width: 2*w/3, height: h/4)
  17. let label = UILabel(frame: CGRect(x:0, y: -h/16, width: 2*w/3, height: h/4))
  18. label.textAlignment = .center
  19. label.textColor = #colorLiteral(red: 0.9529411793, green: 0.6862745285, blue: 0.1333333403, alpha: 1)
  20. label.text = "LOG IN"
  21. label.font = UIFont(name: "Marker Felt", size: h/10)
  22. label.adjustsFontSizeToFitWidth = true
  23. imageHeader.addSubview(label)
  24.  
  25.  
  26.  
  27. ///// тут еще меню немного поменял
  28. loginLabel.frame = CGRect(x: 5, y: 5, width: w/6, height: h/8)
  29. loginLabel.font = UIFont(name: "Marker Felt", size: h/20)
  30. exitButton.frame = CGRect(x: w-h/10, y: 5 , width: h/10, height: h/10)
  31. superbgImageView.frame = self.view.bounds
  32.  
  33. bgImageView.frame = CGRect(x: w/2-w/3, y: h/12, width: 2*w/3, height: 5*h/6)
  34.  
  35.  
  36. var buttons = [offlineMacthButton,onlineMacthButton,heroesButton]
  37. for button in buttons {
  38. let label2 = UILabel(frame: CGRect(x:0, y: 0, width:7*w/24, height: h/5))
  39. label2.textAlignment = .center
  40. label2.textColor = #colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)
  41. label2.text = labels[cnt]
  42. cnt+=1
  43. label2.font = UIFont(name: "Marker Felt", size: h/20)
  44. label2.adjustsFontSizeToFitWidth = true
  45.  
  46. button.addSubview(label2)
  47. }
  48.  
  49.  
  50.  
  51. let zamok = UIImageView(image: UIImage(named: "zamok"))
  52. zamok.frame = CGRect(x: 0, y: 10, width: h/10, height: h/10)
  53. offlineMacthButton.addSubview(zamok)
  54.  
  55.  
  56. offlineMacthButton.frame = CGRect(x: 17*w/48, y: h/6, width: 7*w/24, height: h/5)
  57.  
  58.  
  59. onlineMacthButton.frame = CGRect(x: 17*w/48, y: 11*h/30+10, width: 7*w/24, height: h/5)
  60. heroesButton.frame = CGRect(x: 17*w/48, y: 17*h/30+20, width: 7*w/24, height: h/5)
  61. bookButton.frame = CGRect(x:3*w/4, y: 3*h/4, width: w/4, height: h/4)
  62. runeButton.frame = CGRect(x:0, y: 3*h/4, width: w/4, height: h/4)
  63.  
  64.  
  65. buttons = [bookButton,runeButton]
  66. labels = ["СПЕЛЛБУК","РУНЫ"]
  67. for button in buttons {
  68. let label2 = UILabel(frame: CGRect(x:0, y: h/13, width: w/4, height: h/4))
  69. label2.textAlignment = .center
  70. label2.textColor = #colorLiteral(red: 0.2094716728, green: 0.1004144028, blue: 0.1077578291, alpha: 1)
  71. label2.text = labels[cnt]
  72. cnt+=1
  73. label2.font = UIFont(name: "Marker Felt", size: h/20)
  74. label2.adjustsFontSizeToFitWidth = true
  75. button.addSubview(label2)
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement