pub unsafe trait UISpringLoadedInteractionContext: NSObjectProtocol + MainThreadOnly {
// Provided methods
fn state(&self) -> UISpringLoadedInteractionEffectState
where Self: Sized + Message { ... }
fn targetView(&self) -> Option<Retained<UIView>>
where Self: Sized + Message { ... }
fn setTargetView(&self, target_view: Option<&UIView>)
where Self: Sized + Message { ... }
fn targetItem(&self) -> Option<Retained<AnyObject>>
where Self: Sized + Message { ... }
unsafe fn setTargetItem(&self, target_item: Option<&AnyObject>)
where Self: Sized + Message { ... }
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§
Sourcefn state(&self) -> UISpringLoadedInteractionEffectState
fn state(&self) -> UISpringLoadedInteractionEffectState
The state that describes the current springloading style.
Sourcefn targetView(&self) -> Option<Retained<UIView>>
Available on crate features UIResponder and UIView only.
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.
Sourcefn setTargetView(&self, target_view: Option<&UIView>)
Available on crate features UIResponder and UIView only.
fn setTargetView(&self, target_view: Option<&UIView>)
UIResponder and UIView only.Setter for targetView.
Sourcefn targetItem(&self) -> Option<Retained<AnyObject>>
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>)
Sourcefn locationInView(&self, view: Option<&UIView>) -> CGPoint
Available on crate features UIResponder and UIView and objc2-core-foundation only.
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.