FBSDKButton.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * Copyright (c) Meta Platforms, Inc. and affiliates.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the license found in the
  6. * LICENSE file in the root directory of this source tree.
  7. */
  8. #import <UIKit/UIKit.h>
  9. #import <FBSDKCoreKit/FBSDKAppEventName.h>
  10. #import <FBSDKCoreKit/FBSDKAppEventParameterName.h>
  11. #import <FBSDKCoreKit/FBSDKImpressionLoggingButton.h>
  12. @class FBSDKIcon;
  13. @protocol FBSDKEventLogging;
  14. NS_ASSUME_NONNULL_BEGIN
  15. /// A base class for common SDK buttons.
  16. NS_SWIFT_NAME(FBButton)
  17. @interface FBSDKButton : FBSDKImpressionLoggingButton
  18. @property (nonatomic, readonly, getter = isImplicitlyDisabled) BOOL implicitlyDisabled;
  19. - (void)checkImplicitlyDisabled;
  20. - (void)configureWithIcon:(nullable FBSDKIcon *)icon
  21. title:(nullable NSString *)title
  22. backgroundColor:(nullable UIColor *)backgroundColor
  23. highlightedColor:(nullable UIColor *)highlightedColor;
  24. /**
  25. Internal method exposed to facilitate transition to Swift.
  26. API Subject to change or removal without warning. Do not use.
  27. @warning INTERNAL - DO NOT USE
  28. */
  29. - (void) configureWithIcon:(nullable FBSDKIcon *)icon
  30. title:(nullable NSString *)title
  31. backgroundColor:(nullable UIColor *)backgroundColor
  32. highlightedColor:(nullable UIColor *)highlightedColor
  33. selectedTitle:(nullable NSString *)selectedTitle
  34. selectedIcon:(nullable FBSDKIcon *)selectedIcon
  35. selectedColor:(nullable UIColor *)selectedColor
  36. selectedHighlightedColor:(nullable UIColor *)selectedHighlightedColor;
  37. /**
  38. Internal method exposed to facilitate transition to Swift.
  39. API Subject to change or removal without warning. Do not use.
  40. @warning INTERNAL - DO NOT USE
  41. */
  42. - (UIColor *)defaultBackgroundColor;
  43. /**
  44. Internal method exposed to facilitate transition to Swift.
  45. API Subject to change or removal without warning. Do not use.
  46. @warning INTERNAL - DO NOT USE
  47. */
  48. - (CGSize)sizeThatFits:(CGSize)size title:(NSString *)title;
  49. /**
  50. Internal method exposed to facilitate transition to Swift.
  51. API Subject to change or removal without warning. Do not use.
  52. @warning INTERNAL - DO NOT USE
  53. */
  54. - (CGSize)textSizeForText:(NSString *)text font:(UIFont *)font constrainedSize:(CGSize)constrainedSize lineBreakMode:(NSLineBreakMode)lineBreakMode;
  55. /**
  56. Internal method exposed to facilitate transition to Swift.
  57. API Subject to change or removal without warning. Do not use.
  58. @warning INTERNAL - DO NOT USE
  59. */
  60. - (void)logTapEventWithEventName:(FBSDKAppEventName)eventName
  61. parameters:(nullable NSDictionary<FBSDKAppEventParameterName, id> *)parameters;
  62. /**
  63. Internal method exposed to facilitate transition to Swift.
  64. API Subject to change or removal without warning. Do not use.
  65. @warning INTERNAL - DO NOT USE
  66. */
  67. + (void)configureWithApplicationActivationNotifier:(id)applicationActivationNotifier
  68. eventLogger:(id<FBSDKEventLogging>)eventLogger
  69. accessTokenProvider:(Class<FBSDKAccessTokenProviding>)accessTokenProvider
  70. NS_SWIFT_NAME(configure(applicationActivationNotifier:eventLogger:accessTokenProvider:));
  71. @end
  72. NS_ASSUME_NONNULL_END