Package apple.uikit

Class UIShape

  • All Implemented Interfaces:
    NSCopying, NSObject, UIShapeProvider

    public class UIShape
    extends NSObject
    implements UIShapeProvider, NSCopying
    An abstract representation of a shape. A `UIShape` can represent a simple shape such as a rectangle or circle that are later "resolved" into a concrete shape based on context like a size and position for the shape. A `UIShape` can also represent more complex shapes like paths and even "dynamic" shapes that are resolved using a custom closure. You typically use a `UIShape` with APIs like `UIHoverStyle` to represent the shape of an effect. API-Since: 17.0
    • Constructor Detail

      • UIShape

        protected UIShape​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static UIShape alloc()
      • allocWithZone

        public static UIShape allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • capsuleShape

        @NotNull
        public static @NotNull UIShape capsuleShape()
        A capsule shape, equivalent to a rounded rectangle where the corner radius is chosen as half the length of the rectangle’s smallest edge.
      • circleShape

        @NotNull
        public static @NotNull UIShape circleShape()
        A circular shape, with a radius equals half the length of the frame rectangle’s smallest edge.
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • copyWithZone

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • fixedRectShapeWithRect

        @NotNull
        public static @NotNull UIShape fixedRectShapeWithRect​(CGRect rect)
        A fixed rectangle shape using `rect` as its shape, regardless of the frame in which it is contained.
      • fixedRectShapeWithRectCornerRadius

        @NotNull
        public static @NotNull UIShape fixedRectShapeWithRectCornerRadius​(CGRect rect,
                                                                          double cornerRadius)
        A fixed rectangle shape using `rect` as its shape, regardless of the frame in which it is contained, with rounded corners using `cornerRadius`.
      • fixedRectShapeWithRectCornerRadiusCornerCurveMaskedCorners

        @NotNull
        public static @NotNull UIShape fixedRectShapeWithRectCornerRadiusCornerCurveMaskedCorners​(CGRect rect,
                                                                                                  double cornerRadius,
                                                                                                  long cornerCurve,
                                                                                                  long maskedCorners)
        A fixed rectangle shape using `rect` as its shape, regardless of the frame in which it is contained, with rounded corners using `cornerRadius`.
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • new_objc

        public static UIShape new_objc()
      • rectShape

        @NotNull
        public static @NotNull UIShape rectShape()
        A rectangular shape.
      • rectShapeWithCornerRadius

        @NotNull
        public static @NotNull UIShape rectShapeWithCornerRadius​(double cornerRadius)
        A rectangular shape with rounded corners, aligned inside the frame of in which it is contained.
      • rectShapeWithCornerRadiusCornerCurve

        @NotNull
        public static @NotNull UIShape rectShapeWithCornerRadiusCornerCurve​(double cornerRadius,
                                                                            long cornerCurve)
        A rectangular shape with rounded corners, aligned inside the frame of in which it is contained.
      • rectShapeWithCornerRadiusCornerCurveMaskedCorners

        @NotNull
        public static @NotNull UIShape rectShapeWithCornerRadiusCornerCurveMaskedCorners​(double cornerRadius,
                                                                                         long cornerCurve,
                                                                                         long maskedCorners)
        A rectangular shape with rounded corners, aligned inside the frame of in which it is contained.
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • shapeByApplyingInset

        @NotNull
        public @NotNull UIShape shapeByApplyingInset​(double inset)
        Insets this shape by the provided `inset`, returning a new modified shape. Negative values can be used to add inner padding to a shape. If this shape is not insettable (e.g., if it is a custom path), this has no effect. For some shapes like rounded rectangles, this can also modify the corner radii of the shape to ensure the resulting corners are concentric.
      • shapeByApplyingInsets

        @NotNull
        public @NotNull UIShape shapeByApplyingInsets​(UIEdgeInsets insets)
        Insets this shape by the provided `insets`, returning a new modified shape. Negative values can be used to add inner padding to a shape. If this shape is not insettable (e.g., if it is a custom path), this has no effect. For some shapes like rounded rectangles, this can also modify the corner radii of the shape to ensure the resulting corners are concentric.
      • shapeWithBezierPath

        public static UIShape shapeWithBezierPath​(@NotNull
                                                  @NotNull UIBezierPath path)
        A shape with a custom bezier path.
      • shapeWithProvider

        public static UIShape shapeWithProvider​(@NotNull
                                                @NotNull UIShapeProvider provider)
        Creates a dynamic shape that can be resolved using the provided `UIShapeProvider` based on context like its containing rect.
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.
      • version_static

        public static long version_static()