This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// 实现流式按钮布局,自定义View如果支持sizeToFit,则也可以使用 | |
/// @param superView 按钮将要放在的容器 | |
/// @param buttons 按钮数组 | |
/// @param horSpacing 横向间隔 | |
/// @param verSpacing 行间隔 | |
/// @param lineHeight 行高 其实可以按照sizeToFit后的数据 | |
/// @param superViewWidth 这个是唯一的需要提前计算的点,不过也不会太复杂 | |
- (void)buttonFlowView:(UIView *)superView | |
buttons:(NSArray<UIButton *> *)buttons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Network/Network.h> | |
if (@available(iOS 14.0, *)) { | |
nw_privacy_context_t parameters = _nw_privacy_context_default_context; | |
nw_endpoint_t address1 = nw_endpoint_create_host("223.5.5.5", "443"); | |
nw_endpoint_t address2 = nw_endpoint_create_host("223.6.6.6", "443"); | |
nw_endpoint_t address3 = nw_endpoint_create_host("2400:3200::1", "443"); | |
nw_endpoint_t address4 = nw_endpoint_create_host("2400:3200:baba::1", "443"); |