TVInterfaceCreating

Trait TVInterfaceCreating 

Source
pub unsafe trait TVInterfaceCreating: NSObjectProtocol {
    // Provided methods
    unsafe fn viewForElement_existingView(
        &self,
        element: &TVViewElement,
        existing_view: Option<&UIView>,
        mtm: MainThreadMarker,
    ) -> Option<Retained<UIView>>
       where Self: Sized + Message { ... }
    unsafe fn viewControllerForElement_existingViewController(
        &self,
        element: &TVViewElement,
        existing_view_controller: Option<&UIViewController>,
        mtm: MainThreadMarker,
    ) -> Option<Retained<UIViewController>>
       where Self: Sized + Message { ... }
    unsafe fn URLForResource(
        &self,
        resource_name: &NSString,
    ) -> Option<Retained<NSURL>>
       where Self: Sized + Message { ... }
    unsafe fn imageForResource(
        &self,
        resource_name: &NSString,
    ) -> Option<Retained<UIImage>>
       where Self: Sized + Message { ... }
    unsafe fn collectionViewCellClassForElement(
        &self,
        element: &TVViewElement,
    ) -> Option<&'static AnyClass>
       where Self: Sized + Message { ... }
    unsafe fn playerViewControllerForPlayer(
        &self,
        player: &TVPlayer,
        mtm: MainThreadMarker,
    ) -> Option<Retained<UIViewController>>
       where Self: Sized + Message { ... }
}
👎Deprecated: Please use SwiftUI or UIKit
Available on crate feature TVInterfaceFactory only.
Expand description

Provided Methods§

Source

unsafe fn viewForElement_existingView( &self, element: &TVViewElement, existing_view: Option<&UIView>, mtm: MainThreadMarker, ) -> Option<Retained<UIView>>
where Self: Sized + Message,

👎Deprecated: Please use SwiftUI or UIKit
Available on crate features TVViewElement and objc2-ui-kit only.

Return a view for the given view element. It is preferred to reuse the existingView if it can be updated. When existingView is an instance of UICollectionViewCell, the cell must be configured instead of creating a new instance. Application must return nil if event is not handled.

Source

unsafe fn viewControllerForElement_existingViewController( &self, element: &TVViewElement, existing_view_controller: Option<&UIViewController>, mtm: MainThreadMarker, ) -> Option<Retained<UIViewController>>
where Self: Sized + Message,

👎Deprecated: Please use SwiftUI or UIKit
Available on crate features TVViewElement and objc2-ui-kit only.

Return a view controller for the given view element. It is preferred to reuse the existingViewController if it can be updated. Application must return nil if event is not handled.

Source

unsafe fn URLForResource( &self, resource_name: &NSString, ) -> Option<Retained<NSURL>>
where Self: Sized + Message,

👎Deprecated: Please use SwiftUI or UIKit

Return a URL given the resource name. The resource name is retrieved from a resource URL specified in elements like badge, img etc. For example, <badge src=“resource://developer-resource” will request for resource with name ‘developer-resource’. Application must return nil if event is not handled.

Source

unsafe fn imageForResource( &self, resource_name: &NSString, ) -> Option<Retained<UIImage>>
where Self: Sized + Message,

👎Deprecated: Please use SwiftUI or UIKit
Available on crate feature objc2-ui-kit only.

Return a UIImage given the resource name. The resource name is retrieved from a resource URL specified in elements like badge, img etc. For example, <badge src=“resource://developer-resource” will request for resource with name ‘developer-resource’. This only works for image elements. Return nil if no image matches the resource name or it is not handled.

Source

unsafe fn collectionViewCellClassForElement( &self, element: &TVViewElement, ) -> Option<&'static AnyClass>
where Self: Sized + Message,

👎Deprecated: Please use SwiftUI or UIKit
Available on crate feature TVViewElement only.
Source

unsafe fn playerViewControllerForPlayer( &self, player: &TVPlayer, mtm: MainThreadMarker, ) -> Option<Retained<UIViewController>>
where Self: Sized + Message,

👎Deprecated: Please use SwiftUI or UIKit
Available on crate features TVPlayback and objc2-ui-kit only.

Trait Implementations§

Source§

impl ProtocolType for dyn TVInterfaceCreating

Source§

const NAME: &'static str = "TVInterfaceCreating"

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 TVInterfaceCreating

Implementations on Foreign Types§

Source§

impl<T> TVInterfaceCreating for ProtocolObject<T>

Implementors§