     }
 
     func setupViews() {
+        let imageView = UIImageView()
+        imageView.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 0.64)
+        imageView.contentMode = .scaleAspectFit
+        imageView.image = self.image
+        imageView.layer.borderColor = UIColor.white.cgColor
+        imageView.layer.borderWidth = 1
+        imageView.layer.cornerRadius = 5
+        imageView.layer.masksToBounds = true
+        self.view.addSubview(imageView)
+
+        let backButton = UIButton(type: .system)
+        backButton.setTitle("Back", for: .normal)
+        backButton.setTitleColor(UIColor.white, for: .normal)
+        backButton.layer.borderColor = UIColor.white.cgColor
+        backButton.layer.borderWidth = 1
+        backButton.layer.cornerRadius = 5
+        backButton.layer.masksToBounds = true
+        self.view.addSubview(backButton)
+
         #if os(iOS)
-            let screenSize = UIScreen.main.bounds.size
-
-            let imageView = UIImageView()
-            imageView.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 0.64)
-            imageView.contentMode = .scaleAspectFit
-            imageView.image = self.image
-            imageView.layer.borderColor = UIColor.white.cgColor
-            imageView.layer.borderWidth = 1
-            imageView.layer.cornerRadius = 5
-            imageView.layer.masksToBounds = true
-            self.view.addSubview(imageView)
-            imageView.frame = CGRect(
-                x: 10, y: 30, width: screenSize.width - 20, height: screenSize.width - 20
-            )
-
-            let createButton = UIButton(type: .system)
-            createButton.setTitle("Save", for: .normal)
-            createButton.setTitleColor(UIColor.white, for: .normal)
-            createButton.layer.borderColor = UIColor.white.cgColor
-            createButton.layer.borderWidth = 1
-            createButton.layer.cornerRadius = 5
-            createButton.layer.masksToBounds = true
-            createButton.addTarget(self, action: #selector(ShowController.saveToAlbum), for: .touchDown)
-            self.view.addSubview(createButton)
-            createButton.frame = CGRect(
-                x: 10, y: imageView.frame.maxY + 10, width: screenSize.width - 20, height: 46
-            )
-
-            let backButton = UIButton(type: .system)
-            backButton.setTitle("Back", for: .normal)
-            backButton.setTitleColor(UIColor.white, for: .normal)
-            backButton.layer.borderColor = UIColor.white.cgColor
-            backButton.layer.borderWidth = 1
-            backButton.layer.cornerRadius = 5
-            backButton.layer.masksToBounds = true
+            let saveButton = UIButton(type: .system)
+            saveButton.setTitle("Save", for: .normal)
+            saveButton.setTitleColor(UIColor.white, for: .normal)
+            saveButton.layer.borderColor = UIColor.white.cgColor
+            saveButton.layer.borderWidth = 1
+            saveButton.layer.cornerRadius = 5
+            saveButton.layer.masksToBounds = true
+            self.view.addSubview(saveButton)
+
+            imageView.snp.makeConstraints {
+                (make) in
+                make.left.equalTo(10)
+                make.top.equalTo(30)
+                make.width.equalTo(self.view).offset(-20)
+                make.height.lessThanOrEqualTo(self.view.snp.width).offset(-20)
+                make.height.lessThanOrEqualTo(self.view.snp.height).offset(-20-46-46-60)
+            }
+
+            saveButton.addTarget(self, action: #selector(ShowController.saveToAlbum), for: .touchDown)
+            saveButton.snp.makeConstraints {
+                (make) in
+                make.left.equalTo(10)
+                make.top.equalTo(imageView.snp.bottom).offset(10)
+                make.width.equalTo(self.view).offset(-20)
+                make.height.equalTo(46)
+            }
+
             backButton.addTarget(self, action: #selector(ShowController.back), for: .touchDown)
-            self.view.addSubview(backButton)
-            backButton.frame = CGRect(
-                x: 10, y: imageView.frame.maxY + 10 + 56, width: screenSize.width - 20, height: 46
-            )
+            backButton.snp.makeConstraints {
+                (make) in
+                make.left.equalTo(10)
+                make.top.equalTo(saveButton.snp.bottom).offset(10)
+                make.width.equalTo(self.view).offset(-20)
+                make.height.equalTo(46)
+            }
         #else
-            let screenSize = UIScreen.main.bounds.size
-
-            let imageView = UIImageView()
-            imageView.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 0.64)
-            imageView.contentMode = .scaleAspectFit
-            imageView.image = self.image
-            imageView.layer.borderColor = UIColor.white.cgColor
-            imageView.layer.borderWidth = 1
-            imageView.layer.cornerRadius = 5
-            imageView.layer.masksToBounds = true
-            self.view.addSubview(imageView)
-            imageView.frame = CGRect(
-                x: 10, y: 30,
-                width: screenSize.width - 20,
-                height: min(screenSize.width - 20, screenSize.height - 20 - 46 - 60)
-            )
-
-            let createButton = UIButton(type: .system)
-            createButton.setTitle("Back", for: .normal)
-            createButton.setTitleColor(UIColor.white, for: .normal)
-            createButton.layer.borderColor = UIColor.white.cgColor
-            createButton.layer.borderWidth = 1
-            createButton.layer.cornerRadius = 5
-            createButton.layer.masksToBounds = true
-            createButton.addTarget(self, action: #selector(ShowController.back), for: .primaryActionTriggered)
-            self.view.addSubview(createButton)
-            createButton.frame = CGRect(
-                x: 10, y: imageView.frame.maxY + 10, width: screenSize.width - 20, height: 46
-            )
+            imageView.snp.makeConstraints {
+                (make) in
+                make.left.equalTo(10)
+                make.top.equalTo(30)
+                make.width.equalTo(self.view).offset(-20)
+                make.height.lessThanOrEqualTo(self.view.snp.width).offset(-20)
+                make.height.lessThanOrEqualTo(self.view.snp.height).offset(-20-46-60)
+            }
+
+            backButton.addTarget(self, action: #selector(ShowController.back), for: .primaryActionTriggered)
+            backButton.snp.makeConstraints {
+                (make) in
+                make.left.equalTo(10)
+                make.top.equalTo(imageView.snp.bottom).offset(10)
+                make.width.equalTo(self.view).offset(-20)
+                make.height.equalTo(46)
+            }
         #endif
     }
 

            "\(["square", "circle"][pointShape.rawValue])"
        ]

        let cell = UITableViewCell(style: .value1, reuseIdentifier: nil)
        cell.textLabel?.textColor = UIColor.white
        cell.backgroundColor = UIColor.clear
        cell.textLabel?.text = titleArray[indexPath.row]

        }
        return cell
    }
}

#if os(iOS)
