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 { ... }
}TVInterfaceFactory only.Expand description
Provided Methods§
Sourceunsafe fn viewForElement_existingView(
&self,
element: &TVViewElement,
existing_view: Option<&UIView>,
mtm: MainThreadMarker,
) -> Option<Retained<UIView>>
👎Deprecated: Please use SwiftUI or UIKitAvailable on crate features TVViewElement and objc2-ui-kit only.
unsafe fn viewForElement_existingView( &self, element: &TVViewElement, existing_view: Option<&UIView>, mtm: MainThreadMarker, ) -> Option<Retained<UIView>>
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.
Sourceunsafe fn viewControllerForElement_existingViewController(
&self,
element: &TVViewElement,
existing_view_controller: Option<&UIViewController>,
mtm: MainThreadMarker,
) -> Option<Retained<UIViewController>>
👎Deprecated: Please use SwiftUI or UIKitAvailable on crate features TVViewElement and objc2-ui-kit only.
unsafe fn viewControllerForElement_existingViewController( &self, element: &TVViewElement, existing_view_controller: Option<&UIViewController>, mtm: MainThreadMarker, ) -> Option<Retained<UIViewController>>
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.
Sourceunsafe fn URLForResource(
&self,
resource_name: &NSString,
) -> Option<Retained<NSURL>>
👎Deprecated: Please use SwiftUI or UIKit
unsafe fn URLForResource( &self, resource_name: &NSString, ) -> Option<Retained<NSURL>>
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.
Sourceunsafe fn imageForResource(
&self,
resource_name: &NSString,
) -> Option<Retained<UIImage>>
👎Deprecated: Please use SwiftUI or UIKitAvailable on crate feature objc2-ui-kit only.
unsafe fn imageForResource( &self, resource_name: &NSString, ) -> Option<Retained<UIImage>>
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.
unsafe fn collectionViewCellClassForElement( &self, element: &TVViewElement, ) -> Option<&'static AnyClass>
TVViewElement only.unsafe fn playerViewControllerForPlayer( &self, player: &TVPlayer, mtm: MainThreadMarker, ) -> Option<Retained<UIViewController>>
TVPlayback and objc2-ui-kit only.