MSMessagesAppTranscriptPresentation

Trait MSMessagesAppTranscriptPresentation 

Source
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 { ... }
}
Available on crate feature MSMessagesAppViewController only.
Expand description

Provided Methods§

Source

unsafe fn contentSizeThatFits(&self, size: CGSize) -> CGSize
where Self: Sized + Message,

Available on crate feature 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.

Source

unsafe fn messageTintColor(&self) -> Option<Retained<UIColor>>
where Self: Sized + Message,

Available on crate feature 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.

Source

unsafe fn messageCornerRadius(&self) -> CGFloat
where Self: Sized + Message,

Available on crate feature 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.

Source

unsafe fn invalidateMessageTintColor(&self)
where Self: Sized + Message,

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.

Trait Implementations§

Source§

impl ProtocolType for dyn MSMessagesAppTranscriptPresentation

Source§

const NAME: &'static str = "MSMessagesAppTranscriptPresentation"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn MSMessagesAppTranscriptPresentation

Implementations on Foreign Types§

Source§

impl<T> MSMessagesAppTranscriptPresentation for ProtocolObject<T>

Implementors§