GithubHelp home page GithubHelp logo

whatsapp-ios's Issues

Input bar doesn't apper exact place when i click text box

Hi thanks for your code. Nice job.
I was change your project story board in "Use Auto Laytout" options. After when i click the text box , Inputbar doesn't appear in above the keyboard. Can you please advice how to fix this?
Please help me...
Waiting for your reply

img_5093

Error when dragging up in the message viewcontroller

Whatsapp[7544:125074] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [50 nan]'
*** First throw call stack:
(
0 CoreFoundation 0x00935746 exceptionPreprocess + 182
1 libobjc.A.dylib 0x005bca97 objc_exception_throw + 44
2 CoreFoundation 0x0093566d +[NSException raise:format:] + 141
3 QuartzCore 0x04f0f6ae _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 190
4 QuartzCore 0x04f0f85c -[CALayer setPosition:] + 56
5 QuartzCore 0x04f0ffa2 -[CALayer setFrame:] + 754
6 UIKit 0x00f86f89 -[UIView(Geometry) setFrame:] + 331
7 UIKit 0x010c9d72 -[UIImageView _setViewGeometry:forMetric:] + 228
8 UIKit 0x010c9f7a -[UIImageView setFrame:] + 63
9 UIKit 0x00f88f77 -[UIView(Geometry) _applyAutoresizingMaskWithOldSuperviewSize:] + 967
10 UIKit 0x00f89cd6 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 301
11 UIKit 0x00f89d63 -[UIView(Geometry) resizeWithOldSuperviewSize:] + 121
12 UIKit 0x00f88893 __46-[UIView(Geometry) resizeSubviewsWithOldSize:]_block_invoke + 87
13 CoreFoundation 0x00859cc3 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 99
14 CoreFoundation 0x0085935f -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 239
15 UIKit 0x00f88823 -[UIView(Geometry) resizeSubviewsWithOldSize:] + 149
16 UIKit 0x00f87089 -[UIView(Geometry) setFrame:] + 587
17 UIKit 0x00fa905a -[UIScrollView setFrame:] + 224
18 UIKit 0x017230aa -[UITextView setFrame:] + 394
19 Whatsapp 0x000ae5c1 -[MessageCell setTextView] + 417
20 Whatsapp 0x000ae380 -[MessageCell buildCell] + 48
21 Whatsapp 0x000ae2eb -[MessageCell setMessage:] + 107
22 Whatsapp 0x000b9453 -[MessageController tableView:cellForRowAtIndexPath:] + 339
23 UIKit 0x0103673d -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 473
24 UIKit 0x0103681f -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 77
25 UIKit 0x0100e8c3 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2770
26 UIKit 0x01029d70 -[UITableView layoutSubviews] + 220
27 UIKit 0x00f9c57a -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 668
28 libobjc.A.dylib 0x005d2771 -[NSObject performSelector:withObject:] + 70
29 QuartzCore 0x04f18e47 -[CALayer layoutSublayers] + 144
30 QuartzCore 0x04f0c925 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 403
31 QuartzCore 0x04f0c77a _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
32 QuartzCore 0x04e68c52 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284
33 QuartzCore 0x04e6a0e5 _ZN2CA11Transaction6commitEv + 487
34 QuartzCore 0x04f4216d _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 477
35 QuartzCore 0x04f425ab _ZN2CA7Display16TimerDisplayLink8callbackEP16__CFRunLoopTimerPv + 123
36 CoreFoundation 0x0088e866 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION
+ 22
37 CoreFoundation 0x0088e1ed __CFRunLoopDoTimer + 1309
38 CoreFoundation 0x0084c54a __CFRunLoopRun + 2090
39 CoreFoundation 0x0084ba5b CFRunLoopRunSpecific + 443
40 CoreFoundation 0x0084b88b CFRunLoopRunInMode + 123
41 GraphicsServices 0x04a362c9 GSEventRunModal + 192
42 GraphicsServices 0x04a36106 GSEventRun + 104
43 UIKit 0x00f09106 UIApplicationMain + 1526
44 Whatsapp 0x000b7cea main + 138
45 libdyld.dylib 0x02eedac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

Integration with Quickblox

Hey Rafael, By any chance you can integrate this with QuickBlox or any other chat APIs? This control is just awesome. It would be even more useful if it is readily available with chat providers. This is not an issue. You can regard it as a wish list from me. Cheers!

Create Message and Send Message in QuickBlox

Hello Team,

I am little confues between create message request and send message request.

I have scenario where i am sending image in group chat its working fine , but problem is that whenever

i create message and then i send that created message to specific group then in chat history its show me

Two message which first one is Created Message and second is Send Message.

can you please tell me why its give me two messages ?

I am calling below method for create Message

[QBRequest createMessage:message successBlock:^(QBResponse * _Nonnull response, QBChatMessage * _Nonnull createdMessage) {

} errorBlock:^(QBResponse * _Nonnull response) {
    block(NO,response.error.description);

}];

I am calling below method for send Message

[MY_GROUP_DIALOG sendMessage:message completionBlock:^(NSError * _Nullable error) {

}];

Change Bubble image color

Your code was very helpful for me, It is working perfect for my requirements. Now I want to change bubble image color, but bubble png is not able to open in any of the system other then mac. Also I want to remove tail from bubble image. Can you please help me in this?

Swift

Hey, thanks a lot for the library, any chance you're going to convert it to Swift anytime soon?

whatsapp-ios with Quickblox

Hi there!

I tried using your code just for UI purposes. But unfortunately I am not a good coder, so is there a way I can use just the UI with "placeholders" for e.g. the senderID or date stamp?

Thanks in advance!

Greetings,
Tarek

Message send status in wrong position

Firstly i want to thank you for your great work. As i was checking sample i came across this issue as i believe this is a issue or wanted like this.

ios simulator screen shot 06-jul-2015 3 30 25 am

CALayer position contains NaN

Hi, when using this lib in iphone 6 and 6plus everything goes fine, when using with smaller screen, like 4s/5/5s sending a long text message and scrolling down a bit let crash the app. my stack trace is this:

First throw call stack:
(
    0   CoreFoundation                      0x0090f746 __exceptionPreprocess + 182
    1   libobjc.A.dylib                     0x00598a97 objc_exception_throw + 44
    2   CoreFoundation                      0x0090f66d +[NSException raise:format:] + 141
    3   QuartzCore                          0x04e966ae _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 190
    4   QuartzCore                          0x04e9685c -[CALayer setPosition:] + 56
    5   QuartzCore                          0x04e96fa2 -[CALayer setFrame:] + 754
    6   UIKit                               0x00f5ff39 -[UIView(Geometry) setFrame:] + 331
    7   UIKit                               0x010a2d22 -[UIImageView _setViewGeometry:forMetric:] + 228
    8   UIKit                               0x010a2f2a -[UIImageView setFrame:] + 63
    9   UIKit                               0x00f61f27 -[UIView(Geometry) _applyAutoresizingMaskWithOldSuperviewSize:] + 967
    10  UIKit                               0x00f62c86 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 301
    11  UIKit                               0x00f62d13 -[UIView(Geometry) resizeWithOldSuperviewSize:] + 121
    12  UIKit                               0x00f61843 __46-[UIView(Geometry) resizeSubviewsWithOldSize:]_block_invoke + 87
    13  CoreFoundation                      0x00833cc3 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 99
    14  CoreFoundation                      0x0083335f -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 239
    15  UIKit                               0x00f617d3 -[UIView(Geometry) resizeSubviewsWithOldSize:] + 149
    16  UIKit                               0x00f60039 -[UIView(Geometry) setFrame:] + 587
    17  UIKit                               0x00f8200a -[UIScrollView setFrame:] + 224
    18  UIKit                               0x016fbf2a -[UITextView setFrame:] + 394
    19  Whatsapp                            0x0008d5c1 -[MessageCell setTextView] + 417
    20  Whatsapp                            0x0008d380 -[MessageCell buildCell] + 48
    21  Whatsapp                            0x0008d2eb -[MessageCell setMessage:] + 107
    22  Whatsapp                            0x00098453 -[MessageController tableView:cellForRowAtIndexPath:] + 339
    23  UIKit                               0x0100f6ed -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 473
    24  UIKit                               0x0100f7cf -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 77
    25  UIKit                               0x00fe797b -[UITableView _updateVisibleCellsNow:isRecursive:] + 3034
    26  UIKit                               0x01002d20 -[UITableView layoutSubviews] + 220
    27  UIKit                               0x00f7552a -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 668
    28  libobjc.A.dylib                     0x005ae771 -[NSObject performSelector:withObject:] + 70
    29  QuartzCore                          0x04e9fe47 -[CALayer layoutSublayers] + 144
    30  QuartzCore                          0x04e93925 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 403
    31  QuartzCore                          0x04e9377a _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
    32  QuartzCore                          0x04defc22 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284
    33  QuartzCore                          0x04df10b5 _ZN2CA11Transaction6commitEv + 487
    34  QuartzCore                          0x04ec916d _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 477
    35  QuartzCore                          0x04ec95ab _ZN2CA7Display16TimerDisplayLink8callbackEP16__CFRunLoopTimerPv + 123
    36  CoreFoundation                      0x00868866 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
    37  CoreFoundation                      0x008681ed __CFRunLoopDoTimer + 1309
    38  CoreFoundation                      0x0082654a __CFRunLoopRun + 2090
    39  CoreFoundation                      0x00825a5b CFRunLoopRunSpecific + 443
    40  CoreFoundation                      0x0082588b CFRunLoopRunInMode + 123
    41  GraphicsServices                    0x049bf2c9 GSEventRunModal + 192
    42  GraphicsServices                    0x049bf106 GSEventRun + 104
    43  UIKit                               0x00ee20b6 UIApplicationMain + 1526
    44  Whatsapp                            0x00096cea main + 138
    45  libdyld.dylib                       0x02ea1ac9 start + 1
    46  ???                                 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

and the row of the exception is this:
_textView.frame = CGRectMake(0, 0, max_witdh, MAXFLOAT);
in method setTextView.

Can you help me?

thanks

issue when scroll bottom

Hi @rcmcastro

I was testing your code, when I scroll to the last cell it does not update the height and it does not reach the end. The first scroll correctly but the following do not.

Regards!!

Application crashes

Application crashes after many messages are entered.

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'

This could be a simple fix. Check MessageController.m line number 210.

[self.tableView beginUpdates];
if ([self.tableArray numberOfMessagesInSection:indexPath.section] == 1)
    [self.tableView insertSections:[NSIndexSet indexSetWithIndex:indexPath.section]
                  withRowAnimation:UITableViewRowAnimationNone];
[self.tableView insertRowsAtIndexPaths:@[indexPath]
                      withRowAnimation:UITableViewRowAnimationBottom];
[self.tableView endUpdates];

There is an unbalanced call here.

Apart from that, I found this sample code was too slow. I am not sure why but I did'nt investigated.

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.