Guest User

Untitled

a guest
Jun 17th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. @interface MyScrollView : UIView {
  2. @private
  3. id <MyScrollViewDelegate> _delegate;
  4. id <MyScrollViewDataSource> _dataSource;
  5.  
  6. UIScrollView *_scrollView;
  7. NSMutableArray *_contentViews; // you need to create/maintain/reuse contentView from here
  8. }
  9.  
  10. @property (nonatomic, assign) id <MyScrollViewDelegate> delegate;
  11. @property (nonatomic, assign) id <MyScrollViewDataSource> dataSource;
  12. @end
  13.  
  14. @protocol MyScrollViewDataSource <NSObject>
  15. @optional
  16. - (NSString *)myScrollView:(MyScrollView *)myScrollView requestTitleForContentViewAtIndex:(NSInteger)index;
  17. - (UIImage *)myScrollView:(MyScrollView *)myScrollView requestLogoForContentViewAtIndex:(NSInteger)index;
  18. @end
  19.  
  20. ...
Add Comment
Please, Sign In to add comment