Newer
Older
XinYang_IOS / XYSW / YH_Untis / MonitorNetworkStatus.h
@zhangfeng zhangfeng on 7 Dec 2023 732 bytes 1.8.0
//
//  MonitorNetworkStatus.h
//  YHScrollView_Test
//
//  Created by Jim on 2021/9/4.
//

#import <Foundation/Foundation.h>

@protocol NetworkStatusNotifyManagerDelegate <NSObject>

@optional
/**
 *  网络状态发生改变
 *
 *  @param reachability 是否联网
 */
- (void)networkStatusNotifyManagerStatusChanged:(BOOL)reachability;
@end

NS_ASSUME_NONNULL_BEGIN

@interface MonitorNetworkStatus : NSObject

@property (nonatomic, assign) id<NetworkStatusNotifyManagerDelegate>delegate;
+ (instancetype)sharedManager;
/**
 *  开始监听并添加代理
 *
 *  @param delegate 代理
 */
- (void)YHProject_startNotifyWithDelegate:(id)delegate;
/**
 *  停止监听
 */
- (void)YHProject_stopNotify;

@end

NS_ASSUME_NONNULL_END