#[repr(C)]pub struct NSViewController {
pub ptr: Id<Object>,
}
Expand description
A controller that manages a view, typically loaded from a nib file.
Fields§
§ptr: Id<Object>
The raw pointer to the Objective-C object.
Implementations§
Source§impl NSViewController
impl NSViewController
Sourcepub fn init_with_nib_name_bundle(nib_name: NSNibName, bundle: NSBundle) -> Self
pub fn init_with_nib_name_bundle(nib_name: NSNibName, bundle: NSBundle) -> Self
Returns a view controller object initialized to the nib file in the specified bundle.
Sourcepub fn load_view(&self)
pub fn load_view(&self)
Instantiates a view from a nib file and sets the value of the view property.
Sourcepub fn represented_object(&self) -> id
pub fn represented_object(&self) -> id
Returns the represented object of the view controller.
Sourcepub fn nib_bundle(&self) -> NSBundle
pub fn nib_bundle(&self) -> NSBundle
The nib bundle to be loaded to instantiate the receiver’s primary view.
Sourcepub fn nib_name(&self) -> NSNibName
pub fn nib_name(&self) -> NSNibName
The name of the nib file to be loaded to instantiate the receiver’s primary view.
Sourcepub fn set_title(&self, title: id)
pub fn set_title(&self, title: id)
Sets the localized title of the receiver’s primary view.
§Arguments
title
- The title to be set as the primary view.
Sourcepub fn view_did_load(&self)
pub fn view_did_load(&self)
Called after the view controller’s view has been loaded into memory.
Methods from Deref<Target = Object>§
Sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Returns a reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T
.
Sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Returns a mutable reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T
.