XYCountryCodeViewController.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // XYCountryCodeViewController.h
  3. // XYCountryCode
  4. //
  5. // Created by 杨卢银 on 2018/8/16.
  6. // Copyright © 2018年 杨卢银. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class XYCountryCodeViewController;
  10. @protocol XYCountryCodeViewControllerDelegate <UIBarPositioningDelegate>
  11. @optional
  12. -(void)countryCodeViewController:(XYCountryCodeViewController*)vc chooseCode:(NSString*)code;
  13. @end
  14. typedef enum XYCountryCodeShowType {
  15. XYCountryCodeShowTypeNone = 0, /*! 列表模式 */
  16. XYCountryCodeShowTypePicker = 1 /*! picker模式 */
  17. } XYCountryCodeShowType;
  18. @interface XYCountryCodeViewController : UIViewController
  19. -(instancetype)initWithShowType:(XYCountryCodeShowType)aType;
  20. /**
  21. 显示类型
  22. */
  23. @property (assign ,nonatomic)XYCountryCodeShowType type;
  24. /**
  25. 图片圆角 默认5
  26. */
  27. @property (assign ,nonatomic)CGFloat cornerRadius;
  28. /**
  29. 按钮颜色
  30. */
  31. @property (strong ,nonatomic)UIColor *tintColor;
  32. /**
  33. 搜索匹配文字高亮颜色
  34. */
  35. @property (strong ,nonatomic)UIColor *textHighlightColor;
  36. -(void)showViewController:(UIViewController *)vc;
  37. @property (weak , nonatomic) id<XYCountryCodeViewControllerDelegate>delegate;
  38. @property (strong , nonatomic) void (^chooseCodeRespose)(NSString*code);
  39. @end