You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I'm really enjoying the library so far, awesome work. I'm shipping this in production in the next couple weeks and wanted to provide some feedback based on my experience. Below is the finished screen and the code I needed to write to make it happen:
// Change the appearance of the text view and its content
messageView.inset =UIEdgeInsets(top:20, left:16, bottom:20, right:16)
messageView.font =UIFont(barstool:.regular, size:14)
messageView.textView.placeholderText ="Type comment..."
messageView.textView.placeholderTextColor =.lightGray
messageView.textView.tintColor =.barstoolBrightBlue
// Setup the button using text or an icon
messageView.set(buttonTitle:"Send".uppercased(), for:.normal)
messageView.addButton(target:self, action: #selector(handleSendButtonTapped))
messageView.buttonTint =.barstoolBrightBlue
forviewin messageView.subviews {guardlet button = view as?UIButtonelse{continue}
button.titleLabel?.font =UIFont(barstool:.branding, size:14)
button.contentHorizontalAlignment =.right
}letcontainerView=UIView()
containerView.backgroundColor =UIColor(red:0.945, green:0.945, blue:0.945, alpha:1)
containerView.borderColor =.separator
containerView.borderWidth =1
containerView.cornerRadius =2
messageView.insertSubview(containerView, at:0)
containerView.snp.makeConstraints{ $0.edges.equalToSuperview().inset(8)}
You'll notice a few hacks in there to make this work:
I needed to traverse the view hierarchy to set a custom font on the button as well as customize the labels position
I needed to add a fake view to give that appearance that it sits in a capsule (but the resizing still works great!)
I originally had this screen setup with a stack view pinned to the edges, video player as first view in stackview, tableview as second view in stackview. that quickly broke because the library defaults to setting the tableview's frame directly
Because of the tableview issue, I am setting custom insets and scroll indicator insets to make this view work properly
I apply a transform to the tableview and the cell's content views (.init(scaleX: 1, y: -1)) to get the reverse style scrolling like you would see in a messages app, problem is when keyboard comes up it does not properly move content up so I had to re-listen for the keyboard event (your keyboard methods are internal) in order to make this work
Hope some of this feedback helps, keep up the great work!
The text was updated successfully, but these errors were encountered:
First of all, I'm really enjoying the library so far, awesome work. I'm shipping this in production in the next couple weeks and wanted to provide some feedback based on my experience. Below is the finished screen and the code I needed to write to make it happen:
You'll notice a few hacks in there to make this work:
.init(scaleX: 1, y: -1)
) to get the reverse style scrolling like you would see in a messages app, problem is when keyboard comes up it does not properly move content up so I had to re-listen for the keyboard event (your keyboard methods are internal) in order to make this workHope some of this feedback helps, keep up the great work!
The text was updated successfully, but these errors were encountered: