Skip to content

Commit

Permalink
Merge pull request #47 from haru-speak/feature_Home_bluePlaylist
Browse files Browse the repository at this point in the history
test commit
  • Loading branch information
Yeeun411 authored Jan 23, 2023
2 parents 3f3f51f + 59cb910 commit cd465f4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
Binary file not shown.
27 changes: 26 additions & 1 deletion haruSpeak_iOS/ViewController/Home/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ class HomeViewController: UIViewController, FSCalendarDelegate, FSCalendarDataSo
$0.image = UIImage(named: "x.white")?.withRenderingMode(.alwaysOriginal)
}

//ButtonArray
let playButtonArray = ["play.white","pause.white"]
var playindex = 0

//MARK: - LifeCycle
override func viewDidLoad() {
super.viewDidLoad()
Expand Down Expand Up @@ -174,6 +178,19 @@ class HomeViewController: UIViewController, FSCalendarDelegate, FSCalendarDataSo
@objc func didClickAnnouncement(sender: UITapGestureRecognizer) {
print("didClickAnnouncement")
}
@objc func didClickPlay(sender: UITapGestureRecognizer) {
self.playindex = (self.playindex >= self.playButtonArray.count-1) ? 0 : self.playindex+1
self.playButton.image = UIImage(named:playButtonArray[playindex])
if playindex == 0{
print("clickPause")
}else{
print("clickPlay")
}
}
@objc func didClickClose(_ sender: Any) {
print("Click Clost blue Playlist")

}

// 캘린더 늘리기 일단 보류
// @objc func didDragCalendar(sender: UIPanGestureRecognizer) {
Expand Down Expand Up @@ -285,7 +302,7 @@ class HomeViewController: UIViewController, FSCalendarDelegate, FSCalendarDataSo
}
self.playButton.snp.makeConstraints{
$0.centerY.equalToSuperview()
$0.leading.equalToSuperview().offset(16)
$0.leading.equalToSuperview().offset(26.21)
}
self.playTitle.snp.makeConstraints{
$0.centerY.equalToSuperview()
Expand All @@ -297,6 +314,7 @@ class HomeViewController: UIViewController, FSCalendarDelegate, FSCalendarDataSo
}



}


Expand All @@ -311,6 +329,13 @@ class HomeViewController: UIViewController, FSCalendarDelegate, FSCalendarDataSo
announcementButton.isUserInteractionEnabled = true
announcementButton.addGestureRecognizer(AnnouncementBtn)

let playBtn = UITapGestureRecognizer(target: self, action: #selector(didClickPlay))
playButton.isUserInteractionEnabled = true
playButton.addGestureRecognizer(playBtn)

let closeBtn = UITapGestureRecognizer(target: self, action: #selector(didClickClose))
closeButton.isUserInteractionEnabled = true
closeButton.addGestureRecognizer(closeBtn)
// 캘린더 늘리기 일단 보류
// let CalendarDrag = UIPanGestureRecognizer(target: self, action: #selector(didDragCalendar))
// lineView.isUserInteractionEnabled = true
Expand Down

0 comments on commit cd465f4

Please sign in to comment.