pub unsafe trait UISpringLoadedInteractionContext: NSObjectProtocol + MainThreadOnly {
// Provided methods
unsafe fn state(&self) -> UISpringLoadedInteractionEffectState
where Self: Sized + Message { ... }
unsafe fn targetView(&self) -> Option<Retained<UIView>>
where Self: Sized + Message { ... }
unsafe fn setTargetView(&self, target_view: Option<&UIView>)
where Self: Sized + Message { ... }
unsafe fn targetItem(&self) -> Option<Retained<AnyObject>>
where Self: Sized + Message { ... }
unsafe fn setTargetItem(&self, target_item: Option<&AnyObject>)
where Self: Sized + Message { ... }
unsafe fn locationInView(&self, view: Option<&UIView>) -> CGPoint
where Self: Sized + Message { ... }
}
Available on crate feature
UISpringLoadedInteraction
only.Expand description
UISpringLoadedContext supplies information about the springloading state and current drag.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn state(&self) -> UISpringLoadedInteractionEffectState
unsafe fn state(&self) -> UISpringLoadedInteractionEffectState
The state that describes the current springloading style.
Sourceunsafe fn targetView(&self) -> Option<Retained<UIView>>
Available on crate features UIResponder
and UIView
only.
unsafe fn targetView(&self) -> Option<Retained<UIView>>
UIResponder
and UIView
only.The view to which the interaction effect is applied. Defaults to the interaction’s view.
Sourceunsafe fn setTargetView(&self, target_view: Option<&UIView>)
Available on crate features UIResponder
and UIView
only.
unsafe fn setTargetView(&self, target_view: Option<&UIView>)
UIResponder
and UIView
only.Setter for targetView
.
Sourceunsafe fn targetItem(&self) -> Option<Retained<AnyObject>>
unsafe fn targetItem(&self) -> Option<Retained<AnyObject>>
The targetItem
allows to distinguish a region of the view on which the interaction is installed.
It is convenient to set this property to a model object associated to targetView
.
Sourceunsafe fn setTargetItem(&self, target_item: Option<&AnyObject>)
unsafe fn setTargetItem(&self, target_item: Option<&AnyObject>)
Setter for targetItem
.
Sourceunsafe fn locationInView(&self, view: Option<&UIView>) -> CGPoint
Available on crate features UIResponder
and UIView
and objc2-core-foundation
only.
unsafe fn locationInView(&self, view: Option<&UIView>) -> CGPoint
UIResponder
and UIView
and objc2-core-foundation
only.Returns the point computed as the location of the current drag in a given view.
Parameter view
: A view on which the drag is taking place. Specify nil to indicate the window.
Returns: A point in the local coordinate system of view
.