Protocols
The following protocols are available globally.
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWAlertControllerDelegate <NSObject> @optional; - (void)willPresentAlertController:(FWAlertController *)alertController; // 将要present - (void)didPresentAlertController:(FWAlertController *)alertController; // 已经present - (void)willDismissAlertController:(FWAlertController *)alertController; // 将要dismiss - (void)didDismissAlertController:(FWAlertController *)alertController; // 已经dismiss @end
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWAlertPlugin <NSObject> @optional /// 显示弹出框插件方法,默认使用系统UIAlertController - (void)viewController:(UIViewController *)viewController showAlertWithTitle:(nullable id)title message:(nullable id)message style:(FWAlertStyle)style cancel:(nullable id)cancel actions:(nullable NSArray *)actions promptCount:(NSInteger)promptCount promptBlock:(nullable void (^)(UITextField *textField, NSInteger index))promptBlock actionBlock:(nullable void (^)(NSArray<NSString *> *values, NSInteger index))actionBlock cancelBlock:(nullable void (^)(void))cancelBlock customBlock:(nullable void (^)(id alertController))customBlock; /// 显示操作表插件方法,默认使用系统UIAlertController - (void)viewController:(UIViewController *)viewController showSheetWithTitle:(nullable id)title message:(nullable id)message cancel:(nullable id)cancel actions:(nullable NSArray *)actions currentIndex:(NSInteger)currentIndex actionBlock:(nullable void (^)(NSInteger index))actionBlock cancelBlock:(nullable void (^)(void))cancelBlock customBlock:(nullable void (^)(id alertController))customBlock; /// 手工隐藏弹出框插件方法,默认查找UIAlertController|FWAlertController - (void)viewController:(UIViewController *)viewController hideAlert:(BOOL)animated completion:(nullable void (^)(void))completion; /// 判断是否正在显示弹出框插件方法,默认查找UIAlertController|FWAlertController - (BOOL)isShowingAlert:(UIViewController *)viewController; @end
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWAttributedLabelDelegate <NSObject> - (void)attributedLabel:(FWAttributedLabel *)label clickedOnLink:(id)linkData; @end
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWAttributedLabelCustomURLDetector <NSObject> - (void)detectLinks:(nullable NSString *)plainText completion:(FWAttributedLinkDetectCompletion)completion; @end
-
FWAudioPlayerDelegate, all delegate method is optional
See moreDeclaration
Objective-C
@protocol FWAudioPlayerDelegate <NSObject>
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWAudioPlayerDataSource <NSObject> @optional /// Asks the data source to return the number of items that FWAudioPlayer would play - (NSInteger)audioPlayerNumberOfItems; /// Source URL provider, support NSURL|AVURLAsset|AVPlayerItem - (nullable id)audioPlayerURLForItemAtIndex:(NSInteger)index preBuffer:(BOOL)preBuffer; /// Source URL provider, would excute until you call setupPlayerItemWithURL:index: - (void)audioPlayerLoadItemAtIndex:(NSInteger)index preBuffer:(BOOL)preBuffer; @end
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWBannerViewDelegate <NSObject> @optional - (void)bannerView:(FWBannerView *)bannerView didSelectItemAtIndex:(NSInteger)index; /** 监听bannerView滚动,快速滚动时也会回调 */ - (void)bannerView:(FWBannerView *)bannerView didScrollToIndex:(NSInteger)index; /** 如果你需要自定义UICollectionViewCell样式,请实现此代理方法,默认的FWBannerViewCell也会调用。 */ - (void)bannerView:(FWBannerView *)bannerView customCell:(UICollectionViewCell *)cell forIndex:(NSInteger)index; /** 如果你需要自定义UICollectionViewCell样式,请实现此代理方法返回你的自定义UICollectionViewCell的class。 */ - (nullable Class)customCellClassForBannerView:(FWBannerView *)view; /** 如果你需要自定义UICollectionViewCell样式,请实现此代理方法返回你的自定义UICollectionViewCell的Nib。 */ - (nullable UINib *)customCellNibForBannerView:(FWBannerView *)view; @end
-
Undocumented
Declaration
Objective-C
@protocol FWBarrageCellDelegate <NSObject, CAAnimationDelegate> @end
-
The FWRequestDelegate protocol defines several optional methods you can use to receive network-related messages. All the delegate methods will be called on the main queue.
See moreDeclaration
Objective-C
@protocol FWRequestDelegate <NSObject>
-
The FWRequestAccessory protocol defines several optional methods that can be used to track the status of a request. Objects that conforms this protocol (“accessories”) can perform additional configurations accordingly. All the accessory methods will be called on the main queue.
See moreDeclaration
Objective-C
@protocol FWRequestAccessory <NSObject>
-
The FWBatchRequestDelegate protocol defines several optional methods you can use to receive network-related messages. All the delegate methods will be called on the main queue. Note the delegate methods will be called when all the requests of batch request finishes.
See moreDeclaration
Objective-C
@protocol FWBatchRequestDelegate <NSObject>
-
缓存调用协议
See moreDeclaration
Objective-C
@protocol FWCacheProtocol <NSObject>
-
缓存引擎内部协议
See moreDeclaration
Objective-C
@protocol FWCacheEngineProtocol <NSObject>
-
The FWChainRequestDelegate protocol defines several optional methods you can use to receive network-related messages. All the delegate methods will be called on the main queue. Note the delegate methods will be called when all the requests of chain request finishes.
See moreDeclaration
Objective-C
@protocol FWChainRequestDelegate <NSObject>
-
集合视图控制器协议,可覆写
See moreDeclaration
Objective-C
@protocol FWCollectionViewController < FWViewController, UICollectionViewDataSource, UICollectionViewDelegate>
-
通用布局section配置协议
See moreDeclaration
Objective-C
@protocol FWCollectionViewDelegateFlowLayout <UICollectionViewDelegateFlowLayout>
-
The FWCollectionViewDelegateWaterfallLayout protocol defines methods that let you coordinate with a FWCollectionViewWaterfallLayout object to implement a waterfall-based layout. The methods of this protocol define the size of items.
The waterfall layout object expects the collection view’s delegate object to adopt this protocol. Therefore, implement this protocol on object assigned to your collection view’s delegate property.
See moreDeclaration
Objective-C
@protocol FWCollectionViewDelegateWaterfallLayout <UICollectionViewDelegate>
-
扩展 UICollectionViewDelegateFlowLayout/NSCollectionViewDelegateFlowLayout 协议, 添加设置水平、竖直方向的对齐方式以及 items 排布方向协议方法
See moreDeclaration
Objective-C
@protocol FWCollectionViewDelegateAlignLayout <FWCollectionViewDelegateFlowLayout>
-
配置模板协议,配置模板类需实现
See moreDeclaration
Objective-C
@protocol FWConfigurationTemplateProtocol <NSObject>
-
数据库模型协议信息
See moreDeclaration
Objective-C
@protocol FWDatabaseModel <NSObject>
-
空界面插件协议,应用可自定义空界面插件实现
See moreDeclaration
Objective-C
@protocol FWEmptyPlugin <NSObject>
-
空界面代理协议
See moreDeclaration
Objective-C
@protocol FWEmptyViewDelegate <NSObject>
-
裁剪控制器事件代理协议
See moreDeclaration
Objective-C
@protocol FWImageCropControllerDelegate <NSObject>
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWImageCropViewDelegate<NSObject> - (void)cropViewDidBecomeResettable:(nonnull FWImageCropView *)cropView; - (void)cropViewDidBecomeNonResettable:(nonnull FWImageCropView *)cropView; @end
-
相册列表事件代理
See moreDeclaration
Objective-C
@protocol FWImageAlbumControllerDelegate <NSObject>
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWImagePickerPreviewControllerDelegate <NSObject> @optional /// 完成选中图片回调,未实现时自动转发给当前imagePickerController - (void)imagePickerPreviewController:(FWImagePickerPreviewController *)imagePickerPreviewController didFinishPickingImageWithImagesAssetArray:(NSArray<FWAsset *> *)imagesAssetArray; /// 即将选中图片 - (void)imagePickerPreviewController:(FWImagePickerPreviewController *)imagePickerPreviewController willCheckImageAtIndex:(NSInteger)index; /// 已经选中图片 - (void)imagePickerPreviewController:(FWImagePickerPreviewController *)imagePickerPreviewController didCheckImageAtIndex:(NSInteger)index; /// 即将取消选中图片 - (void)imagePickerPreviewController:(FWImagePickerPreviewController *)imagePickerPreviewController willUncheckImageAtIndex:(NSInteger)index; /// 已经取消选中图片 - (void)imagePickerPreviewController:(FWImagePickerPreviewController *)imagePickerPreviewController didUncheckImageAtIndex:(NSInteger)index; /// 选中数量变化时调用,仅多选有效 - (void)imagePickerPreviewController:(FWImagePickerPreviewController *)imagePickerPreviewController willChangeCheckedCount:(NSInteger)checkedCount; /// 即将需要显示 Loading 时调用 - (void)imagePickerPreviewControllerWillStartLoading:(FWImagePickerPreviewController *)imagePickerPreviewController; /// 即将需要隐藏 Loading 时调用 - (void)imagePickerPreviewControllerDidFinishLoading:(FWImagePickerPreviewController *)imagePickerPreviewController; /// 已经选中数量超过最大选择数量时被调用,默认弹窗提示 - (void)imagePickerPreviewControllerWillShowExceed:(FWImagePickerPreviewController *)imagePickerPreviewController; /// 图片预览界面关闭返回时被调用 - (void)imagePickerPreviewControllerDidCancel:(FWImagePickerPreviewController *)imagePickerPreviewController; /// 自定义编辑按钮点击事件,启用编辑时生效,未实现时使用图片裁剪控制器 - (void)imagePickerPreviewController:(FWImagePickerPreviewController *)imagePickerPreviewController willEditImageAtIndex:(NSInteger)index; /// 自定义图片裁剪控制器,启用编辑时生效,未实现时使用默认配置 - (FWImageCropController *)imageCropControllerForPreviewController:(FWImagePickerPreviewController *)previewController image:(UIImage *)image; /// 自定义编辑cell展示,cellForRow自动调用 - (void)imagePickerPreviewController:(FWImagePickerPreviewController *)imagePickerPreviewController customCell:(FWImagePickerPreviewCollectionCell *)cell atIndexPath:(NSIndexPath *)indexPath; @end
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWImagePickerControllerDelegate <NSObject> @optional /** * 创建一个 ImagePickerPreviewViewController 用于预览图片 */ - (FWImagePickerPreviewController *)imagePickerPreviewControllerForImagePickerController:(FWImagePickerController *)imagePickerController; /** * 控制照片的排序,若不实现,默认为 FWAlbumSortTypePositive * @note 注意返回值会决定第一次进来相片列表时列表默认的滚动位置,如果为 FWAlbumSortTypePositive,则列表默认滚动到底部,如果为 FWAlbumSortTypeReverse,则列表默认滚动到顶部。 */ - (FWAlbumSortType)albumSortTypeForImagePickerController:(FWImagePickerController *)imagePickerController; /** * 选择图片完毕后被调用(点击 sendButton 后被调用),如果previewController没有实现完成回调方法,也会走到这个方法 * * @param imagePickerController 对应的 FWImagePickerController * @param imagesAssetArray 包含被选择的图片的 FWAsset 对象的数组。 */ - (void)imagePickerController:(FWImagePickerController *)imagePickerController didFinishPickingImageWithImagesAssetArray:(NSArray<FWAsset *> *)imagesAssetArray; /** * 取消选择图片后被调用,如果albumController没有实现取消回调方法,也会走到这个方法 */ - (void)imagePickerControllerDidCancel:(FWImagePickerController *)imagePickerController; /** * cell 被点击时调用(先调用这个接口,然后才去走预览大图的逻辑),注意这并非指选中 checkbox 事件 * * @param imagePickerController 对应的 FWImagePickerController * @param imageAsset 被选中的图片的 FWAsset 对象 * @param imagePickerPreviewController 选中图片后进行图片预览的 viewController */ - (void)imagePickerController:(FWImagePickerController *)imagePickerController didSelectImageWithImagesAsset:(FWAsset *)imageAsset afterImagePickerPreviewControllerUpdate:(FWImagePickerPreviewController *)imagePickerPreviewController; /// 是否能够选中 checkbox - (BOOL)imagePickerController:(FWImagePickerController *)imagePickerController shouldCheckImageAtIndex:(NSInteger)index; /// 即将选中 checkbox 时调用 - (void)imagePickerController:(FWImagePickerController *)imagePickerController willCheckImageAtIndex:(NSInteger)index; /// 选中了 checkbox 之后调用 - (void)imagePickerController:(FWImagePickerController *)imagePickerController didCheckImageAtIndex:(NSInteger)index; /// 即将取消选中 checkbox 时调用 - (void)imagePickerController:(FWImagePickerController *)imagePickerController willUncheckImageAtIndex:(NSInteger)index; /// 取消了 checkbox 选中之后调用 - (void)imagePickerController:(FWImagePickerController *)imagePickerController didUncheckImageAtIndex:(NSInteger)index; /// 选中数量变化时调用,仅多选有效 - (void)imagePickerController:(FWImagePickerController *)imagePickerController willChangeCheckedCount:(NSInteger)checkedCount; /// 自定义图片九宫格cell展示,cellForRow自动调用 - (void)imagePickerController:(FWImagePickerController *)imagePickerController customCell:(FWImagePickerCollectionCell *)cell atIndexPath:(NSIndexPath *)indexPath; /// 标题视图被点击时调用,返回弹出的相册列表控制器 - (FWImageAlbumController *)albumControllerForImagePickerController:(FWImagePickerController *)imagePickerController; /// 即将显示弹出相册列表控制器时调用 - (void)imagePickerController:(FWImagePickerController *)imagePickerController willShowAlbumController:(FWImageAlbumController *)albumController; /// 即将隐藏弹出相册列表控制器时调用 - (void)imagePickerController:(FWImagePickerController *)imagePickerController willHideAlbumController:(FWImageAlbumController *)albumController; /** * 即将需要显示 Loading 时调用 */ - (void)imagePickerControllerWillStartLoading:(FWImagePickerController *)imagePickerController; /** * 即将需要隐藏 Loading 时调用 */ - (void)imagePickerControllerDidFinishLoading:(FWImagePickerController *)imagePickerController; /// 图片未授权时调用,可自定义空界面等 - (void)imagePickerControllerWillShowDenied:(FWImagePickerController *)imagePickerController; /// 图片为空时调用,可自定义空界面等 - (void)imagePickerControllerWillShowEmpty:(FWImagePickerController *)imagePickerController; /// 已经选中数量超过最大选择数量时被调用,默认弹窗提示 - (void)imagePickerControllerWillShowExceed:(FWImagePickerController *)imagePickerController; @end
-
图片选取插件协议,应用可自定义图片选取插件实现
See moreDeclaration
Objective-C
@protocol FWImagePickerPlugin <NSObject>
-
图片插件协议,应用可自定义图片插件
See moreDeclaration
Objective-C
@protocol FWImagePlugin <NSObject>
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWImagePreviewViewDelegate <FWZoomImageViewDelegate> @optional - (NSInteger)numberOfImagesInImagePreviewView:(FWImagePreviewView *)imagePreviewView; - (void)imagePreviewView:(FWImagePreviewView *)imagePreviewView renderZoomImageView:(FWZoomImageView *)zoomImageView atIndex:(NSInteger)index; /// 是否重置指定index的zoomImageView,未实现时默认YES - (BOOL)imagePreviewView:(FWImagePreviewView *)imagePreviewView shouldResetZoomImageView:(FWZoomImageView *)zoomImageView atIndex:(NSInteger)index; /// 返回要展示的媒体资源的类型(图片、live photo、视频),如果不实现此方法,则 FWImagePreviewView 将无法选择最合适的 cell 来复用从而略微增大系统开销 - (FWImagePreviewMediaType)imagePreviewView:(FWImagePreviewView *)imagePreviewView assetTypeAtIndex:(NSInteger)index; /** * 当左右的滚动停止时会触发这个方法 * @param imagePreviewView 当前预览的 FWImagePreviewView * @param index 当前滚动到的图片所在的索引 */ - (void)imagePreviewView:(FWImagePreviewView *)imagePreviewView didScrollToIndex:(NSInteger)index; /** * 在滚动过程中,如果某一张图片的边缘(左/右)经过预览控件的中心点时,就会触发这个方法 * @param imagePreviewView 当前预览的 FWImagePreviewView * @param index 当前滚动到的图片所在的索引 */ - (void)imagePreviewView:(FWImagePreviewView *)imagePreviewView willScrollHalfToIndex:(NSInteger)index; @end
-
图片预览插件协议,应用可自定义图片预览插件实现
See moreDeclaration
Objective-C
@protocol FWImagePreviewPlugin <NSObject>
-
自定义指示器视图动画协议
See moreDeclaration
Objective-C
@protocol FWIndicatorViewAnimationProtocol <NSObject>
-
日志插件协议
See moreDeclaration
Objective-C
@protocol FWLoggerPlugin <NSObject>
-
业务模块协议,各业务必须实现
See moreDeclaration
Objective-C
@protocol FWModuleProtocol <UIApplicationDelegate, NSObject>
-
Model转换协议 数组类映射支持两种方式:
- 实现fwModelClassMapper方法,返回类映射字典。示例:@{@“books” : [Book class]}
- 声明Model类同名协议,同时定义数组属性时也声明协议。示例:NSArray
*books Swift数组类映射时,需返回AnyClass类型。示例:[“books”: Book.self]
Declaration
Objective-C
@protocol FWModel <NSObject>
-
FWUrlFilterProtocol can be used to append common parameters to requests before sending them.
See moreDeclaration
Objective-C
@protocol FWUrlFilterProtocol <NSObject>
-
FWCacheDirPathFilterProtocol can be used to append common path components when caching response results
See moreDeclaration
Objective-C
@protocol FWCacheDirPathFilterProtocol <NSObject>
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWPageControlDelegate <NSObject> @optional - (void)pageControl:(FWPageControl *)pageControl didSelectPageAtIndex:(NSInteger)index; @end
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWDotViewProtocol <NSObject> @required /** * A method call let view know which state appearance it should take. Active meaning it's current page. Inactive not the current page. * * @param active BOOL to tell if view is active or not */ - (void)changeActivityState:(BOOL)active; @end
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWPlayerCacheLoaderManagerDelegate <NSObject> - (void)resourceLoaderManagerLoadURL:(NSURL *)url didFailWithError:(NSError *)error; @end
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWPlayerCacheLoaderDelegate <NSObject> - (void)resourceLoader:(FWPlayerCacheLoader *)resourceLoader didFailWithError:(NSError *)error; @end
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWPlayerCacheDownloaderDelegate <NSObject> @optional - (void)mediaDownloader:(FWPlayerCacheDownloader *)downloader didReceiveResponse:(NSURLResponse *)response; - (void)mediaDownloader:(FWPlayerCacheDownloader *)downloader didReceiveData:(NSData *)data; - (void)mediaDownloader:(FWPlayerCacheDownloader *)downloader didFinishedWithError:(NSError *)error; @end
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWPlayerCacheRequestWorkerDelegate <NSObject> - (void)resourceLoadingRequestWorker:(FWPlayerCacheRequestWorker *)requestWorker didCompleteWithError:(NSError *)error; @end
-
可选插件协议,可不实现。未实现时默认调用sharedInstance > init方法
See moreDeclaration
Objective-C
@protocol FWPluginProtocol <NSObject>
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWPopupMenuDeviceOrientationManager <NSObject> /** 根据屏幕旋转方向自动旋转 Default is YES */ @property (nonatomic, assign) BOOL autoRotateWhenDeviceOrientationChanged; @property (nonatomic, copy, nullable) void (^deviceOrientDidChangeHandle) (UIInterfaceOrientation orientation); + (id <FWPopupMenuDeviceOrientationManager>)manager; /** 开始监听 */ - (void)startMonitorDeviceOrientation; /** 结束监听 */ - (void)endMonitorDeviceOrientation; @end
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWPopupMenuAnimationManager <NSObject> /** 动画类型,默认FWPopupMenuAnimationStyleScale */ @property (nonatomic, assign) FWPopupMenuAnimationStyle style; /** 显示动画,自定义可用 */ @property (nonatomic, strong, nullable) CAAnimation * showAnimation; /** 隐藏动画,自定义可用 */ @property (nonatomic, strong, nullable) CAAnimation * dismissAnimation; /** 弹出和隐藏动画的时间,Default is 0.25 */ @property CFTimeInterval duration; @property (nonatomic, weak, nullable) UIView * animationView; + (id <FWPopupMenuAnimationManager>)manager; - (void)displayShowAnimationCompletion:(nullable void (^) (void))completion; - (void)displayDismissAnimationCompletion:(nullable void (^) (void))completion; @end
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWPopupMenuDelegate <NSObject> @optional - (void)popupMenuBeganDismiss:(FWPopupMenu *)popupMenu; - (void)popupMenuDidDismiss:(FWPopupMenu *)popupMenu; - (void)popupMenuBeganShow:(FWPopupMenu *)popupMenu; - (void)popupMenuDidShow:(FWPopupMenu *)popupMenu; /** 点击事件回调 */ - (void)popupMenu:(FWPopupMenu *)popupMenu didSelectedAtIndex:(NSInteger)index; /** 自定义cell 可以自定义cell,设置后会忽略 fontSize textColor backColor type 属性 cell 的高度是根据 itemHeight 的,直接设置无效 建议cell 背景色设置为透明色,不然切的圆角显示不出来 */ - (nullable UITableViewCell *)popupMenu:(FWPopupMenu *)popupMenu cellForRowAtIndex:(NSInteger)index; @end
-
刷新插件协议,应用可自定义刷新插件实现
See moreDeclaration
Objective-C
@protocol FWRefreshPlugin <NSObject>
-
滚动视图控制器协议,可覆写
See moreDeclaration
Objective-C
@protocol FWScrollViewController <FWViewController>
-
自定义统计实现代理
See moreDeclaration
Objective-C
@protocol FWStatisticalDelegate <NSObject>
-
表格视图控制器协议,可覆写
See moreDeclaration
Objective-C
@protocol FWTableViewController <FWViewController, UITableViewDataSource, UITableViewDelegate>
-
Tags delegate
See moreDeclaration
Objective-C
@protocol FWTagCollectionViewDelegate <NSObject>
-
Tags dataSource
See moreDeclaration
Objective-C
@protocol FWTagCollectionViewDataSource <NSObject>
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWTextTagCollectionViewDelegate <NSObject> @optional - (BOOL)textTagCollectionView:(FWTextTagCollectionView *)textTagCollectionView canTapTag:(NSString *)tagText atIndex:(NSUInteger)index currentSelected:(BOOL)currentSelected tagConfig:(FWTextTagConfig *)config; - (void)textTagCollectionView:(FWTextTagCollectionView *)textTagCollectionView didTapTag:(NSString *)tagText atIndex:(NSUInteger)index selected:(BOOL)selected tagConfig:(FWTextTagConfig *)config; - (void)textTagCollectionView:(FWTextTagCollectionView *)textTagCollectionView updateContentSize:(CGSize)contentSize; @end
-
iOS13主题订阅观察者监听协议,主题改变时自动通知
See moreDeclaration
Objective-C
@protocol FWThemeObserver <NSObject>
-
吐司插件协议,应用可自定义吐司插件实现
See moreDeclaration
Objective-C
@protocol FWToastPlugin <NSObject>
-
自定义titleView协议
See moreDeclaration
Objective-C
@protocol FWTitleViewProtocol <NSObject>
-
自定义titleView事件代理
See moreDeclaration
Objective-C
@protocol FWToolbarTitleViewDelegate <NSObject>
-
The
FWURLRequestSerialization
protocol is adopted by an object that encodes parameters for a specified HTTP requests. Request serializers may encode parameters as query strings, HTTP bodies, setting the appropriate HTTP header fields as necessary.For example, a JSON request serializer may set the HTTP body of the request to a JSON representation, and set the
See moreContent-Type
HTTP header field value toapplication/json
.Declaration
Objective-C
@protocol FWURLRequestSerialization <NSObject, NSSecureCoding, NSCopying>
-
The
See moreFWMultipartFormData
protocol defines the methods supported by the parameter in the block argument ofFWHTTPRequestSerializer -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:
.Declaration
Objective-C
@protocol FWMultipartFormData
-
The
FWURLResponseSerialization
protocol is adopted by an object that decodes data into a more useful object representation, according to details in the server response. Response serializers may additionally perform validation on the incoming response and data.For example, a JSON response serializer may check for an acceptable status code (
See more2XX
range) and content type (application/json
), decoding a valid JSON response into an object.Declaration
Objective-C
@protocol FWURLResponseSerialization <NSObject, NSSecureCoding, NSCopying>
-
视图控制器挂钩协议,可覆写
See moreDeclaration
Objective-C
@protocol FWViewController <NSObject>
-
自定义进度条视图插件
See moreDeclaration
Objective-C
@protocol FWProgressViewPlugin <NSObject>
-
自定义指示器视图协议
See moreDeclaration
Objective-C
@protocol FWIndicatorViewPlugin <NSObject>
-
视图插件协议
See moreDeclaration
Objective-C
@protocol FWViewPlugin <NSObject>
-
图片缓存协议
See moreDeclaration
Objective-C
@protocol FWImageCache <NSObject>
-
图片请求缓存协议
See moreDeclaration
Objective-C
@protocol FWImageRequestCache <FWImageCache>
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWWebViewDelegate <WKNavigationDelegate, WKUIDelegate> @optional /// 是否开始加载,可用来拦截URL SCHEME、通用链接、系统链接等 - (BOOL)webViewShouldLoad:(WKNavigationAction *)navigationAction; /// 已经加载完成,可用来获取title、设置按钮等 - (void)webViewFinishLoad; /// 网页加载失败,可用来处理加载异常等 - (void)webViewFailLoad:(NSError *)error; @end
-
Undocumented
See moreDeclaration
Objective-C
@protocol FWWebViewJsBridgeDelegate <NSObject> - (NSString *)_evaluateJavascript:(NSString *)javascriptCommand; @end
-
网页视图控制器协议,可覆写
See moreDeclaration
Objective-C
@protocol FWWebViewController <FWViewController, FWWebViewDelegate>
-
FWZoomImageView事件代理
See moreDeclaration
Objective-C
@protocol FWZoomImageViewDelegate <NSObject>
-
Swift自动加载协议,配合autoload(_:)方法使用
See more
-
属性包装器兼容协议
自定义fw为任意名称(如app)示例: extension WrapperCompatible { public static var app: Wrapper
See more.Type { get { fw } set {} } public var app: Wrapper { get { fw } set {} } } 使用示例: String.app.jsonEncode(object)
-
骨架屏动画协议
See more
-
权限授权协议
See more
-
Player delegate protocol
See more
-
Player playback protocol
See more
-
MARK: - functions for simpler array buffer reading and writing