空置页面和设置页面调试通过

This commit is contained in:
xuemh
2018-04-23 00:41:11 +08:00
parent 4dd95da147
commit df311d475c
23 changed files with 2472 additions and 10 deletions
@@ -15,7 +15,13 @@
#import "ThreeControlName.h"
#import "FourControlName.h"
#import "XuToControlName.h"
#import "RuiMeiCHControl.h"
@interface UserExtendataArchaver : NSObject
//自定义水族箱名字数据
+(void)archiverRuiMeiDeviceCHInfo:(RuiMeiCHControl*)ch;
+(RuiMeiCHControl*)unArchiverRuiMeiDeviceCHInfo:(NSString *)mac;
//自定义水族箱名字数据
+(void)archiverDeviceCHInfo:(RunSunCHControl*)ch;
+(RunSunCHControl*)unArchiverDeviceCHInfo:(NSString *)mac;
@@ -9,6 +9,20 @@
#import "UserExtendataArchaver.h"
@implementation UserExtendataArchaver
+(void)archiverRuiMeiDeviceCHInfo:(RuiMeiCHControl*)ch {
NSString *key = [NSString stringWithFormat:@"Ruimei%@",ch.macAd];
NSString *file = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject stringByAppendingPathComponent:key];
[NSKeyedArchiver archiveRootObject:ch toFile:file];
}
+(RuiMeiCHControl*)unArchiverRuiMeiDeviceCHInfo:(NSString *)mac {
NSString *key = [NSString stringWithFormat:@"Ruimei%@",mac];
NSString *file = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject stringByAppendingPathComponent:key];
RuiMeiCHControl *ch = [NSKeyedUnarchiver unarchiveObjectWithFile:file];
return ch;
}
+(void)archiverDeviceCHInfo:(RunSunCHControl*)ch
{
NSString *key = [NSString stringWithFormat:@"Rusun%@",ch.macAd];