Struct objc2_ui_kit::UIImage
source · #[repr(C)]pub struct UIImage { /* private fields */ }
Available on crate feature
UIImage
only.Implementations§
impl UIImage
This impl block contains no items.
UIAccessibility
source§impl UIImage
impl UIImage
pub unsafe fn systemImageNamed(name: &NSString) -> Option<Retained<UIImage>>
pub unsafe fn systemImageNamed_withConfiguration( name: &NSString, configuration: Option<&UIImageConfiguration> ) -> Option<Retained<UIImage>>
Available on crate feature
UIImageConfiguration
only.pub unsafe fn systemImageNamed_compatibleWithTraitCollection( name: &NSString, trait_collection: Option<&UITraitCollection> ) -> Option<Retained<UIImage>>
Available on crate feature
UITraitCollection
only.pub unsafe fn systemImageNamed_variableValue_withConfiguration( name: &NSString, value: c_double, configuration: Option<&UIImageConfiguration> ) -> Option<Retained<UIImage>>
Available on crate feature
UIImageConfiguration
only.pub unsafe fn imageNamed(name: &NSString) -> Option<Retained<UIImage>>
pub unsafe fn imageNamed_inBundle_withConfiguration( name: &NSString, bundle: Option<&NSBundle>, configuration: Option<&UIImageConfiguration> ) -> Option<Retained<UIImage>>
Available on crate feature
UIImageConfiguration
only.pub unsafe fn imageNamed_inBundle_compatibleWithTraitCollection( name: &NSString, bundle: Option<&NSBundle>, trait_collection: Option<&UITraitCollection> ) -> Option<Retained<UIImage>>
Available on crate feature
UITraitCollection
only.pub unsafe fn imageNamed_inBundle_variableValue_withConfiguration( name: &NSString, bundle: Option<&NSBundle>, value: c_double, configuration: Option<&UIImageConfiguration> ) -> Option<Retained<UIImage>>
Available on crate feature
UIImageConfiguration
only.pub unsafe fn imageWithContentsOfFile( path: &NSString ) -> Option<Retained<UIImage>>
pub unsafe fn imageWithData(data: &NSData) -> Option<Retained<UIImage>>
pub unsafe fn imageWithData_scale( data: &NSData, scale: CGFloat ) -> Option<Retained<UIImage>>
pub unsafe fn imageWithCIImage(ci_image: &CIImage) -> Retained<UIImage>
Available on crate feature
objc2-core-image
and non-watchOS only.pub unsafe fn imageWithCIImage_scale_orientation( ci_image: &CIImage, scale: CGFloat, orientation: UIImageOrientation ) -> Retained<UIImage>
Available on crate feature
objc2-core-image
and non-watchOS only.pub unsafe fn initWithContentsOfFile( this: Allocated<Self>, path: &NSString ) -> Option<Retained<Self>>
pub unsafe fn initWithData( this: Allocated<Self>, data: &NSData ) -> Option<Retained<Self>>
pub unsafe fn initWithData_scale( this: Allocated<Self>, data: &NSData, scale: CGFloat ) -> Option<Retained<Self>>
pub unsafe fn initWithCIImage( this: Allocated<Self>, ci_image: &CIImage ) -> Retained<Self>
Available on crate feature
objc2-core-image
and non-watchOS only.pub unsafe fn initWithCIImage_scale_orientation( this: Allocated<Self>, ci_image: &CIImage, scale: CGFloat, orientation: UIImageOrientation ) -> Retained<Self>
Available on crate feature
objc2-core-image
and non-watchOS only.pub unsafe fn size(&self) -> CGSize
pub unsafe fn CIImage(&self) -> Option<Retained<CIImage>>
Available on crate feature
objc2-core-image
and non-watchOS only.pub unsafe fn imageOrientation(&self) -> UIImageOrientation
pub unsafe fn scale(&self) -> CGFloat
pub unsafe fn isSymbolImage(&self) -> bool
pub unsafe fn animatedImageNamed_duration( name: &NSString, duration: NSTimeInterval ) -> Option<Retained<UIImage>>
pub unsafe fn animatedResizableImageNamed_capInsets_duration( name: &NSString, cap_insets: UIEdgeInsets, duration: NSTimeInterval ) -> Option<Retained<UIImage>>
Available on crate feature
UIGeometry
only.pub unsafe fn animatedResizableImageNamed_capInsets_resizingMode_duration( name: &NSString, cap_insets: UIEdgeInsets, resizing_mode: UIImageResizingMode, duration: NSTimeInterval ) -> Option<Retained<UIImage>>
Available on crate feature
UIGeometry
only.pub unsafe fn animatedImageWithImages_duration( images: &NSArray<UIImage>, duration: NSTimeInterval ) -> Option<Retained<UIImage>>
pub unsafe fn images(&self) -> Option<Retained<NSArray<UIImage>>>
pub unsafe fn duration(&self) -> NSTimeInterval
pub unsafe fn drawAtPoint(&self, point: CGPoint)
pub unsafe fn drawInRect(&self, rect: CGRect)
pub unsafe fn drawAsPatternInRect(&self, rect: CGRect)
pub unsafe fn resizableImageWithCapInsets( &self, cap_insets: UIEdgeInsets ) -> Retained<UIImage>
Available on crate feature
UIGeometry
only.pub unsafe fn resizableImageWithCapInsets_resizingMode( &self, cap_insets: UIEdgeInsets, resizing_mode: UIImageResizingMode ) -> Retained<UIImage>
Available on crate feature
UIGeometry
only.pub unsafe fn capInsets(&self) -> UIEdgeInsets
Available on crate feature
UIGeometry
only.pub unsafe fn resizingMode(&self) -> UIImageResizingMode
pub unsafe fn imageWithAlignmentRectInsets( &self, alignment_insets: UIEdgeInsets ) -> Retained<UIImage>
Available on crate feature
UIGeometry
only.pub unsafe fn alignmentRectInsets(&self) -> UIEdgeInsets
Available on crate feature
UIGeometry
only.pub unsafe fn imageWithRenderingMode( &self, rendering_mode: UIImageRenderingMode ) -> Retained<UIImage>
pub unsafe fn renderingMode(&self) -> UIImageRenderingMode
pub unsafe fn imageRendererFormat( &self ) -> Retained<UIGraphicsImageRendererFormat>
Available on crate features
UIGraphicsImageRenderer
and UIGraphicsRenderer
only.pub unsafe fn traitCollection(&self) -> Retained<UITraitCollection>
Available on crate feature
UITraitCollection
only.pub unsafe fn imageAsset(&self) -> Option<Retained<UIImageAsset>>
Available on crate feature
UIImageAsset
only.pub unsafe fn imageFlippedForRightToLeftLayoutDirection( &self ) -> Retained<UIImage>
pub unsafe fn flipsForRightToLeftLayoutDirection(&self) -> bool
pub unsafe fn imageWithHorizontallyFlippedOrientation( &self ) -> Retained<UIImage>
pub unsafe fn baselineOffsetFromBottom(&self) -> CGFloat
pub unsafe fn hasBaseline(&self) -> bool
pub unsafe fn imageWithBaselineOffsetFromBottom( &self, baseline_offset: CGFloat ) -> Retained<UIImage>
pub unsafe fn imageWithoutBaseline(&self) -> Retained<UIImage>
pub unsafe fn configuration(&self) -> Option<Retained<UIImageConfiguration>>
Available on crate feature
UIImageConfiguration
only.pub unsafe fn imageWithConfiguration( &self, configuration: &UIImageConfiguration ) -> Retained<UIImage>
Available on crate feature
UIImageConfiguration
only.pub unsafe fn symbolConfiguration( &self ) -> Option<Retained<UIImageSymbolConfiguration>>
Available on crate features
UIImageConfiguration
and UIImageSymbolConfiguration
only.pub unsafe fn imageByApplyingSymbolConfiguration( &self, configuration: &UIImageSymbolConfiguration ) -> Option<Retained<UIImage>>
Available on crate features
UIImageConfiguration
and UIImageSymbolConfiguration
only.pub unsafe fn imageWithTintColor(&self, color: &UIColor) -> Retained<UIImage>
Available on crate feature
UIColor
only.pub unsafe fn imageWithTintColor_renderingMode( &self, color: &UIColor, rendering_mode: UIImageRenderingMode ) -> Retained<UIImage>
Available on crate feature
UIColor
only.pub unsafe fn imageByPreparingForDisplay(&self) -> Option<Retained<UIImage>>
pub unsafe fn prepareForDisplayWithCompletionHandler( &self, completion_handler: &Block<dyn Fn(*mut UIImage)> )
Available on crate feature
block2
only.pub unsafe fn imageByPreparingThumbnailOfSize( &self, size: CGSize ) -> Option<Retained<UIImage>>
pub unsafe fn prepareThumbnailOfSize_completionHandler( &self, size: CGSize, completion_handler: &Block<dyn Fn(*mut UIImage)> )
Available on crate feature
block2
only.pub unsafe fn isHighDynamicRange(&self) -> bool
pub unsafe fn imageRestrictedToStandardDynamicRange(&self) -> Retained<UIImage>
source§impl UIImage
impl UIImage
PreconfiguredSystemImages
pub unsafe fn actionsImage() -> Retained<UIImage>
pub unsafe fn addImage() -> Retained<UIImage>
pub unsafe fn removeImage() -> Retained<UIImage>
pub unsafe fn checkmarkImage() -> Retained<UIImage>
pub unsafe fn strokedCheckmarkImage() -> Retained<UIImage>
impl UIImage
This impl block contains no items.
NSItemProvider
source§impl UIImage
impl UIImage
UIImageDeprecated
pub unsafe fn stretchableImageWithLeftCapWidth_topCapHeight( &self, left_cap_width: NSInteger, top_cap_height: NSInteger ) -> Retained<UIImage>
pub unsafe fn leftCapWidth(&self) -> NSInteger
pub unsafe fn topCapHeight(&self) -> NSInteger
Methods from Deref<Target = NSObject>§
sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
sourcepub fn class(&self) -> &'static AnyClass
Available on crate feature UIIndirectScribbleInteraction
only.
pub fn class(&self) -> &'static AnyClass
UIIndirectScribbleInteraction
only.Dynamically find the class of this object.
§Example
Check that an instance of NSObject
has the precise class NSObject
.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());
sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load
instead.Available on crate feature UIIndirectScribbleInteraction
only.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load
instead.UIIndirectScribbleInteraction
only.Use Ivar::load
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load_mut
instead.Available on crate feature UIIndirectScribbleInteraction
only.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut
instead.UIIndirectScribbleInteraction
only.Use Ivar::load_mut
instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T
.
See Ivar::load_ptr
for details surrounding this.
Trait Implementations§
source§impl BorrowMut<AnyObject> for UIImage
impl BorrowMut<AnyObject> for UIImage
source§fn borrow_mut(&mut self) -> &mut AnyObject
fn borrow_mut(&mut self) -> &mut AnyObject
Mutably borrows from an owned value. Read more
source§impl BorrowMut<NSObject> for UIImage
impl BorrowMut<NSObject> for UIImage
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
source§impl ClassType for UIImage
impl ClassType for UIImage
§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
source§const NAME: &'static str = "UIImage"
const NAME: &'static str = "UIImage"
The name of the Objective-C class that this type represents. Read more
source§fn class() -> &'static AnyClass
fn class() -> &'static AnyClass
Get a reference to the Objective-C class that this type represents. Read more
source§fn as_super_mut(&mut self) -> &mut Self::Super
fn as_super_mut(&mut self) -> &mut Self::Super
Get a mutable reference to the superclass.
source§impl NSItemProviderReading for UIImage
impl NSItemProviderReading for UIImage
source§impl NSItemProviderWriting for UIImage
impl NSItemProviderWriting for UIImage
source§unsafe fn writableTypeIdentifiersForItemProvider_class(
) -> Retained<NSArray<NSString>>
unsafe fn writableTypeIdentifiersForItemProvider_class( ) -> Retained<NSArray<NSString>>
Available on crate features
NSArray
and NSString
only.source§unsafe fn writableTypeIdentifiersForItemProvider(
&self
) -> Retained<NSArray<NSString>>
unsafe fn writableTypeIdentifiersForItemProvider( &self ) -> Retained<NSArray<NSString>>
Available on crate features
NSArray
and NSString
only.source§unsafe fn itemProviderVisibilityForRepresentationWithTypeIdentifier_class(
type_identifier: &NSString
) -> NSItemProviderRepresentationVisibility
unsafe fn itemProviderVisibilityForRepresentationWithTypeIdentifier_class( type_identifier: &NSString ) -> NSItemProviderRepresentationVisibility
Available on crate feature
NSString
only.source§unsafe fn itemProviderVisibilityForRepresentationWithTypeIdentifier(
&self,
type_identifier: &NSString
) -> NSItemProviderRepresentationVisibility
unsafe fn itemProviderVisibilityForRepresentationWithTypeIdentifier( &self, type_identifier: &NSString ) -> NSItemProviderRepresentationVisibility
Available on crate feature
NSString
only.source§impl NSObjectProtocol for UIImage
impl NSObjectProtocol for UIImage
source§fn isEqual(&self, other: &AnyObject) -> bool
fn isEqual(&self, other: &AnyObject) -> bool
Check whether the object is equal to an arbitrary other object. Read more
source§fn hash(&self) -> usize
fn hash(&self) -> usize
An integer that can be used as a table address in a hash table
structure. Read more
source§fn isKindOfClass(&self, cls: &AnyClass) -> bool
fn isKindOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of the class, or one of its
subclasses. Read more
source§fn is_kind_of<T>(&self) -> bool
fn is_kind_of<T>(&self) -> bool
Check if the object is an instance of the class type, or one of its
subclasses. Read more
source§fn isMemberOfClass(&self, cls: &AnyClass) -> bool
fn isMemberOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of a specific class, without
checking subclasses. Read more
source§fn respondsToSelector(&self, aSelector: Sel) -> bool
fn respondsToSelector(&self, aSelector: Sel) -> bool
Check whether the object implements or inherits a method with the
given selector. Read more
source§fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
Check whether the object conforms to a given protocol. Read more
source§fn debugDescription(&self) -> Retained<NSObject>
fn debugDescription(&self) -> Retained<NSObject>
A textual representation of the object to use when debugging. Read more
source§impl NSSecureCoding for UIImage
impl NSSecureCoding for UIImage
source§impl PartialEq for UIImage
impl PartialEq for UIImage
source§impl RefEncode for UIImage
impl RefEncode for UIImage
source§const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
source§impl UIAccessibilityIdentification for UIImage
Available on crate feature UIAccessibilityIdentification
only.
impl UIAccessibilityIdentification for UIImage
Available on crate feature
UIAccessibilityIdentification
only.impl Eq for UIImage
impl Message for UIImage
impl Send for UIImage
impl StructuralPartialEq for UIImage
impl Sync for UIImage
Auto Trait Implementations§
impl !Freeze for UIImage
impl !RefUnwindSafe for UIImage
impl !Unpin for UIImage
impl !UnwindSafe for UIImage
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CounterpartOrSelf for T
impl<T> CounterpartOrSelf for T
§type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
type Immutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Immutable
The immutable counterpart of the type, or
Self
if the type has no
immutable counterpart. Read more§type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
type Mutable = <<T as ClassType>::Mutability as MutabilityCounterpartOrSelf<T>>::Mutable
The mutable counterpart of the type, or
Self
if the type has no
mutable counterpart. Read more