SinaWeiboAuthorizeView.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // SinaWeiboAuthorizeView.h
  3. // sinaweibo_ios_sdk
  4. //
  5. // Created by Wade Cheng on 4/19/12.
  6. // Copyright (c) 2012 SINA. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. @protocol SinaWeiboAuthorizeViewDelegate;
  11. @interface SinaWeiboAuthorizeView : UIView <UIWebViewDelegate>
  12. {
  13. UIWebView *webView;
  14. UIButton *closeButton;
  15. UIView *modalBackgroundView;
  16. UIActivityIndicatorView *indicatorView;
  17. UIInterfaceOrientation previousOrientation;
  18. id<SinaWeiboAuthorizeViewDelegate> delegate;
  19. NSString *appRedirectURI;
  20. NSDictionary *authParams;
  21. }
  22. @property (nonatomic, assign) id<SinaWeiboAuthorizeViewDelegate> delegate;
  23. - (id)initWithAuthParams:(NSDictionary *)params
  24. delegate:(id<SinaWeiboAuthorizeViewDelegate>)delegate;
  25. - (void)show;
  26. - (void)hide;
  27. @end
  28. @protocol SinaWeiboAuthorizeViewDelegate <NSObject>
  29. - (void)authorizeView:(SinaWeiboAuthorizeView *)authView
  30. didRecieveAuthorizationCode:(NSString *)code;
  31. - (void)authorizeView:(SinaWeiboAuthorizeView *)authView
  32. didFailWithErrorInfo:(NSDictionary *)errorInfo;
  33. - (void)authorizeViewDidCancel:(SinaWeiboAuthorizeView *)authView;
  34. @end