我RTSPagedView
在我的项目中使用 github。这给了我这个警告
Property type 'id<RTSPagedViewDelegate>' is incompatible with type 'id<UIScrollViewDelegate>' unherited from 'UIScrollView'
在
@property (nonatomic, assign) IBOutlet id <RTSPagedViewDelegate> delegate;
在RTSPagedView.h
应用程序在此警告下工作正常。任何人以前遇到过这个或知道解决方案请帮忙。
链接为RTSPagedView
// RTSPagedView.h
// PagedView
// http://github.com/rplasman/RTSPagedView
#import <UIKit/UIKit.h>
@protocol RTSPagedViewDelegate;
@interface RTSPagedView : UIScrollView
@property (nonatomic, assign) IBOutlet id <RTSPagedViewDelegate> delegate;
@property (nonatomic, assign) NSUInteger currentPage;
@property (nonatomic, readonly) NSUInteger numberOfPages;
@property (nonatomic, assign) BOOL continuous;
- (void)resizeBounds:(CGRect)bounds;
- (UIView *)dequeueReusableViewWithTag:(NSInteger)tag;
- (UIView *)viewForPageAtIndex:(NSUInteger)index;
- (void)scrollToPageAtIndex:(NSUInteger)index animated:(BOOL)animated;
- (void)reloadData;
- (NSUInteger)indexForView:(UIView *)view;
@end
@protocol RTSPagedViewDelegate <UIScrollViewDelegate>
- (NSUInteger)numberOfPagesInPagedView:(RTSPagedView *)pagedView;
- (UIView *)pagedView:(RTSPagedView *)pagedView viewForPageAtIndex:(NSUInteger)index;
@optional
- (void)pagedView:(RTSPagedView *)pagedView didScrollToPageAtIndex:(NSUInteger)index;
- (void)pagedView:(RTSPagedView *)pagedView didRecycleView:(UIView *)view;
@end