Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor main flow and make small fixes in other flows #73

Merged
merged 2 commits into from
Feb 1, 2018

Conversation

radyslavkrechet
Copy link
Contributor

  • refactor code with new code style guidelines
  • rename views protocol's name
  • replace data source and delegate classes with provider classes

weak var controllerDelegate: ImagesCarouselViewControllerProtocol?
private var collectionProvider: ImagesCarouselCollectionProvider!

var showingIndex: Int = 0

var images = [Image]() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to var images: [Image] = []


let headerNib = UINib(nibName: String(describing: ProductOptionHeaderView.self), bundle: nil)
collectionView.register(headerNib, forSupplementaryViewOfKind: UICollectionElementKindSectionHeader, withReuseIdentifier: String(describing: ProductOptionHeaderView.self))
let headName = String(describing: ProductOptionHeaderView.self)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

headerName instead of headName


func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
switch section {
case HomeSection.lastArrivals.rawValue:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can concatenate case HomeSection.lastArrivals.rawValue and case HomeSection.popular.rawValue

strongSelf.data.value = (latestProducts, popularProducts, articles)
}
strongSelf.state.onNext(.content)
}, onError: { [weak self] (error) in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the wrong tabulation here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, there is a default Xcode's spacing.

@radyslavkrechet radyslavkrechet merged commit b8757bd into develop Feb 1, 2018
@radyslavkrechet radyslavkrechet deleted the feature/refactoring branch February 1, 2018 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants