badoo / badoo/Chatto

Collectionview change height

Open
#458 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
4.6k
Forks
588
PR merge metrics
No merged PRs in 30d

Description

Hi,

I want to place a navigationbar on top of chatviewcontroller. When i place it programmatically collectionview which shows messages comes under navigationbar partly. When i try to change content inset of collectionview in viewDidLayoutSubviews collectionview comes to desired positions but then it doesnt scroll to bottom. Even when i send new messages it doesnt scroll to bottom. Any idea about changing collectionview position?

Below is the code that i use.

```
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
self.collectionView.contentInset.top = 50;
}
```

Contributor guide

Open the contributing guide

Research direction

Start with the reported viewDidLayoutSubviews implementation and the collectionView contentInset change, then reproduce the navigation-bar overlap and the lost bottom-scrolling behavior. Done means the collection view is positioned below the navigation bar while still scrolling to the latest message after layout and when sending new messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.