jsqmessagesviewcontroller

Show LocationMediaItem in JSQMessagesViewController

我是研究僧i 提交于 2019-12-06 05:50:16
I have just tried implementing the LocationMediaItem in my Xamarin.iOS app using JSQMessagesViewController . Everything worked out fine, only problem is that the UICollectionView cell which is supposed to show the location is stuck on loading forever and the map is never actually being displayed. Here's some code how I make the locationMediaItem in C#: var locationMediaItem = new LocationMediaItem(new CLLocation(latitude, longitude)); if (ChatDB.Messages[indexPath.Row].user_id == SenderId) { locationMediaItem.AppliesMediaViewMaskAsOutgoing = true; return JSQMessagesViewController.Message

Issue with Duplicate Messages When navigating back to ViewController

北城以北 提交于 2019-12-06 05:47:40
I have a ViewController that shows the user more information, then they click on a button and it sends them to my messageView which is a JSQ ViewController. The JSQViewController uses the collection View classes. When the user navigates back to the more information view and then hits the button to navigate to the message view again, the collection view duplicates my chat bubbles. I think I need to reset something to nil, but I am not sure what to set and where to set it. Here is my code: import UIKit import Firebase import JSQMessagesViewController // MARK: Properties var messages =

How to push a JSQMessagesViewController correctly

别等时光非礼了梦想. 提交于 2019-12-05 07:55:35
I have a Swift project and am trying to use JSQMessagesViewController within it. I have used cocoapods to install the framework and am importing it using a swift import statement. import JSQMessagesViewController Up to this point there are no errors and everything compiles without warning. However when I try to push a new instance onto a navigation controller the app crashes. func openConversation(userId: Int) { let messageViewController = JSQMessagesViewController(); self.navigationController?.pushViewController(messageViewController, animated: true) } The second line of the method causes the

How to add custom view to JSQMessagesViewController cell so that it includes one view with some buttons and text view?

无人久伴 提交于 2019-11-30 19:02:53
问题 I am using https://github.com/jessesquires/JSQMessagesViewController/issues/1820 this library for chat application. By using this libary I am able to send images and video, but my app needs to send one view with some button and text. Like when user sends some text it will appear to others as text and button and then when somebody clicks the button one push notification will be generated. I am not able to figure it out how can I achieve this. Here is screen shot how I want my custom view to be

Could not build Objective-C module 'JSQMessagesViewController'

跟風遠走 提交于 2019-11-30 12:55:54
I have two projects which both use JSQMessagesViewController, however in one of them I am getting the error: "Could not build Objective-C module 'JSQMessagesViewController'", whereas the other one works fine...There is virtually no difference between the two projects, how do I get JSQMessagesViewController to work because it is essential to my application. Thanks. I fixed the problem by going through the following steps: Clean the project, including the build cache (Command-Option-Shift-K) Removing the pod.lock file and the pods.xcodeproj files And then closing Xcode and running pod update

jsqmessageviewcontroller ios11 toolbar

青春壹個敷衍的年華 提交于 2019-11-29 02:22:43
I have tried the swift example of JSQMessageViewController inside iOS 11 simulator. Here is the result: screenshot I have tried using safe area margin and modify the toolbar constraint but there is still no difference. It seems that the toolbar is outside UIWindow (UITextEffectsWindow instead). Is there any solution? ERbittuu Just add an extension for JSQMessagesInputToolbar extension JSQMessagesInputToolbar { override open func didMoveToWindow() { super.didMoveToWindow() if #available(iOS 11.0, *), let window = self.window { let anchor = window.safeAreaLayoutGuide.bottomAnchor bottomAnchor

How to set font family to Navigation Controller Title in swift?

无人久伴 提交于 2019-11-28 14:38:50
I have one View Controller named "Home". I embed it in Navigation Controller. self.navBar.topItem?.title = "Home" I would like to change "Tharlon" font to my UIViewController title bar. self.navBar.topItem?.title = NSLocalizedString("Home", comment: "") self.navigationController?.navigationBar.titleTextAttributes = [NSFontAttributeName: UIFont(name: "Tharlon", size: 17)!] Both these codes are in ViewDidLoad() function. When I run the app, Translated text shows well at the first time. Then, I open other menus and goes back to Home. At that second time, translated text does not show well and it

Argument labels do not match any available overloads

谁说胖子不能爱 提交于 2019-11-28 13:03:19
I am working on a messaging app using JSQMessagesViewController, and I want to associate another variable, an Integer score , with each message (along with the defaults such as senderID , text , and displayName ). This is how I attempt to implement this: func addMessage(id: String, text: String, displayName: String, score: Int) { // Make sure the character count is between 10 and 140, then add message to message list to display if (text.characters.count <= 10 || text.characters.count >= 140) { } else { let message = JSQMessage(senderId: id, displayName: displayName, text: text, score: score)

jsqmessageviewcontroller ios11 toolbar

白昼怎懂夜的黑 提交于 2019-11-27 16:38:29
问题 I have tried the swift example of JSQMessageViewController inside iOS 11 simulator. Here is the result:screenshot I have tried using safe area margin and modify the toolbar constraint but there is still no difference. It seems that the toolbar is outside UIWindow (UITextEffectsWindow instead). Is there any solution? 回答1: Just add an extension for JSQMessagesInputToolbar extension JSQMessagesInputToolbar { override open func didMoveToWindow() { super.didMoveToWindow() if #available(iOS 11.0, *

How to set font family to Navigation Controller Title in swift?

家住魔仙堡 提交于 2019-11-27 08:44:38
问题 I have one View Controller named "Home". I embed it in Navigation Controller. self.navBar.topItem?.title = "Home" I would like to change "Tharlon" font to my UIViewController title bar. self.navBar.topItem?.title = NSLocalizedString("Home", comment: "") self.navigationController?.navigationBar.titleTextAttributes = [NSFontAttributeName: UIFont(name: "Tharlon", size: 17)!] Both these codes are in ViewDidLoad() function. When I run the app, Translated text shows well at the first time. Then, I