rust_macios/user_notifications/un_notification_trigger.rs
1use objc::{msg_send, sel, sel_impl};
2use rust_macios_objective_c_runtime_proc_macros::interface_impl;
3
4use crate::{object, objective_c_runtime::traits::PNSObject, utils::to_bool};
5
6object! {
7 /// The common behavior for subclasses that trigger the delivery of a local or remote notification.
8 unsafe pub struct UNNotificationTrigger;
9}
10
11#[interface_impl(NSObject)]
12impl UNNotificationTrigger {
13 /// A Boolean value indicating whether the system reschedules the notification after it’s delivered.
14 #[property]
15 pub fn repeats(&self) -> bool {
16 unsafe { to_bool(msg_send![self.m_self(), repeats]) }
17 }
18}