Registers a method with the Objective-C runtime system, maps the method name to a selector, and returns the selector value.
(name: &str)
| 146 | /// Registers a method with the Objective-C runtime system, |
| 147 | /// maps the method name to a selector, and returns the selector value. |
| 148 | pub fn register(name: &str) -> Sel { |
| 149 | let name = CString::new(name).unwrap(); |
| 150 | unsafe { |
| 151 | sel_registerName(name.as_ptr()) |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | /// Returns the name of the method specified by self. |
| 156 | pub fn name(&self) -> &str { |