Class CPBarButton

All Implemented Interfaces:
NSCoding, NSObjectProtocol, NSSecureCoding, ObjCProtocol
Direct Known Subclasses:
CPMessageComposeBarButton

public class CPBarButton
extends NSObject
implements NSSecureCoding
Since:
Available in iOS 12.0 and later.
  • Constructor Details

    • CPBarButton

      protected CPBarButton()
    • CPBarButton

      protected CPBarButton​(NSObject.Handle h, long handle)
    • CPBarButton

      protected CPBarButton​(NSObject.SkipInit skipInit)
    • CPBarButton

      public CPBarButton​(UIImage image, VoidBlock1<CPBarButton> handler)
      Since:
      Available in iOS 14.0 and later.
    • CPBarButton

      public CPBarButton​(String title, VoidBlock1<CPBarButton> handler)
      Since:
      Available in iOS 14.0 and later.
    • CPBarButton

      @Deprecated public CPBarButton​(CPBarButtonType type, VoidBlock1<CPBarButton> handler)
      Deprecated.
      Deprecated in iOS 14.0. Use -[CPBarButton initWithImage:handler:] or -[CPBarButton buttonWithTitle:handler:]
      Since:
      Available in iOS 12.0 and later.
    • CPBarButton

      public CPBarButton​(NSCoder coder)
  • Method Details

    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public void setEnabled​(boolean v)
    • getButtonStyle

      public CPBarButtonStyle getButtonStyle()
      Since:
      Available in iOS 14.0 and later.
    • setButtonStyle

      public void setButtonStyle​(CPBarButtonStyle v)
      Since:
      Available in iOS 14.0 and later.
    • getImage

      public UIImage getImage()
    • setImage

      public void setImage​(UIImage v)
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle​(String v)
    • getButtonType

      @Deprecated public CPBarButtonType getButtonType()
      Deprecated.
      Deprecated in iOS 14.0. Use -[CPBarButton initWithImage:handler:] or -[CPBarButton initWithTitle:handler:]
      Since:
      Available in iOS 12.0 and later.
    • supportsSecureCoding

      public static boolean supportsSecureCoding()
    • init

      protected long init​(UIImage image, VoidBlock1<CPBarButton> handler)
      Since:
      Available in iOS 14.0 and later.
    • init

      protected long init​(String title, VoidBlock1<CPBarButton> handler)
      Since:
      Available in iOS 14.0 and later.
    • init

      @Deprecated protected long init​(CPBarButtonType type, VoidBlock1<CPBarButton> handler)
      Deprecated.
      Deprecated in iOS 14.0. Use -[CPBarButton initWithImage:handler:] or -[CPBarButton buttonWithTitle:handler:]
      Since:
      Available in iOS 12.0 and later.
    • encode

      public void encode​(NSCoder coder)
      Specified by:
      encode in interface NSCoding
    • init

      protected long init​(NSCoder coder)