Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

tableView does not scroll after message send #41

Open
kobazzo opened this issue Oct 6, 2014 · 2 comments
Open

tableView does not scroll after message send #41

kobazzo opened this issue Oct 6, 2014 · 2 comments
Labels

Comments

@kobazzo
Copy link

kobazzo commented Oct 6, 2014

TableView does not scroll after message send.

this is a knowed problem, someone have an idea for the solution?

@kobazzo
Copy link
Author

kobazzo commented Oct 8, 2014

I Have the solution.

Use this code:

func tableViewScrollToBottomAnimated(animated: Bool) {
    let numberOfSections = tableView.numberOfSections()
    let numberOfRows = tableView.numberOfRowsInSection(numberOfSections-1)

    if numberOfRows > 0 {
        println(numberOfSections)
        let indexPath = NSIndexPath(forRow: numberOfRows-1, inSection: (numberOfSections-1))
        tableView.scrollToRowAtIndexPath(indexPath, atScrollPosition: UITableViewScrollPosition.Bottom, animated: animated)
    }
}

in ChatViewController.swift

@ma11hew28
Copy link
Member

@kobazzo thank you for reporting this issue and for providing a solution. I'm sorry for not fixing this issue. Unfortunately, this project no longer works, and I'm no longer working on it, so I don't plan on fixing this issue. If anything changes, I'll let you know.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants