Skip to content

Commit

Permalink
Renames ChatViewController -> BaseChatViewController
Browse files Browse the repository at this point in the history
  • Loading branch information
diegosanchezr committed Feb 1, 2016
1 parent 99b6d7e commit 180cc33
Show file tree
Hide file tree
Showing 13 changed files with 3,574 additions and 1,211 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import Foundation

extension ChatViewController: ChatDataSourceDelegateProtocol {
extension BaseChatViewController: ChatDataSourceDelegateProtocol {

public enum UpdateContext {
case Normal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import Foundation

extension ChatViewController: ChatCollectionViewLayoutDelegate {
extension BaseChatViewController: ChatCollectionViewLayoutDelegate {

public func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return self.decoratedChatItems.count
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extension CGFloat {
static let bma_epsilon: CGFloat = 0.001
}

extension ChatViewController {
extension BaseChatViewController {

public func isScrolledAtBottom() -> Bool {
guard self.collectionView.numberOfSections() > 0 && self.collectionView.numberOfItemsInSection(0) > 0 else { return true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public struct DecoratedChatItem {
}
}

public class ChatViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate {
public class BaseChatViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate {

public struct Constants {
var updatesAnimationDuration: NSTimeInterval = 0.33
Expand Down Expand Up @@ -227,7 +227,7 @@ public class ChatViewController: UIViewController, UICollectionViewDataSource, U
var layoutModel = ChatCollectionViewLayoutModel.createModel(0, itemsLayoutData: [])
}

extension ChatViewController { // Rotation
extension BaseChatViewController { // Rotation

public override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator)
Expand Down
2 changes: 1 addition & 1 deletion ChattoApp/ChattoApp/DemoChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import UIKit
import Chatto
import ChattoAdditions

class DemoChatViewController: ChatViewController {
class DemoChatViewController: BaseChatViewController {

var messageSender: FakeMessageSender!
var dataSource: FakeDataSource! {
Expand Down
7 changes: 4 additions & 3 deletions ChattoApp/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PODS:
- Chatto (1.0.0)
- ChattoAdditions (1.0.0)
- ChattoAdditions (1.0.0):
- Chatto

DEPENDENCIES:
- Chatto (from `..`)
Expand All @@ -13,7 +14,7 @@ EXTERNAL SOURCES:
:path: ".."

SPEC CHECKSUMS:
Chatto: 8fc659c895e22c20d3d180f71f589b196d1fa840
ChattoAdditions: f65ba0cf7b8812320e59b5d72349182e8acabbde
Chatto: 531b14bbb7d21dfc50a86fc4ff70a90367171403
ChattoAdditions: 27c7b59f4c1b1d51d5f37c7199164982fcc59edf

COCOAPODS: 0.39.0
10 changes: 4 additions & 6 deletions ChattoApp/Pods/Local Podspecs/Chatto.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion ChattoApp/Pods/Local Podspecs/ChattoAdditions.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions ChattoApp/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4,733 changes: 3,544 additions & 1,189 deletions ChattoApp/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

## How to use

1. Subclass ChatViewController
1. Subclass BaseChatViewController
2. Override `createChatInputView()` to use `ChattoAdditions.ChatInputBar` or provide your own component
3. Provide a data source with your messages
4. Override `createPresenterBuilders()`. There will be a presenter for each message that will be responsible for the UI of that message.
Expand Down

0 comments on commit 180cc33

Please sign in to comment.