Code Monkey home page Code Monkey logo

somessaging's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

somessaging's Issues

Invalid message grouping mechanism

First of all thank you for this good component, however it doesn't feet into some of my needs. There's a datasource method, - (NSTimeInterval)intervalForMessagesGrouping to group the messages. I've doubt that its not working upto the mark.

For e.g.

- (NSTimeInterval)intervalForMessagesGrouping {
    return (24*60*60); //24 hours grouping
}

However, this isn't working with my case.

I'm sending a message at 23:58pm (today's date) and another message at 00:05am (tomorrow's date) then it'll not show grouping for the message.

I'm not sure how I can edit this and show messages in a day group.

For e.g.
for each unique dates for messages there'll be a group.

Any one have done this with SOMessaging before?

P.S. I'm using pod version of SOMessaging in my app. I think making changes in some classes will discard my changes in future if its pod will get update.

How can I use FetchedResultsController with it?

I am having problems using this with core data fetchedResultsController would be great if you could help me out.

The problem is that the It needs an NSArray of SOMessage objects. I dont like the idea of converting fetchedResultsController to NSArray because I think when I try to reload new message obviously it will have to convert each time and if the array already has data it will crash. Any Ideas?

[WARNING] - Rename the selector handleMediaTapped:

Hi,

I work in app who using this library. Past week Apple rejected the app because of this selector. Apparently this selector is the same of one iOS private API. To fix, I renamed and resubmitted the app, today the app was approved.

(handleMediaTapped:)

why pan gesture recognizer in SOMessageInputView?

Is the UIPanGestureRecognizer in SOMessageInputView only for the behavior where the input view bar ducks down as the user drags the scrollview?

I'm using the SOMessageInputView without the rest of SOMessaging (works pretty well, thanks!) and wanting to omit that behavior. I'll make a pull request at some point that makes it an option, probably just a BOOL property in SOMessageInputView.h.

Would you like, in my pull request, to expose that option in SOMessagingDataSource also? What should this be called, something like "shouldRetractInputViewOnDrag", "dragCanDuckInputBar"?

Note: those settings methods might be better suited for the Delegate protocol instead, that is, if following Cocoa's usual data source / delegate division of labor.

considering the navigation bar

I'm getting to the SOMessagingViewController through a push segue, so I have a navigation controller at the top. How do I get the table view size to consider that?

Just to say thank you

Thank you for publishing this library, the iOS community definitely needs such a comprehensive chatting UI.
Thanks again.

please help me

---Hi I need you help ! i used it ,but i am in trouble ! i need delete chat messages ,how to do this……^^

Getting jerks while scrolling (Not smooth)

The scrolling is not at all smooth. I've updated most of the things myself but it's hardly making any difference.
Can you help me, what can I do or what changes do I need to make on the current library to make it better?

Demo broken?

It seems that the SOMessaging directory is not located correctly in the demo

Media Photo/Video

why i can't send message as image and video while i can send text message?

program breaks at my_shouldAutoRotate in UINavigationController+Rotations

Hi I am using NVSlideMenuController for horizontal navigation for menu from link https://github.com/nverinaud/NVSlideMenuController but the program breaks at

  • (BOOL)my_shouldAutorotate
    {
    if ([self respondsToSelector:@selector(cantAutorotate)] && self.cantAutorotate) {
    return NO;
    }
    return [self my_shouldAutorotate];
    }

will you please help me ..... I tried to run after removing the NVSlideMenuController again the app crashed in the same method giving error [UITabBarController my_shouldAutorotate]: unrecognized selector sent to instance 0x79ecd420

How to delete a Specific row ?

Hi I am working with this Library working Great But i need delete a particular row like after long press for that I am using Gestures below is my Gesture method

CGPoint p = [gestureRecognizer locationInView:self.tableView];
NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:p];
id message = self.conversation[indexPath.section][indexPath.row];
int index = (int)[[self messages] indexOfObject:message];
it is showing currenct index value but getting error like beyond the bounds exception. I thing it is problem with the section and rows in soMessaging but I am unable to delete that row can any body help me please

NSRangeException occurs when I perform [receiveMessage:]

Hi all,
I have met a bug that sometimes may happen sometimes may not when calling [receiveMessage:].

I perform an async request to server to get a list of messages of 50 items. And I use a for loop to call [self receiveMessage:message];, and then an exception occurs as follows:

2014-08-02 17:37:08.157 Foyo[3355:4607] *** Terminating app due to uncaught exception 'NSRangeException', reason: '-[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:]: row (25) beyond bounds (25) for section (0).'
*** First throw call stack:
(0x2dc63f83 0x384deccf 0x2dc63ec5 0x306a0a41 0x306a07cb 0xf43ed 0xf4193 0xf921d 0xfea67 0xfaa9b 0x2e679f35 0x2e5a83c7 0x2e5985ab 0x2e63c76d 0x389cc293 0x389cdad7 0x389cdd29 0x38b08bd3 0x38b08a98)
libc++abi.dylib: terminating with uncaught exception of type NSException

Anyone could help me?

Message with Chinese characters is cut when it is displayed in the table cell.

Hi all,

I send a message of Chinese characters more than 16 words in utf8. It is fine to see that the whole string is recorded in the database. However, when it is displayed in the table cell, only one line is displayed, all others is cut and is not displayed any more. I think it is a bug; however, I cannot find where the problem is.

Anyone can help me? Thank you very much!

How to not refresh a chatScreen When i Receive a Message?

Hi when i got message it is scrolling to Bottom. I observed RefreshMessages in SOMessagingViewController. Because of this method it is showing like that so i just remove that method. i am not receiving any messages now and also faced Exception below index value

  • (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
    {
    CGFloat height;
    id message = self.conversation[indexPath.section][indexPath.row];
    int index = (int)[[self messages] indexOfObject:message];
    height = [self heightForMessageForIndex:index];
    return height;
    }
    here index is showing different where i am missing is there any other approach to achieve this

iOS 6 support?

Is this possible? Would be awesome if this can be achieved! Great open source repo!

How to set position of cell?

@arturdev
I wanted to know that how did you set the position of cell as per the fromMe parameter. Like if fromMe is YES then cell gets positioned to right, so how do you set the x co-ordinate? I saw the ballonImage and textview are all positioned at 0,0 which they take relative to cell. Correct me if I am wrong.
I want this because I want to have a new cell which is centered unlike right or left.

Extra View above chat tableview

How do I add an extra view at top just below navigation bar. The messages should be follow this view. Or can I load the entire thing in a different view.

Text Input View hide behind KeyBoard.

when text in chat box becomes too long (5 - 6 lines). When you dismiss keyboard and start texting again, Text Input View disappear behind Key Board. Please see screen shot
imgo 1

Using it for Group Chat

I want to implement a group chat using SOMessaging, Will it be possible??
Is it compatible for multiple user?

SOMessaging left gesture issue (AMSlideMenu)

I use AMSlideMenu (left menu).

When you put SOMessaging controller as Content view (through Navigation controller where SOMessaging is a root view) the left gesture over SOMessaging controller does not present left menu.

How to add image to Textview?

HI How to add border to text view i tried with textview methods like below
self.textView.layer.borderColor=[UIColor redColor].CGColor;
and also tried with the image like below
self.textView.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"separator.png"]];
but it is not showing any modifications. can any body please help me how to add border to text view
like below

textview

dataSource set to nil

I am unable to set values to SOMessage Object (comment for my project) from my View Controller file. It gets set to nil. Here is the source code -->

//
// Message.swift
//

import UIKit

class Message: SOMessage {

// @synthesize attributes,text,date,fromMe,media,thumbnail,type;

override init() {
    super.init()
    self.date = NSDate()
}  

}

//
// CommentsVC.swift
//

import UIKit

class CommentsVC: SOMessagingViewController {

var dataSource: NSMutableArray!

override func viewDidLoad() {
    super.viewDidLoad()

    self.loadMessages()
}

func loadMessages(){

    var comment: Message = Message()
    comment.text = "HI ! This is Sparta !!!"
    comment.fromMe = false
    comment.type = SOMessageTypeText
    comment.date = NSDate()
    dataSource.addObject(comment)

}

override func intervalForMessagesGrouping() -> NSTimeInterval {
    return NSTimeInterval(0)
}

override func messages() -> NSMutableArray {
    return dataSource
}

override func configureMessageCell(cell: SOMessageCell!, forMessageAtIndex index: Int) {

    var message: Message = self.dataSource[index] as! Message;

    println(message.fromMe)

    if (message.fromMe != false) {
        cell.contentInsets = UIEdgeInsetsMake(0, 3.0, 0, 0) //Move content for 3 pt. to right
        cell.textView.textColor = UIColor.blackColor()
    } else {
        cell.contentInsets = UIEdgeInsetsMake(0, 0, 0, 3.0); //Move content for 3 pt. to left
        cell.textView.textColor = UIColor.whiteColor();
    }
}

override func messageInputView(inputView: SOMessageInputView!, didSendMessage message: String!) {

    var msg: Message = Message()
    msg.text = message
    msg.fromMe = true

    self.sendMessage(msg)
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}

Rename inputView

If you call becomeFirstResponder for tableView this cause crash because inputView as UIResponder interface expects it to be.

3rd party keyboard break the UI.

I've tested 3rd party keyboard (swiftkeyboard) with SOMessaging and it breaks the UI. If I've selected switftkeyboard then the frame of the message input view is not longer proper.

Bubble with random left margin

Hi, all,

I am developing a chat app to support message bubbles appear randomly of the left margin in the table cell. I find that in SOMessageCell, the kBubbleLeftMargin and kBubbleRightMargin are defined as a fixed number. I wonder what is the best way to randomly generate these two values to make the messages appear more interesting. Is it in adjustCell?

Thank you very much!

changing font size doesn't change size of balloon

I added this method to my viewController

  • (UIFont *)messageFont
    {
    return [UIFont fontWithName:@"HelveticaNeue-Light" size:14];
    }

Changing the font size which is in default 12 to 14. But then, the text of messages didn't fit to the size of the balloon anymore.
Should I do anything else in order to change the font size?

Add extra view to background

I want to add an extra view to background containing ImageView and Label when there are no chats i.e. when tableView is empty. And hide it when message data source contains data.

How to load user profile images from a URL?

I tried using SOMessageCell's property userImageView to set an image from URL into Chat, but found that its not working, when I do this its not showing up any image even I've a place holder image too.

Please tell me is it possible or not?

P.S. setting cell.userImage directly is working. And I'm using UIImageView+AFNetworking to set image from URL into userImageView.

Thanks in advance!

BalloonImage is missing when cell message contain Media

I am using SOMessagging in my app and its behaving very inconsistent when images and text is showing in same thread. Some times ballonImage is not shown in text as seen in pics. Its clearly seen that text and balloonImage both are not shown but they both exist there and options are appear. Tell me how could i handle it, thanks in advance.

simulator screen shot 16-nov-2015 12 24 51 pm
simulator screen shot 16-nov-2015 12 25 12 pm
simulator screen shot 16-nov-2015 12 25 31 pm
simulator screen shot 16-nov-2015 12 25 36 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.