FIRIAMRenderingEffectSetting.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright 2017 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. #import <UIKit/UIKit.h>
  18. NS_ASSUME_NONNULL_BEGIN
  19. typedef NS_ENUM(NSInteger, FIRIAMRenderingMode) {
  20. FIRIAMRenderAsBannerView,
  21. FIRIAMRenderAsModalView,
  22. FIRIAMRenderAsImageOnlyView,
  23. FIRIAMRenderAsCardView
  24. };
  25. /**
  26. * A class for modeling rendering effect settings for in-app messaging
  27. */
  28. @interface FIRIAMRenderingEffectSetting : NSObject
  29. @property(nonatomic) FIRIAMRenderingMode viewMode;
  30. // background color for the display area, including both the text's background and
  31. // padding's background
  32. @property(nonatomic, copy) UIColor *displayBGColor;
  33. // text color, covering both the title and body texts
  34. @property(nonatomic, copy) UIColor *textColor;
  35. // text color for action button
  36. @property(nonatomic, copy) UIColor *btnTextColor;
  37. // text color for secondary action button
  38. @property(nonatomic, copy) UIColor *secondaryActionBtnTextColor;
  39. // background color for action button
  40. @property(nonatomic, copy) UIColor *btnBGColor;
  41. // duration of the banner view before triggering auto-dismiss
  42. @property(nonatomic) CGFloat autoDismissBannerAfterNSeconds;
  43. // A flag to control rendering the message as a client-side testing message
  44. @property(nonatomic) BOOL isTestMessage;
  45. + (instancetype)getDefaultRenderingEffectSetting;
  46. @end
  47. NS_ASSUME_NONNULL_END