Skip to content

Commit

Permalink
Merge pull request #19 from rla36/iOS/feat/toast
Browse files Browse the repository at this point in the history
[iOS] Toast 기능 추가(#17)
  • Loading branch information
1song2 committed Apr 23, 2021
2 parents d36f63d + a22cadb commit 50d24cc
Show file tree
Hide file tree
Showing 42 changed files with 1,826 additions and 509 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ class CollectionViewDataSource: NSObject, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
let headerView = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: SectionHeaderView.identifier, for: indexPath) as! SectionHeaderView
headerView.sectionTitleLabel.text = allDishes[indexPath.section].category.getSectionTitle()
headerView.countOfMenus = allDishes[indexPath.section].dishes.count

return headerView
}
}
9 changes: 8 additions & 1 deletion iOS/BanchanCode/BanchanCode/Views/SectionHeaderView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@
//

import UIKit
import Toaster

class SectionHeaderView: UICollectionReusableView {

@IBOutlet weak var sectionTitleLabel: UILabel!

static let identifier = "SectionHeaderView"

var countOfMenus: Int = 0

override func awakeFromNib() {
super.awakeFromNib()
}

override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {

Toast(text: "\(countOfMenus)개 상품이 등록되어 있습니다").show()
}
}
1 change: 1 addition & 0 deletions iOS/BanchanCode/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ target 'BanchanCode' do
# Pods for BanchanCode

pod 'Alamofire', '~> 5.2'
pod 'Toaster'

target 'BanchanCodeTests' do
inherit! :search_paths
Expand Down
8 changes: 6 additions & 2 deletions iOS/BanchanCode/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
PODS:
- Alamofire (5.2.2)
- Toaster (2.3.0)

DEPENDENCIES:
- Alamofire (~> 5.2)
- Toaster

SPEC REPOS:
trunk:
- Alamofire
- Toaster

SPEC CHECKSUMS:
Alamofire: 814429acc853c6c54ff123fc3d2ef66803823ce0
Toaster: c3473963c78e8cabbf6ea6f11ad0fdaae6f54987

PODFILE CHECKSUM: 77ef8ac9083f8325fbd2a0ab9fb8deffedb5b559
PODFILE CHECKSUM: f453d7f3c0ef0a41d0e0e977b376a5be612af64d

COCOAPODS: 1.10.1
COCOAPODS: 1.8.4
8 changes: 6 additions & 2 deletions iOS/BanchanCode/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

948 changes: 590 additions & 358 deletions iOS/BanchanCode/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 50d24cc

Please sign in to comment.