Type Definitions
The following type definitions are available globally.
-
屏幕尺寸可扩展枚举
Declaration
Objective-C
typedef NSInteger FWScreenInch
-
通用不带参数block
Declaration
Objective-C
typedef void (^FWBlockVoid)(void)
-
通用id参数block
Declaration
Objective-C
typedef void (^FWBlockParam)(id _Nullable __strong)
Parameters
param
id参数
-
通用bool参数block
Declaration
Objective-C
typedef void (^FWBlockBool)(BOOL)
Parameters
isTrue
bool参数
-
通用NSInteger参数block
Declaration
Objective-C
typedef void (^FWBlockInt)(NSInteger)
Parameters
index
NSInteger参数
-
通用double参数block
Declaration
Objective-C
typedef void (^FWBlockDouble)(double)
Parameters
value
double参数
-
通用(BOOL,id)参数block
Declaration
Objective-C
typedef void (^FWBlockBoolParam)(BOOL, id _Nullable __strong)
Parameters
isTrue
BOOL参数
param
id参数
-
Undocumented
Declaration
Objective-C
typedef void(^FWCellConfigurationBlock)(__kindof UITableViewCell *cell)
-
Undocumented
Declaration
Objective-C
typedef void(^FWCellIndexPathBlock)(__kindof UITableViewCell *cell, NSIndexPath *indexPath)
-
Undocumented
Declaration
Objective-C
typedef void(^FWHeaderFooterViewConfigurationBlock)(__kindof UITableViewHeaderFooterView *headerFooterView)
-
Undocumented
Declaration
Objective-C
typedef void(^FWHeaderFooterViewSectionBlock)(__kindof UITableViewHeaderFooterView *headerFooterView, NSInteger section)
-
Undocumented
Declaration
Objective-C
typedef void(^FWCollectionCellConfigurationBlock)(__kindof UICollectionViewCell *cell)
-
Undocumented
Declaration
Objective-C
typedef void(^FWCollectionCellIndexPathBlock)(__kindof UICollectionViewCell *cell, NSIndexPath *indexPath)
-
Undocumented
Declaration
Objective-C
typedef void(^FWReusableViewConfigurationBlock)(__kindof UICollectionReusableView *reusableView)
-
Undocumented
Declaration
Objective-C
typedef void(^FWReusableViewIndexPathBlock)(__kindof UICollectionReusableView *reusableView, NSIndexPath *indexPath)
-
Undocumented
Declaration
Objective-C
typedef uint_least16_t char16_t
-
Undocumented
Declaration
Objective-C
typedef uint_least32_t char32_t
-
Undocumented
Declaration
Objective-C
typedef float swift_float2
-
Undocumented
Declaration
Objective-C
typedef float swift_float3
-
Undocumented
Declaration
Objective-C
typedef float swift_float4
-
Undocumented
Declaration
Objective-C
typedef double swift_double2
-
Undocumented
Declaration
Objective-C
typedef double swift_double3
-
Undocumented
Declaration
Objective-C
typedef double swift_double4
-
Undocumented
Declaration
Objective-C
typedef int swift_int2
-
Undocumented
Declaration
Objective-C
typedef int swift_int3
-
Undocumented
Declaration
Objective-C
typedef int swift_int4
-
Undocumented
Declaration
Objective-C
typedef unsigned int swift_uint2
-
Undocumented
Declaration
Objective-C
typedef unsigned int swift_uint3
-
Undocumented
Declaration
Objective-C
typedef unsigned int swift_uint4
-
路由处理句柄,仅支持openURL时可返回nil
Declaration
Objective-C
typedef id _Nullable (^FWRouterHandler)(FWRouterContext *_Nonnull __strong)
-
路由完成句柄,openURL时可设置完成回调
Declaration
Objective-C
typedef void (^FWRouterCompletion)(id _Nullable __strong)
-
主题样式枚举,可扩展
Declaration
Objective-C
typedef NSInteger FWThemeStyle
-
主题模式枚举,可扩展(扩展值与样式值相同即可)
Declaration
Objective-C
typedef NSInteger FWThemeMode
-
图片格式可扩展枚举
Declaration
Objective-C
typedef NSInteger FWImageFormat
-
Undocumented
Declaration
Objective-C
typedef void (^FWWriteAssetCompletionBlock)(FWAsset * _Nullable asset, NSError * _Nullable error)
-
- You may optionally set a receive filter for the socket.
- A filter can provide several useful features:
- 1. Many times udp packets need to be parsed.
Since
Since the filter can run in its own independent queue, you can parallelize this parsing quite easily.- The end result is a parallel socket io, datagram parsing, and packet processing.
- 2. Many times udp packets are discarded because they are duplicate/unneeded/unsolicited.
- The filter can prevent such packets from arriving at the delegate.
- And because the filter can run in its own independent queue, this doesn’t slow down the delegate.
- - Since the udp protocol does not guarantee delivery, udp packets may be lost.
- Many protocols built atop udp thus provide various resend/re-request algorithms.
- This sometimes results in duplicate packets arriving.
- A filter may allow you to architect the duplicate detection code to run in parallel to normal processing.
- - Since the udp socket may be connectionless, its possible for unsolicited packets to arrive.
- Such packets need to be ignored.
- 3. Sometimes traffic shapers are needed to simulate real world environments.
- A filter allows you to write custom code to simulate such environments.
- The ability to code this yourself is especially helpful when your simulated environment
- is more complicated than simple traffic shaping (e.g. simulating a cone port restricted router),
- or the system tools to handle this aren’t available (e.g. on a mobile device).
- - parameter: data - The packet that was received.
- - parameter: address - The address the data was received from.
See
See utilities section for methods to extract info from address.- - parameter: context - Out parameter you may optionally set, which will then be passed to the delegate method.
- For example, filter block can parse the data and then,
- pass the parsed data to the delegate.
- @returns - YES if the received packet should be passed onto the delegate.
- NO if the received packet should be discarded, and not reported to the delegete.
- Example:
- FWAsyncUdpSocketReceiveFilterBlock filter = ^BOOL (NSData *data, NSData *address, id *context) {
- MyProtocolMessage *msg = [MyProtocol parseMessage:data];
- *context = response;
- return (response != nil);
- };
- [udpSocket setReceiveFilter:filter withQueue:myParsingQueue];
Declaration
Objective-C
typedef BOOL (^FWAsyncUdpSocketReceiveFilterBlock)( NSData *_Nonnull __strong, NSData *_Nonnull __strong, id _Nullable __autoreleasing *_Nonnull)
-
- You may optionally set a send filter for the socket.
- A filter can provide several interesting possibilities:
- 1. Optional caching of resolved addresses for domain names.
- The cache could later be consulted, resulting in fewer system calls to getaddrinfo.
- 2. Reusable modules of code for bandwidth monitoring.
- 3. Sometimes traffic shapers are needed to simulate real world environments.
- A filter allows you to write custom code to simulate such environments.
- The ability to code this yourself is especially helpful when your simulated environment
- is more complicated than simple traffic shaping (e.g. simulating a cone port restricted router),
- or the system tools to handle this aren’t available (e.g. on a mobile device).
- - parameter: data - The packet that was received.
- - parameter: address - The address the data was received from.
See
See utilities section for methods to extract info from address.- - parameter: tag - The tag that was passed in the send method.
- @returns - YES if the packet should actually be sent over the socket.
- NO if the packet should be silently dropped (not sent over the socket).
- Regardless of the return value, the delegate will be informed that the packet was successfully sent. *
Declaration
Objective-C
typedef BOOL (^FWAsyncUdpSocketSendFilterBlock)(NSData *_Nonnull __strong, NSData *_Nonnull __strong, long)
-
Undocumented
Declaration
Objective-C
typedef void(^FWAttributedLinkDetectCompletion)(NSArray<FWAttributedLabelURL *> * _Nullable links)
-
Undocumented
Declaration
Objective-C
typedef void(^FWBarrageTouchAction)(__weak FWBarrageDescriptor *descriptor)
-
Undocumented
Declaration
Objective-C
typedef void(^FWBarrageCellTouchedAction)(__weak FWBarrageDescriptor *descriptor, __weak FWBarrageCell *cell)
-
Undocumented
Declaration
Objective-C
typedef void (^FWConstructingBlock)(id<FWMultipartFormData> formData)
-
Undocumented
Declaration
Objective-C
typedef void (^FWURLSessionTaskProgressBlock)(NSProgress *)
-
Undocumented
Declaration
Objective-C
typedef void(^FWRequestCompletionBlock)(__kindof FWBaseRequest *request)
-
缓存类型枚举
Declaration
Objective-C
typedef NSInteger FWCacheType
-
The chain callback called when one request finished
Declaration
Objective-C
typedef void (^FWChainCallback)(FWChainRequest *_Nonnull __strong, FWBaseRequest *_Nonnull __strong)
-
本地图片解码编码选项,默认兼容SDWebImage
Declaration
Objective-C
typedef NSString *FWImageCoderOptions
-
自定义指示器视图动画类型枚举,可扩展
Declaration
Objective-C
typedef NSInteger FWIndicatorViewAnimationType
-
导航栏全局样式可扩展枚举
Declaration
Objective-C
typedef NSInteger FWNavigationBarStyle
-
Undocumented
Declaration
Objective-C
typedef void (^FWIndexChangeBlock)(NSUInteger index)
-
Undocumented
Declaration
Objective-C
typedef NSAttributedString *_Nonnull(^FWTitleFormatterBlock)(FWSegmentedControl *segmentedControl, NSString *title, NSUInteger index, BOOL selected)
-
统计通用block,参数object为FWStatisticalObject统计对象
Declaration
Objective-C
typedef void (^FWStatisticalBlock)(FWStatisticalObject *_Nonnull __strong)
-
统计点击回调block,参数cell为表格子cell,indexPath为表格子cell所在位置
Declaration
Objective-C
typedef void (^FWStatisticalClickCallback)(__kindof UIView *_Nullable __strong, NSIndexPath *_Nullable __strong)
-
统计曝光回调block,参数cell为表格子cell,indexPath为表格子cell所在位置,duration为曝光时长(0表示开始)
Declaration
Objective-C
typedef void (^FWStatisticalExposureCallback)( __kindof UIView *_Nullable __strong, NSIndexPath *_Nullable __strong, NSTimeInterval)
-
消息吐司样式枚举,可扩展
Declaration
Objective-C
typedef NSInteger FWToastStyle
-
视图控制器页面状态可扩展枚举
Declaration
Objective-C
typedef NSInteger FWViewControllerState
-
进度条视图样式枚举,可扩展
Declaration
Objective-C
typedef NSInteger FWProgressViewStyle
-
指示器视图样式枚举,可扩展
Declaration
Objective-C
typedef NSInteger FWIndicatorViewStyle
-
Undocumented
Declaration
Objective-C
typedef void (^FWJsBridgeResponseCallback)(id responseData)
-
Undocumented
Declaration
Objective-C
typedef void (^FWJsBridgeHandler)(id data, FWJsBridgeResponseCallback responseCallback)
-
Undocumented
Declaration
Objective-C
typedef void (^FWJsBridgeErrorHandler)(NSString *handlerName, id data, FWJsBridgeResponseCallback responseCallback)
-
Undocumented
Declaration
Objective-C
typedef BOOL (^FWJsBridgeFilterHandler)(NSString *handlerName, id data, FWJsBridgeResponseCallback responseCallback)
-
Undocumented
Declaration
Objective-C
typedef NSDictionary FWJsBridgeMessage