Skip to content

Commit

Permalink
feature : 토스터 기능 추가 (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
dahun-lee-daji committed Apr 22, 2021
1 parent b4243e9 commit 34149bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

import UIKit

class DishCardCell : UICollectionViewCell { @IBOutlet weak var dishImage: UIImageView!
class DishCardCell : UICollectionViewCell {
@IBOutlet weak var dishImage: UIImageView!
@IBOutlet weak var title: UILabel!
@IBOutlet weak var body: UILabel!
@IBOutlet weak var charge: UILabel!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import UIKit
import Toast_Swift

class ViewController: UIViewController {

Expand Down Expand Up @@ -49,6 +50,9 @@ class ViewController: UIViewController {
configuration.textProperties.font = .boldSystemFont(ofSize: 16)
configuration.textProperties.color = .systemBlue

let tap = UITapGestureRecognizer(target: self, action: #selector(handleTapGesture(recognizer:)))
headerView.addGestureRecognizer(tap)

// Apply the configuration to header view
headerView.contentConfiguration = configuration
}
Expand Down Expand Up @@ -101,6 +105,10 @@ class ViewController: UIViewController {
return label
}

@objc private func handleTapGesture(recognizer: UITapGestureRecognizer) {
self.view.makeToast("Toaster 출력 \(recognizer.view)")
}

}

enum section : String, CaseIterable {
Expand Down

0 comments on commit 34149bf

Please sign in to comment.