LookinAttributesGroup.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifdef SHOULD_COMPILE_LOOKIN_SERVER
  2. //
  3. // LookinAttributesGroup.h
  4. // Lookin
  5. //
  6. // Created by Li Kai on 2018/11/19.
  7. // https://lookin.work
  8. //
  9. #import <Foundation/Foundation.h>
  10. #import "LookinAttrIdentifiers.h"
  11. @class LookinAttributesSection;
  12. /**
  13. In Lookin, a LookinAttributesGroup instance will be rendered as a property card.
  14. When isUserCustom is false: two LookinAttributesGroup instances will be regard as equal when they has the same LookinAttrGroupIdentifier.
  15. When isUserCustom is true: two LookinAttributesGroup instances will be regard as equal when they has the same title.
  16. 当 isUserCustom 为 false 时:若两个 attrGroup 有相同的 LookinAttrGroupIdentifier,则 isEqual: 返回 YES
  17. */
  18. @interface LookinAttributesGroup : NSObject <NSSecureCoding, NSCopying>
  19. /// 只有在 identifier 为 custom 时,才存在该值
  20. @property(nonatomic, copy) NSString *userCustomTitle;
  21. @property(nonatomic, copy) LookinAttrGroupIdentifier identifier;
  22. @property(nonatomic, copy) NSArray<LookinAttributesSection *> *attrSections;
  23. /// 如果是 custom 则返回 userCustomTitle,如果不是 custom 则返回 identifier
  24. - (NSString *)uniqueKey;
  25. - (BOOL)isUserCustom;
  26. @end
  27. #endif /* SHOULD_COMPILE_LOOKIN_SERVER */