1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use core_graphics::base::CGFloat;
use objc::runtime::{Class, Object};
use objc::{msg_send, sel, sel_impl};
use objc_id::ShareId;
use crate::foundation::id;
#[derive(Clone, Debug)]
pub struct ViewAnimatorProxy(pub ShareId<Object>);
impl ViewAnimatorProxy {
pub fn new(proxy: id) -> Self {
Self(unsafe { ShareId::from_ptr(msg_send![proxy, animator]) })
}
pub fn set_alpha(&self, value: CGFloat) {
unsafe {
let _: () = msg_send![&*self.0, setAlphaValue: value];
}
}
}