ZHChat
ZHChat copied to clipboard
Photo and Audio Message are showing with current date only?
I would like to suggest this code for compress image -
#pragma mark - ZHCMessageMediaData protocol
- (UIView *)mediaView
{
if (self.image == nil) {
return nil;
}
if (self.cachedImageView == nil) {
CGSize size = [self mediaViewDisplaySize];
UIImageView *imageView = [[UIImageView alloc] initWithImage:self.image];
imageView.contentMode = UIViewContentModeScaleAspectFill;
imageView.frame = CGRectMake(0.0f, 0.0f, size.width, size.height);
imageView.clipsToBounds = YES;
[ZHCMessagesMediaViewBubbleImageMasker applyBubbleImageMaskToMediaView:imageView isOutgoing:self.appliesMediaViewMaskAsOutgoing];
self.cachedImageView = imageView;
}
return self.cachedImageView;
}
Thank you for your feedback, picture loading is due to the image link for HTTP causes, has been repaired. As for recording sound, do you open the microphone permissions in the system settings?
Hi Thanks for reply,
My admin is sending me image+message or Audio+message together, in that case messages are not displaying. I want to see image and message or audio with message. Is it possible ?
This is achievable, you just follow the ZHCMessageMediaData
protocol or inherit the ZHCMediaItem
custom you need to MediaItem!
HI, i could not get custom to add in ZHCMediaItem
. could you update with code please
Yes, you can't customize ZHCMediaItem
directly. You must write a class and inherit from ZHCMediaItem
. You can refer to the ZHPhotoItem
in the Demo.
thanks i will check if any thing i will revert back to you.. thanks a lot
Hi It will take time for me write the code of your level really. If you could update me with code how could i add image+test that would be good and thankful to you.
Sorry, in the busy other things! Temporarily can't spare time to help you!
ok once you are free, please update it. thanks