Comments (15)
Could you describe what animation you are seeing and how it differs from your expectations? Or attach a .gif?
from messageviewcontroller.
I don't think this is normal
from messageviewcontroller.
That indeed does not look normal. Can you post some of your code, and explain when this behavior occurs?
from messageviewcontroller.
@BasThomas This animation appears when this particular collectionView or tableview appear, here is the slow motion GIF of it
and the code is nothing fancy. just a normal tableView.
import UIKit
import MessageViewController
class ViewController: MessageViewController {
let tableView = UITableView()
override func viewDidLoad() {
super.viewDidLoad()
setup(scrollView: tableView)
// Change the appearance of the text view and its content
messageView.inset = UIEdgeInsets(top: 16, left: 16, bottom: 16, right: 16)
messageView.textView.placeholderText = "New message..."
messageView.textView.placeholderTextColor = .lightGray
messageView.font = .systemFont(ofSize: 17)
messageView.backgroundColor = .yellow
self.borderColor = .red
// Setup the button using text or an icon
messageView.setButton(title: "Send", for: .normal, position: .right)
messageView.rightButtonTint = .blue
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "Cell")
tableView.dataSource = self
}
}
extension ViewController: UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 5
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)
cell.backgroundColor = .green
return cell
}
}
from messageviewcontroller.
I believe changing messageView.inset
and calling messageView.setButton
will trigger a new layout is needed, try calling layoutIfNeeded
at the end of viewDidLoad
from messageviewcontroller.
@nathantannar4 Not working. I tried calling on
messageView.layoutIfNeeded()
tableView.layoutIfNeeded()
self.view.layoutIfNeeded()
I upload the code example here
https://github.com/lohenyumnam/MessageViewControllerTest
from messageviewcontroller.
I think this is only present when you set MessagesViewController
as the root of a UIWindow
launching. It seems to be animating the layout. When I put super.viewDidLoad()
and your setup code in UIView.performWithoutAnimation { }
the issue goes away. Or it could be something in MessagesViewController
, haven't looked super deep into it
from messageviewcontroller.
It's not working for me. @nathantannar4 even with this code
UIView.performWithoutAnimation {
self.setup(scrollView: tableView)
}
from messageviewcontroller.
@BasThomas @nathantannar4 I think this problem is a bug
from messageviewcontroller.
@lohenyumnam If you refer to my last comment I meant ALL setup code in viewDidLoad, not just the scroll view setup.
Im not sure how much of a bug this would be, as its only reproducible during app launch. Do you have a specific use case for why you're using MessagesViewController as your root vc?
from messageviewcontroller.
@nathantannar4 I tried putting all the code inside the UIView.performWithoutAnimation
, got the same result.
And as for root vc the animation still occurs even if it's not root vc.
from messageviewcontroller.
This Unusual animation doesn't seem to occur in the example project, so what I did is I copy the example's ViewController code to my ViewController and here is the result. we can see the same animation.
And I didn't stop, there just to make sure, this time I copy my ViewController's code to example's ViewController and here is the result
from messageviewcontroller.
Ok here is the thing this problem seems to go away if I install from master
pod 'MessageViewController', :git => 'https://github.com/GitHawkApp/MessageViewController.git', :branch => 'master'
from messageviewcontroller.
Possibly fixed in https://github.com/GitHawkApp/MessageViewController/pull/72
then?
from messageviewcontroller.
@nathantannar4 I am not sure, but master branch doesn't seems to have the problem.
is there any reason why the default pod version is not pointing to the latest version ?
from messageviewcontroller.
Related Issues (20)
- Make the attachment button do something HOT 2
- Improve autocomplete view accessibility
- Inconsistent text view font HOT 20
- Improve hit area for send button HOT 1
- Add accessibility information to the send button HOT 4
- Autocomplete feature only HOT 7
- Not respecting bottom inset when adjusting offset for keyboard HOT 2
- messageView.font seems to not be working? HOT 4
- How to integrate MessageViewController with MessageKit or JSQMessageViewController HOT 6
- Insets not respecting tabBarController height HOT 2
- Buttons don't align vertically with textInputView HOT 1
- Should setting messageView.text trigger textDidChange delegate methods? HOT 1
- Autocomplete in landscape gets cut off
- 26 error on Swift 4.2 on Xcode 10 HOT 2
- Enable/Disable the Send/Right button
- Release 0.3 HOT 1
- How to change textColor or TextView. Scroll issue when started typing.
- Wear behavior when one starts tapping the keyboard. There is some error on the code. Please, can someone take a look inside the addObservers function?
- Weird issue when started typing
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 messageviewcontroller.