| | |
| | | |
| | | class SearchVC: BaseVC { |
| | | @IBOutlet weak var scrollView: UIScrollView! |
| | | @IBOutlet weak var banner_collectionView: UICollectionView! |
| | | |
| | | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | |
| | | scrollView.contentInsetAdjustmentBehavior = .never |
| | | } |
| | | |
| | | |
| | | override func setUI() { |
| | | banner_collectionView.delegate = self |
| | | banner_collectionView.dataSource = self |
| | | banner_collectionView.register(UINib(nibName: "SearchBannerCCell", bundle: nil), forCellWithReuseIdentifier: "_SearchBannerCCell") |
| | | } |
| | | |
| | | |
| | | @IBAction func customerAction(_ sender: Any) { |
| | | let vc = CustomerListVC() |
| | | push(vc: vc) |
| | | } |
| | | |
| | | override var preferredStatusBarStyle: UIStatusBarStyle{ |
| | | return .darkContent |
| | | } |
| | | } |
| | | |
| | | extension SearchVC:UICollectionViewDelegate{ |
| | | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { |
| | | let vc = SearchStoreListVC() |
| | | push(vc: vc) |
| | | } |
| | | } |
| | | |
| | | extension SearchVC:UICollectionViewDataSource{ |
| | | func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { |
| | | return 5 |
| | | } |
| | | |
| | | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { |
| | | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "_SearchBannerCCell", for: indexPath) as! SearchBannerCCell |
| | | return cell |
| | | } |
| | | } |
| | | |
| | | |
| | | extension SearchVC:UICollectionViewDelegateFlowLayout{ |
| | | func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { |
| | | return 0 |
| | | } |
| | | |
| | | func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { |
| | | return 0 |
| | | } |
| | | |
| | | func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { |
| | | return CGSize(width: JQ_ScreenW, height: JQ_ScreenW * 0.6541) |
| | | } |
| | | } |