Comments (8)
@hassan31 I just calculate and constraint.
Try this
private func setupLeftInputBarItem() {
setLeftStackViewWidthConstant(to: 40, animated: false)
middleContentViewPadding.left = -34
btEmotion = makeButton(named: "ic_sticker_gray", onSelected: "ic_sticker_colored", size: CGSize(width: 40, height: 40))
btEmotion.contentEdgeInsets = UIEdgeInsets(top: 6, left: 16, bottom: 10, right: 0)
btEmotion.tag = 21
setStackViewItems([btEmotion], forStack: .left , animated: false)
invalidateIntrinsicContentSize()
}
private func makeButton(named: String, onSelected nameSelect:String, size: CGSize) -> InputBarButtonItem {
return InputBarButtonItem()
.configure {
$0.spacing = .fixed(10)
$0.setSize(size, animated: false)
$0.image = UIImage(named: named)?.withRenderingMode(.alwaysOriginal)
$0.tintColor = UIColor(white: 0.8, alpha: 1)
}.onSelected {
$0.tintColor = .vinTextColor
$0.image = UIImage(named: nameSelect)?.withRenderingMode(.alwaysOriginal)
}.onTouchUpInside { item in
//print("Item Tapped: \(item.tag)")
if(item.tag == 21){
self.keyboardType = self.keyboardType == .emoji ? .text : .emoji
self.showKeyBoard(type: self.keyboardType, animated: true)
}
}
}
from inputbaraccessoryview.
It looks like an error in your view controller transition. Your image preview controller is dismissed and then your messages controller becomes the first responder so the input bar appears. You should only dismiss the image preview controller when the drag gesture on the image ends
Sent with GitHawk
from inputbaraccessoryview.
How can I do like Messenger App? In Messenger, when I pan gesture on images, i still see input bar behind preview controller.
from inputbaraccessoryview.
Hmm, maybe try playing with the presentation style of the view controller to be .overCurrentContext
?
Or, rather than presenting a new controller just add the image as a subview.
Sent with GitHawk
from inputbaraccessoryview.
Thanks a lot. I had found a solution. It is a trick :)
from inputbaraccessoryview.
@hhoangna what did you find worked for you?
Sent with GitHawk
from inputbaraccessoryview.
Hi, @hhoangna I just saw that you have added Emoji button inside the InputTextView, can you please let me know how can I add this to the InputBarView?
Thanks
from inputbaraccessoryview.
@hhoangna Awesome, thanks alot, it works. :)
from inputbaraccessoryview.
Related Issues (20)
- InputBarAccessoryView + SwiftUI incorrect offset HOT 1
- Library crashes app when adding an attachment when an AttachmentManager dataSource is defined HOT 9
- Layout issues on iPad when using pagesheets HOT 30
- SwiftUI Example Text Field too high, BottomStack too big HOT 2
- The height of input is changed even have set `maxTextViewHeight`
- Keyboard appearance issue!
- AutoCompleteManager Index out of bounds when using custom prefix
- KeyboardManager conflicts with system keyboard movement: How to resolve?
- Unable to build framework when including this via SPM HOT 4
- Xcode 14: custom inputAccessoryView appears prematurely, causing broken push animation HOT 3
- Update library with main and create tag
- The mentionTextAttributes is used for pasting new text.
- iOS 17 issue with selection HOT 1
- InputBarAccessoryView & inputTextView disappeared after searchbar has focused HOT 1
- Changing access modifier of requiredInputTextViewHeight from public to open๏ผ HOT 5
- scrollIndicatorInsets setter Recursion causes crashes HOT 1
- Privacy manifest HOT 2
- About paste monitoring HOT 3
- Why AttachmentManager extensions methods are 'finals'? HOT 2
- How inputTextView parses custom emoticons?
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 inputbaraccessoryview.