pub unsafe trait MSMessagesAppTranscriptPresentation {
// Provided methods
unsafe fn contentSizeThatFits(&self, size: CGSize) -> CGSize
where Self: Sized + Message { ... }
unsafe fn messageTintColor(&self) -> Option<Retained<UIColor>>
where Self: Sized + Message { ... }
unsafe fn messageCornerRadius(&self) -> CGFloat
where Self: Sized + Message { ... }
unsafe fn invalidateMessageTintColor(&self)
where Self: Sized + Message { ... }
}MSMessagesAppViewController only.Expand description
Provided Methods§
Sourceunsafe fn contentSizeThatFits(&self, size: CGSize) -> CGSize
Available on crate feature objc2-core-foundation only.
unsafe fn contentSizeThatFits(&self, size: CGSize) -> CGSize
objc2-core-foundation only.The content size of the view controller’s view fitting the constraining size.
This method will only be called if the presentationStyle is MSMessagesAppPresentationStyleTranscript.
Parameter size: The maximum size the view will be displayed at.
Sourceunsafe fn messageTintColor(&self) -> Option<Retained<UIColor>>
Available on crate feature objc2-ui-kit only.
unsafe fn messageTintColor(&self) -> Option<Retained<UIColor>>
objc2-ui-kit only.Override to provide a message tint color, e.g. to match the content of the message, or your app’s brand color.
This color will be drawn either in a material or as a solid color, depending on transcript context. The default value is nil, which renders the plugin balloon with the system standard background color. This must be a simple RGB color - other color types such as displayP3 or pattern images are not supported. This also does not support dynamic colors. If your color needs to be dynamic, you must call invalidateMessageTintColor when the dynamic conditions change.
Sourceunsafe fn messageCornerRadius(&self) -> CGFloat
Available on crate feature objc2-core-foundation only.
unsafe fn messageCornerRadius(&self) -> CGFloat
objc2-core-foundation only.The corner radius of the message when presented in the transcript. Use this value to create concentric rounded subviews inside your view. Use continuous corners (kCACornerCurveContinuous) on your view.
This property varies with dynamic type size. Use trait collection registration to trigger an updated layout when dynamic type size changes. To avoid the edges of the transcript view, use layoutMargins. This value is only valid when presentationStyle is MSMessagesAppPresentationStyleTranscript.
Sourceunsafe fn invalidateMessageTintColor(&self)
unsafe fn invalidateMessageTintColor(&self)
Call this when messageTintColor changes, e.g. due to change in app state or trait collection.
The message will be updated to reflect the new color. This method will only work if the presentationStyle is MSMessagesAppPresentationStyleTranscript.