Fix Label::set_max_number_of_lines causing crash on iOS (#98)
This commit is contained in:
parent
9fbb332b38
commit
1b577506a7
|
@ -417,7 +417,10 @@ impl<T> Label<T> {
|
||||||
/// Sets the maximum number of lines.
|
/// Sets the maximum number of lines.
|
||||||
pub fn set_max_number_of_lines(&self, num: NSInteger) {
|
pub fn set_max_number_of_lines(&self, num: NSInteger) {
|
||||||
self.objc.with_mut(|obj| unsafe {
|
self.objc.with_mut(|obj| unsafe {
|
||||||
|
#[cfg(feature = "appkit")]
|
||||||
let _: () = msg_send![obj, setMaximumNumberOfLines: num];
|
let _: () = msg_send![obj, setMaximumNumberOfLines: num];
|
||||||
|
#[cfg(feature = "uikit")]
|
||||||
|
let _: () = msg_send![obj, setNumberOfLines: num];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue