-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHome.swift
33 lines (26 loc) · 1 KB
/
Home.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import UIKit
class HomeViewController: UIViewController {
@IBOutlet weak var deliverToLabel: UILabel!
@IBOutlet weak var searchBar: UISearchBar!
@IBOutlet weak var categoriesCollectionView: UICollectionView!
@IBOutlet weak var restaurantsTableView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
func setupUI() {
// Setup UI elements
searchBar.placeholder = "Search dishes, restaurants"
// Setup collection view and table view
categoriesCollectionView.dataSource = self
categoriesCollectionView.delegate = self
restaurantsTableView.dataSource = self
restaurantsTableView.delegate = self
}
}
extension HomeViewController: UICollectionViewDataSource, UICollectionViewDelegate {
// Implement collection view methods
}
extension HomeViewController: UITableViewDataSource, UITableViewDelegate {
// Implement table view methods
}