Skip to content

Commit

Permalink
v1.1 AppStore submission
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Ducret authored and Julien Ducret committed Dec 28, 2016
1 parent f244ba5 commit 7e50796
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
14 changes: 1 addition & 13 deletions WhatFilm/FilmDetailsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -265,19 +265,6 @@ public final class FilmDetailsViewController: UIViewController, ReactiveDisposab
Analytics.track(viewContent: "Selected person", ofType: "Person", withId: "\(person.id)", withAttributes: ["Person": person.name])
} catch { fatalError(error.localizedDescription) }
}

// TODO: - Implement custom segue to person

// if let personViewController = segue.destination as? PersonViewController,
// let pushPersonSegue = segue as? PushPersonSegue,
// let sender = sender as? CollectionViewSelection,
// let cell = sender.collectionView.cellForItem(at: sender.indexPath) as? PersonCollectionViewCell {
// do {
// let person: Person = try sender.collectionView.rx.model(sender.indexPath)
// personViewController.backgroundImagePath = self.backgroundImagePath
// self.preparePushTransition(to: personViewController, with: person, fromCell: cell, andBackgroundImagePath: self.backgroundImagePath, via: pushPersonSegue)
// } catch { fatalError(error.localizedDescription) }
// }
}
}

Expand All @@ -297,6 +284,7 @@ extension FilmDetailsViewController: UICollectionViewDelegate {
// MARK: - UITableViewDelegate functions

public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard collectionView == self.castCollectionView || collectionView == self.crewCollectionView else { return }
let sender = CollectionViewSelection(collectionView: collectionView, indexPath: indexPath)
self.performSegue(withIdentifier: PersonViewController.segueIdentifier, sender: sender)
}
Expand Down
2 changes: 1 addition & 1 deletion WhatFilm/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>12</string>
<string>15</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
Expand Down
7 changes: 5 additions & 2 deletions WhatFilm/Tools.swift
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,12 @@ protocol ReactiveDisposable {
var disposeBag: DisposeBag { get }
}

// MARK: - Reactive extension (UIScrollView)
// https://github.com/tryswift/RxPagination/blob/master/Pagination/UIScrollView%2BRx.swift
// MARK: - Reactive extensions

extension Reactive where Base: UIScrollView {

// MARK: - UIScrollView reactive extension

public var reachedBottom: Observable<Void> {
let scrollView = self.base as UIScrollView
return self.contentOffset.flatMap{ [weak scrollView] (contentOffset) -> Observable<Void> in
Expand All @@ -191,6 +192,8 @@ extension Reactive where Base: UIScrollView {

extension Reactive where Base: UIViewController {

// MARK: - UIViewController reactive extension

public var viewDidLoad: Observable<Void> {
return self.sentMessage(#selector(UIViewController.viewDidLoad)).map({ _ in return () })
}
Expand Down

0 comments on commit 7e50796

Please sign in to comment.