EAIntroPage.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // EAIntroPage.h
  3. //
  4. // Copyright (c) 2013-2015 Evgeny Aleksandrov. License: MIT.
  5. #import <Foundation/Foundation.h>
  6. #import <UIKit/UIKit.h>
  7. typedef void (^VoidBlock)();
  8. @interface EAIntroPage : NSObject
  9. // background image or color used for cross-dissolve
  10. @property (nonatomic, strong) UIImage *bgImage;
  11. @property (nonatomic, strong) UIColor *bgColor;
  12. // show or hide EAIntroView titleView on this page (default YES)
  13. @property (nonatomic, assign) BOOL showTitleView;
  14. // properties for default EAIntroPage layout
  15. //
  16. // title image Y position - from top of the screen
  17. // title and description labels Y position - from bottom of the screen
  18. // all items from subviews array will be added on page
  19. /**
  20. * The title view that is presented above the title label.
  21. * The view can be a normal UIImageView or any other kind of
  22. * UIView. This allows you to attach animated views as well.
  23. */
  24. @property (nonatomic, strong) UIView * titleIconView;
  25. @property (nonatomic, assign) CGFloat titleIconPositionY;
  26. @property (nonatomic, strong) NSString *title;
  27. @property (nonatomic, strong) UIFont *titleFont;
  28. @property (nonatomic, strong) UIColor *titleColor;
  29. @property (nonatomic, assign) CGFloat titlePositionY;
  30. @property (nonatomic, assign) NSTextAlignment titleAlignment;
  31. @property (nonatomic, strong) NSString *desc;
  32. @property (nonatomic, strong) UIFont *descFont;
  33. @property (nonatomic, strong) UIColor *descColor;
  34. @property (nonatomic, assign) CGFloat descPositionY;
  35. @property (nonatomic, assign) CGFloat descSideMargin;
  36. @property (nonatomic, assign) NSTextAlignment descAlignment;
  37. @property (nonatomic, strong) NSArray<__kindof UIView *> *subviews;
  38. @property (nonatomic, assign) CGFloat alpha;
  39. @property (nonatomic,copy) VoidBlock onPageDidLoad;
  40. @property (nonatomic,copy) VoidBlock onPageDidAppear;
  41. @property (nonatomic,copy) VoidBlock onPageDidDisappear;
  42. // if customView is set - all other default properties are ignored
  43. @property (nonatomic, strong) UIView *customView;
  44. @property(nonatomic, strong, readonly) UIView *pageView;
  45. + (instancetype)page;
  46. + (instancetype)pageWithCustomView:(UIView *)customV;
  47. + (instancetype)pageWithCustomViewFromNibNamed:(NSString *)nibName;
  48. + (instancetype)pageWithCustomViewFromNibNamed:(NSString *)nibName bundle:(NSBundle*)aBundle;
  49. @end