配网页面初步

This commit is contained in:
祝发冬
2023-08-15 21:04:27 +08:00
parent a27efea1f6
commit afd4d2bc2a
7 changed files with 1119 additions and 31 deletions
@@ -16,6 +16,7 @@
#import "ESPTouchTask.h"
#import "ESPTouchResult.h"
#import "ESPTouchDelegate.h"
#import "EspTouchDelegateImpl.h"
#import "MyMD5.h"
#import "ChatroomModel.h"
#import "MMProgressHUD.h"
@@ -31,38 +32,7 @@
#import "ConnectHotpotViewController.h"
#import "ConAquarNowWiFiPwdVC.h"
#import "InfoByImageViewController.h"
@interface EspTouchDelegateImpl : NSObject<ESPTouchDelegate>
@end
@implementation EspTouchDelegateImpl
-(void) dismissAlert:(UIAlertView *)alertView
{
[alertView dismissWithClickedButtonIndex:[alertView cancelButtonIndex] animated:YES];
}
-(void) showAlertWithResult: (ESPTouchResult *) result
{
NSString *title = nil;
NSString *message = [NSString stringWithFormat:@"%@ is connected to the wifi" , result.bssid];
NSTimeInterval dismissSeconds = 3.5;
UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:title message:message delegate:nil cancelButtonTitle:nil otherButtonTitles:nil];
[alertView show];
[self performSelector:@selector(dismissAlert:) withObject:alertView afterDelay:dismissSeconds];
}
-(void) onEsptouchResultAddedWithResult: (ESPTouchResult *) result
{
NSLog(@"EspTouchDelegateImpl onEsptouchResultAddedWithResult bssid: %@", result.bssid);
dispatch_async(dispatch_get_main_queue(), ^{
// [self showAlertWithResult:result];
});
}
@end
typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
lodingViewdissMissSuccsess=0,// default is 0
lodingViewdissMissfail,