説明なし

WBSDKRelationshipButton.h 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // WBSDKRelationshipButton.h
  3. // WeiboSDK
  4. //
  5. // Created by DannionQiu on 14/10/26.
  6. // Copyright (c) 2014年 SINA iOS Team. All rights reserved.
  7. //
  8. #import "WBSDKBasicButton.h"
  9. enum
  10. {
  11. WBSDKRelationshipButtonStateFollow,
  12. WBSDKRelationshipButtonStateUnfollow
  13. };
  14. typedef NSUInteger WBSDKRelationshipButtonState;
  15. @interface WBSDKRelationshipButton : WBSDKBasicButton
  16. /**
  17. 初始化一个关注组件按钮
  18. @param frame 按钮的frame值
  19. @param accessToken 用户授权后获取的Token
  20. @param currentUserID 当前用户的uid值
  21. @param followerUserID 希望当前用户加关注的用户uid值
  22. @param handler 回调函数,当用户点击按钮,进行完关注组件相关的交互之后,回调的函数。
  23. */
  24. - (id)initWithFrame:(CGRect)frame
  25. accessToken:(NSString*)accessToken
  26. currentUser:(NSString*)currentUserID
  27. followUser:(NSString*)followerUserID
  28. completionHandler:(WBSDKButtonHandler)handler;
  29. @property (nonatomic, strong)NSString* accessToken;
  30. @property (nonatomic, strong)NSString* currentUserID;
  31. @property (nonatomic, strong)NSString* followUserID;
  32. @property (nonatomic, assign)WBSDKRelationshipButtonState currentRelationShip;
  33. /**
  34. 获取最新的关注状态
  35. 该方法会调用OpenApi,获取当前用户与目标用户之间的关注状态,并将按钮的状态改变为正确的状态。
  36. */
  37. - (void)checkCurrentRelationship;
  38. @end