Skip to content

Commit

Permalink
Merge pull request #11 from muggy79/muggy79-patch-1
Browse files Browse the repository at this point in the history
Switched some lines.
  • Loading branch information
YuigaWada authored Oct 25, 2020
2 parents fb620d6 + 8c4a7b2 commit 6766bc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PolioPager/PolioPagerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,15 @@ open class PolioPagerViewController: UIViewController, TabCellDelegate, PolioPag
guard viewControllers.count == items.count
else { fatalError("The number of ViewControllers must equal to the number of TabItems.") }

pageViewController.setPages(viewControllers)
if needSearchTab {
guard var searchTabViewController = viewControllers[0] as? PolioPagerSearchTabDelegate else { return }

searchTabViewController.searchTextField = searchTextField
searchTabViewController.searchBar = searchBar
searchTabViewController.cancelButton = cancelButton
}

pageViewController.setPages(viewControllers)
}

private func setupAutoLayout() {
Expand Down

0 comments on commit 6766bc6

Please sign in to comment.