-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
1,496 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
Drink-EG/Drink-EG/Sources/VCs/WineClass/ClassVideoBottomViewController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// | ||
// ClassVideoBottomViewController.swift | ||
// Drink-EG | ||
// | ||
// Created by 이호연 on 8/12/24. | ||
// | ||
|
||
import Foundation | ||
|
||
import UIKit | ||
import SnapKit | ||
|
||
|
||
class ViewController: UIViewController { | ||
|
||
let imageView = UIImageView() | ||
|
||
|
||
override func viewDidLoad() { | ||
|
||
super.viewDidLoad() | ||
|
||
|
||
setupVideo() | ||
configureSheet() | ||
setupVideoViewConstraints() | ||
|
||
} | ||
|
||
|
||
private func setupVideo() { | ||
view.addSubview(imageView) | ||
|
||
imageView.overrideUserInterfaceStyle = .dark | ||
imageView.frame = view.bounds | ||
imageView.contentMode = .scaleAspectFill | ||
//imageView.clipsToBounds = true | ||
//imageView.layer.cornerRadius = 40 | ||
imageView.image = UIImage(named: "SampleImage") | ||
} | ||
|
||
func setupVideoViewConstraints() { | ||
imageView.snp.makeConstraints { make in | ||
//make.top.equalTo(myinfoLabel.snp.bottom).offset(80) // noteListLabel의 아래에 20포인트 여백 | ||
make.centerX.equalToSuperview() // 가로축 중앙에 배치 | ||
make.height.equalTo(568) | ||
make.width.equalTo(405) | ||
|
||
} | ||
} | ||
|
||
|
||
private func configureSheet() { | ||
|
||
|
||
let vc = SecondViewController() | ||
|
||
let navVC = UINavigationController(rootViewController: vc) | ||
|
||
navVC.isModalInPresentation = true | ||
|
||
if let sheet = navVC.sheetPresentationController { | ||
|
||
sheet.preferredCornerRadius = 40 | ||
|
||
|
||
sheet.detents = [.custom(resolver: {context in | ||
0.4 * context.maximumDetentValue | ||
}), .large()] | ||
|
||
|
||
sheet.largestUndimmedDetentIdentifier = .large | ||
} | ||
navigationController?.present(navVC, animated: true) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.