{"action":"created","issue":{"url":"https://api.github.com/repos/jessesquires/JSQMessagesViewController/issues/853","labels_url":"https://api.github.com/repos/jessesquires/JSQMessagesViewController/issues/853/labels{/name}","comments_url":"https://api.github.com/repos/jessesquires/JSQMessagesViewController/issues/853/comments","events_url":"https://api.github.com/repos/jessesquires/JSQMessagesViewController/issues/853/events","html_url":"https://github.com/jessesquires/JSQMessagesViewController/issues/853","id":60660362,"number":853,"title":"Media message bubble customisation ","user":{"login":"federicocappelli","id":1489236,"avatar_url":"https://avatars.githubusercontent.com/u/1489236?v=3","gravatar_id":"","url":"https://api.github.com/users/federicocappelli","html_url":"https://github.com/federicocappelli","followers_url":"https://api.github.com/users/federicocappelli/followers","following_url":"https://api.github.com/users/federicocappelli/following{/other_user}","gists_url":"https://api.github.com/users/federicocappelli/gists{/gist_id}","starred_url":"https://api.github.com/users/federicocappelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/federicocappelli/subscriptions","organizations_url":"https://api.github.com/users/federicocappelli/orgs","repos_url":"https://api.github.com/users/federicocappelli/repos","events_url":"https://api.github.com/users/federicocappelli/events{/privacy}","received_events_url":"https://api.github.com/users/federicocappelli/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jessesquires/JSQMessagesViewController/labels/questions%20&%20help","name":"questions & help","color":"bfdadc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-11T13:46:52Z","updated_at":"2015-03-11T16:21:27Z","closed_at":"2015-03-11T16:21:27Z","body":"Hi,\r\nI'm trying to customise the bubble image for media messages using:\r\n\r\n```\r\nbubbleFactory = [[JSQMessagesBubbleImageFactory alloc] initWithBubbleImage:[UIImage jsq_bubbleRegularStrokedImage] capInsets:UIEdgeInsetsZero];\r\nself.outgoingAttachmentBubbleImageData = [bubbleFactory outgoingMessagesBubbleImageWithColor:mainColor]; <----\r\nself.incomingAttachmentBubbleImageData = [bubbleFactory incomingMessagesBubbleImageWithColor:[UIColor jsq_messageBubbleLightGrayColor]];\r\n```\r\n\r\nand in messageBubbleImageDataForItemAtIndexPath:\r\n```\r\ncase MessageTypeAttachment:\r\n        {\r\n            if ([message.senderId isEqualToString:self.senderId])\r\n            {\r\n                result = self.outgoingAttachmentBubbleImageData;\r\n            }\r\n            else\r\n            {\r\n                result = self.incomingAttachmentBubbleImageData;\r\n            }\r\n        }\r\n```\r\nmy JSQMessageData implementation use this:\r\n```\r\n- (id<JSQMessageMediaData>)media\r\n{\r\n    return [[NMAttachmentMediaItem alloc] initWithMessage:self];\r\n}\r\n```\r\nEverything works well and I can see my media message but without a bubble image, the issue here is that messageBubbleImageDataForItemAtIndexPath: is never called for media messages and i don't know how to customise the bubble.\r\n\r\nAny suggestion?\r\n\r\np.s an option is customise the view in \"- (UIView *)mediaView\" in the JSQMessageMediaData implementation but is harder and I can't use the really useful jsq_bubbleRegularStrokedImage.\r\n"},"comment":{"url":"https://api.github.com/repos/jessesquires/JSQMessagesViewController/issues/comments/78297984","html_url":"https://github.com/jessesquires/JSQMessagesViewController/issues/853#issuecomment-78297984","issue_url":"https://api.github.com/repos/jessesquires/JSQMessagesViewController/issues/853","id":78297984,"user":{"login":"jessesquires","id":2301114,"avatar_url":"https://avatars.githubusercontent.com/u/2301114?v=3","gravatar_id":"","url":"https://api.github.com/users/jessesquires","html_url":"https://github.com/jessesquires","followers_url":"https://api.github.com/users/jessesquires/followers","following_url":"https://api.github.com/users/jessesquires/following{/other_user}","gists_url":"https://api.github.com/users/jessesquires/gists{/gist_id}","starred_url":"https://api.github.com/users/jessesquires/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessesquires/subscriptions","organizations_url":"https://api.github.com/users/jessesquires/orgs","repos_url":"https://api.github.com/users/jessesquires/repos","events_url":"https://api.github.com/users/jessesquires/events{/privacy}","received_events_url":"https://api.github.com/users/jessesquires/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T16:21:27Z","updated_at":"2015-03-11T16:21:27Z","body":"hey @federicocappelli - correct, media views use `- (UIView *)mediaView`, not the bubble views. This is why you are seeing this behavior.\r\n\r\nBecause `mediaView` is **any** `UIView`, you *can* return the bubble image view.\r\n\r\nYou may want something more complex, in which case you can an subviews, etc."}}