1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
/// Add this interaction to a container view of views that overlay the edge of a scroll view.
/// Any descendants of this view that should affect the shape of the edge effect, such as labels, images, glass views, and controls, will automatically do so.
///
/// In the following example, an interaction is added to a container view of buttons that overlay the bottom edge of a scroll view.
///
/// let interaction = UIScrollEdgeElementContainerInteraction()
/// interaction.scrollView = scrollView
/// interaction.edge = .bottom
/// buttonContainer.addInteraction(interaction)
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uiscrolledgeelementcontainerinteraction?language=objc)
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIScrollEdgeElementContainerInteraction;
);
extern_conformance!(
unsafe impl NSObjectProtocol for UIScrollEdgeElementContainerInteraction {}
);
#[cfg(feature = "UIInteraction")]
extern_conformance!(
unsafe impl UIInteraction for UIScrollEdgeElementContainerInteraction {}
);
impl UIScrollEdgeElementContainerInteraction {
extern_methods!(
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
/// The scroll view to affect
#[unsafe(method(scrollView))]
#[unsafe(method_family = none)]
pub fn scrollView(&self) -> Option<Retained<UIScrollView>>;
#[cfg(all(feature = "UIResponder", feature = "UIScrollView", feature = "UIView"))]
/// Setter for [`scrollView`][Self::scrollView].
///
/// This is a [weak property][objc2::topics::weak_property].
#[unsafe(method(setScrollView:))]
#[unsafe(method_family = none)]
pub fn setScrollView(&self, scroll_view: Option<&UIScrollView>);
#[cfg(feature = "UIGeometry")]
/// The edge of the scroll view to affect
#[unsafe(method(edge))]
#[unsafe(method_family = none)]
pub fn edge(&self) -> UIRectEdge;
#[cfg(feature = "UIGeometry")]
/// Setter for [`edge`][Self::edge].
#[unsafe(method(setEdge:))]
#[unsafe(method_family = none)]
pub fn setEdge(&self, edge: UIRectEdge);
);
}
/// Methods declared on superclass `NSObject`.
impl UIScrollEdgeElementContainerInteraction {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}