Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @interface MyScrollView : UIView {
- @private
- id <MyScrollViewDelegate> _delegate;
- id <MyScrollViewDataSource> _dataSource;
- UIScrollView *_scrollView;
- NSMutableArray *_contentViews; // you need to create/maintain/reuse contentView from here
- }
- @property (nonatomic, assign) id <MyScrollViewDelegate> delegate;
- @property (nonatomic, assign) id <MyScrollViewDataSource> dataSource;
- @end
- @protocol MyScrollViewDataSource <NSObject>
- @optional
- - (NSString *)myScrollView:(MyScrollView *)myScrollView requestTitleForContentViewAtIndex:(NSInteger)index;
- - (UIImage *)myScrollView:(MyScrollView *)myScrollView requestLogoForContentViewAtIndex:(NSInteger)index;
- @end
- ...
Add Comment
Please, Sign In to add comment