diff --git a/ToDO/MainVC.swift b/ToDO/MainVC.swift index bacbeba..71c4714 100644 --- a/ToDO/MainVC.swift +++ b/ToDO/MainVC.swift @@ -9,7 +9,7 @@ import UIKit import SnapKit class MainVC: UIViewController { - + var ImageButton: UIButton = { let button = UIButton() @@ -18,7 +18,7 @@ class MainVC: UIViewController { button.translatesAutoresizingMaskIntoConstraints = false button.setTitle("동물 버튼", for: .normal) return button - + }() var TodoButton: UIButton = { @@ -27,25 +27,38 @@ class MainVC: UIViewController { button.layer.cornerRadius = 10 button.translatesAutoresizingMaskIntoConstraints = false button.setTitle("투두 리스트 입력!", for: .normal) - + return button }() + + var imageView: UIImageView = { + let imageView = UIImageView() + imageView.translatesAutoresizingMaskIntoConstraints = false + imageView.contentMode = .scaleAspectFit + if let imageURL = URL(string: "https://spartacodingclub.kr/css/images/scc-og.jpg"), + let imageData = try? Data(contentsOf: imageURL), + let image = UIImage(data: imageData) { + imageView.image = image + } + return imageView + }() override func viewDidLoad() { super.viewDidLoad() - view.backgroundColor = .red + view.backgroundColor = .systemBackground view.addSubview(ImageButton) view.addSubview(TodoButton) + view.addSubview(imageView) setupConstraints() TodoButton.addTarget(self, action: #selector(todoButtonTapped), for: .touchUpInside) } func setupConstraints() { - ImageButton.snp.makeConstraints { make in - make.center.equalToSuperview() - make.width.equalTo(200) - make.height.equalTo(50) - } + ImageButton.snp.makeConstraints { make in + make.center.equalToSuperview() + make.width.equalTo(200) + make.height.equalTo(50) + } TodoButton.snp.makeConstraints { make in make.top.equalTo(ImageButton).offset(80) @@ -53,7 +66,15 @@ class MainVC: UIViewController { make.width.equalTo(200) make.height.equalTo(50) } - } + imageView.snp.makeConstraints { make in + make.top.equalTo(ImageButton).offset(-300) + make.centerX.equalToSuperview() + make.width.equalTo(300) + make.height.equalTo(300) + } + + + } @objc func todoButtonTapped() { let vc = ViewController() navigationController?.pushViewController(vc, animated: true) diff --git a/ToDO/ToDO.xcodeproj/project.xcworkspace/xcuserdata/ganghoseong.xcuserdatad/UserInterfaceState.xcuserstate b/ToDO/ToDO.xcodeproj/project.xcworkspace/xcuserdata/ganghoseong.xcuserdatad/UserInterfaceState.xcuserstate index 489bbb3..5e6ed69 100644 Binary files a/ToDO/ToDO.xcodeproj/project.xcworkspace/xcuserdata/ganghoseong.xcuserdatad/UserInterfaceState.xcuserstate and b/ToDO/ToDO.xcodeproj/project.xcworkspace/xcuserdata/ganghoseong.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/1024.png b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/1024.png new file mode 100644 index 0000000..d769edc Binary files /dev/null and b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/1024.png differ diff --git a/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/114.png b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/114.png new file mode 100644 index 0000000..289ade4 Binary files /dev/null and b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/114.png differ diff --git a/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/120.png b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/120.png new file mode 100644 index 0000000..6bf2476 Binary files /dev/null and b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/120.png differ diff --git a/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/180.png b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/180.png new file mode 100644 index 0000000..292ecef Binary files /dev/null and b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/180.png differ diff --git a/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/29.png b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/29.png new file mode 100644 index 0000000..207f93d Binary files /dev/null and b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/29.png differ diff --git a/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/40.png b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/40.png new file mode 100644 index 0000000..c612703 Binary files /dev/null and b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/40.png differ diff --git a/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/57.png b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/57.png new file mode 100644 index 0000000..dc0fad5 Binary files /dev/null and b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/57.png differ diff --git a/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/58.png b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/58.png new file mode 100644 index 0000000..b967d29 Binary files /dev/null and b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/58.png differ diff --git a/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/60.png b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/60.png new file mode 100644 index 0000000..4024bb7 Binary files /dev/null and b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/60.png differ diff --git a/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/80.png b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/80.png new file mode 100644 index 0000000..eb610a9 Binary files /dev/null and b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/80.png differ diff --git a/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/87.png b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/87.png new file mode 100644 index 0000000..7935bc2 Binary files /dev/null and b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/87.png differ diff --git a/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/Contents.json b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/Contents.json new file mode 100644 index 0000000..af727e0 --- /dev/null +++ b/ToDO/ToDO/Assets.xcassets/AppIcon 1.appiconset/Contents.json @@ -0,0 +1,80 @@ +{ + "images" : [ + { + "filename" : "40.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "60.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "filename" : "29.png", + "idiom" : "iphone", + "scale" : "1x", + "size" : "29x29" + }, + { + "filename" : "58.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "87.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "filename" : "80.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "120.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "filename" : "57.png", + "idiom" : "iphone", + "scale" : "1x", + "size" : "57x57" + }, + { + "filename" : "114.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "57x57" + }, + { + "filename" : "120.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "filename" : "180.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "filename" : "1024.png", + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ToDO/ToDO/Assets.xcassets/AppIcons/Contents.json b/ToDO/ToDO/Assets.xcassets/AppIcons/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/ToDO/ToDO/Assets.xcassets/AppIcons/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ToDO/ToDO/Assets.xcassets/AppIcons/appstore.imageset/Contents.json b/ToDO/ToDO/Assets.xcassets/AppIcons/appstore.imageset/Contents.json new file mode 100644 index 0000000..a0b3a22 --- /dev/null +++ b/ToDO/ToDO/Assets.xcassets/AppIcons/appstore.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "appstore.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ToDO/ToDO/Assets.xcassets/AppIcons/appstore.imageset/appstore.png b/ToDO/ToDO/Assets.xcassets/AppIcons/appstore.imageset/appstore.png new file mode 100644 index 0000000..d769edc Binary files /dev/null and b/ToDO/ToDO/Assets.xcassets/AppIcons/appstore.imageset/appstore.png differ diff --git a/ToDO/ToDO/Assets.xcassets/AppIcons/playstore.imageset/Contents.json b/ToDO/ToDO/Assets.xcassets/AppIcons/playstore.imageset/Contents.json new file mode 100644 index 0000000..861f456 --- /dev/null +++ b/ToDO/ToDO/Assets.xcassets/AppIcons/playstore.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "playstore.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ToDO/ToDO/Assets.xcassets/AppIcons/playstore.imageset/playstore.png b/ToDO/ToDO/Assets.xcassets/AppIcons/playstore.imageset/playstore.png new file mode 100644 index 0000000..a3194c4 Binary files /dev/null and b/ToDO/ToDO/Assets.xcassets/AppIcons/playstore.imageset/playstore.png differ