Comments (15)
Hi @buh, glad to hear you were able to replicate it. I'd like to add: even if your next release isn't happening soon, I would like to have early access to the commit where it is fixed, to see if I can integrate in the project, only if that's possible for you guys.
Thanks in advance for your hard work and help with this!
from stream-chat-swift.
Definitely will try that! I’ll let you know how it goes, and please excuse me for not telling you guys I was using SwiftUI.
Thanks!
from stream-chat-swift.
Hi @b-onc - Deleted DerivedData
, cleaned, installed, even tested on a different computer, same issue.
Here you will find an example project with the issue I'm describing, hope you are able to replicate the it using this!
https://drive.google.com/file/d/1zrc0a_JYdyKsTOpVTO4oi_VbO8OPdP2k/view?usp=sharing
IMPORTANT:
Please, do not forget to fill file SceneDelegate.swift
line 23
with your API KEY.
from stream-chat-swift.
Thanks @carlostrianag for the example project. Now we see the issue and will fix it in the next release.
from stream-chat-swift.
Gap is there even when keyboard is not visible.
from stream-chat-swift.
Hello @carlostrianag
Thanks for the issue. Can you post more info about the view hierarchy? A screenshot of view debugger would help. Is your tabbar opaque? Do you directly embed chatviewcontroller or ChannelViewController pushes it?
We've resolved this issue in 1.5.5 as you've mentioned so it's surprising you're seeing this. If it's a regression, we'll make sure to resolve it in 1.5.6
@saurabhPV It's expected, you can customize this via style
. See here
from stream-chat-swift.
Hello @b-onc, thanks for the quick response. Here are the details you requested.
Can you post more info about the view hierarchy?
Is your tabbar opaque?
Yes, it is
Do you directly embed chatviewcontroller or ChannelViewController pushes it?
ChannelViewController pushes it.
from stream-chat-swift.
@carlostrianag Thanks for the info. Can you share more about your ChatDetailsViewController
? Is the tab bar visible in your ChatDetailsViewController
?
If your code is proprietary you can email us on [email protected]
from stream-chat-swift.
@b-onc - ChatDetailsViewController
is a a class that extends from ChatViewController
.
I have one more class called ConversationsViewController
which is a class that extends from your ChannelsViewController
and there I have overridden the createChatViewController
with this:
override func createChatViewController(with channelPresenter: ChannelPresenter, indexPath: IndexPath) -> ChatViewController {
let chatVC = ChatDetailsViewController()
chatVC.style = style
channelPresenter.eventsFilter = channelsPresenter.channelEventsFilter
chatVC.channelPresenter = channelPresenter
return chatVC
}
Is the tab bar visible in your ChatDetailsViewController?
No, tab bar is containing the ChatDetailsViewController
through ConversationsViewController
however it is not visible when ChatDetailsViewController
is presented.
View Hierarchy
_UITabBarController
______ NavigationController
___________ConversationsViewController
_______________ChatDetailsViewController
from stream-chat-swift.
@carlostrianag Thanks! I suspect the issue lies somewhere in how the ChatDetailsViewController
UI is setup - in our tests (which uses ChatViewController
we can't reproduce this issue. What custom stuff are you doing (regarding UI) inside your ChatDetailsViewController
?
And by the way thanks a lot for the informative and to the point comments 👍
from stream-chat-swift.
@b-onc - you're welcome!
What custom stuff are you doing (regarding UI) inside your ChatDetailsViewController
?
This is what I'm doing inside this class.
class ChatDetailsViewController: ChatViewController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.setupDefaultNavigationBar()
navigationController?.navigationBar.prefersLargeTitles = false
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
}
}
This is the code inside the method setupDefaultNavigationBar()
func setupDefaultNavigationBar() {
navigationBar.setBackgroundImage(UIColor.white.image(), for: .default)
navigationBar.shadowImage = UIColor.white.image()
navigationBar.isTranslucent = false
navigationBar.tintColor = .black
modalPresentationCapturesStatusBarAppearance = true
}
from stream-chat-swift.
Hello @carlostrianag ,
Trying the exact same configuration you've provided, I'm unable to reproduce the issue: the ComposerView
moves correctly. Can you try deleting DerivedData
(and related cache) and clean install? It'd be awesome if you can provide a simple example project.
from stream-chat-swift.
Hello @carlostrianag ,
We've investigated the issue, and found a solution: just add .edgesIgnoringSafeArea(.bottom)
:
struct ContentView: View {
var body: some View {
TabView {
ChatsViewController().tabItem {
VStack {
Image(systemName: "1.circle")
Text("Chats")
}
}.edgesIgnoringSafeArea(.bottom)
}
}
}
Turns out SwiftUI does not pass safe area to child views, it just places them on top of tab bar and this was causing wrong calculations in composer view position calculations. When we add edgesIgnoringSafeAre(.bottom)
, SwiftUI puts the view all the way to the bottom so safe area is included in the calculations.
You can check how it's calculated in ChatViewController.swift:53
and ChatViewController+Composer.swift:21
. It'd be helpful to mention you're using SwiftUI too, since we officially don't support it yet (but it's on our roadmap). Let me know if that works for you.
from stream-chat-swift.
Hello @b-onc, it worked for SwiftUI, however I realized I should not be using SwiftUI for that view, so I tried the usual way, using Storyboards. What is weird is that if I try using Storyboards in the sample project I sent, it works perfectly, however if I try Storyboards in the actual project it won't work. Same thing keeps happening. Already cleaned and re-installed.
As this is proprietary code, is there a way we could have sort of a call, to find out what's wrong and determine if it is still a bug?
from stream-chat-swift.
Hello @carlostrianag ,
You can reach us at [email protected] for further support. You can gather some info and open another issue in this repo, I've closed this since it was related to SwiftUI and was (kinda) resolved.
from stream-chat-swift.
Related Issues (20)
- Showing Translated Message After Delete The Message HOT 1
- Does ChatChannelController.loadPreviousMessages has a maximum pageSize? HOT 4
- Slack-style reactions HOT 8
- For iOS is not a valid binary HOT 2
- Not able to connect user to the Chat HOT 2
- Token provider keeps retrying after calling disconnect HOT 5
- Passing an Invalid Token during connection triggers an infinity loop. HOT 3
- Unable to receive push Notifications: error "DeviceTokenNotForTopic" HOT 2
- Missing super.init in AsyncOperation HOT 2
- Error "'shared' is unavailable in application extensions for iOS..." when using UNNotificationServiceExtension HOT 1
- App crash on creating a new 1:1 chat, found nil when unwrapping optional in ListDataBaseObserver HOT 26
- Composer text input not resizing correctly HOT 6
- Message author miscomputed after user id change during the same session HOT 3
- Multiple didUpdateChannel with unreadCount 0 HOT 23
- Upload Image to GetStream CDN HOT 1
- See Original and Translated Message HOT 6
- Message Search Not Working HOT 11
- Custom subview of ChatMessageContentView is not sized correctly HOT 5
- TokenProvider not triggering refresh and causing infinite API calls HOT 5
- Is it possible for me to query a channel to direct message only? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stream-chat-swift.