Giter Club home page Giter Club logo

Comments (7)

YXHTom avatar YXHTom commented on August 16, 2024

我通过performSelector延迟500ms创建第二个XPopup,bug出现的概率减少但是还会出现

from lstpopview.

LoSenTrad avatar LoSenTrad commented on August 16, 2024

@YXHTom 代码可以展示一下吗?

from lstpopview.

LoSenTrad avatar LoSenTrad commented on August 16, 2024

@YXHTom 或者私聊发我源码看看

from lstpopview.

YXHTom avatar YXHTom commented on August 16, 2024

-(void)XPopup_DeviceSettingPopView{

UINib *nib = [UINib nibWithNibName:@"DeviceSettingPopView" bundle:nil];
DeviceSettingPopView *view = [nib instantiateWithOwner:nil options:nil].firstObject;
view.layer.cornerRadius = 10;
view.layer.masksToBounds = YES;
[view initValue:mapType :isJapan :isSensor];

LSTPopView *popView = [LSTPopView initWithCustomView:view popStyle:LSTPopStyleSmoothFromTop dismissStyle:LSTDismissStyleSmoothToBottom];
LSTPopViewWK(popView)
popView.bgClickBlock = ^{
    [wk_popView dismiss];
};

// popView.isHideBg = YES;
view.modeBlock = ^(int mode,int value){
NSLog(@"mode=%d",mode);

    switch (mode) {
        case 0:

// 日本手
self->isJapan=true;
[self switchControlView];
break;
case 1:
// 美国手
self->isJapan=false;
[self switchControlView];
break;
case 2:
// 重力模式 是
self->isSensor=true;
[self->_rightJS set_isGravity:self->isSensor];
break;
case 3:
// 重力模式 否
self->isSensor=false;
[self->_rightJS set_isGravity:self->isSensor];
break;
case 4:
// 地图类型 标准
self->mapType=0;
[self->_mapView setMapType:MAMapTypeStandard];
break;
case 5:
// 地图类型 卫星
self->mapType=1;
[self->_mapView setMapType:MAMapTypeSatellite];
break;
case 6:
// 地图类型 混合
self->mapType=2;

            [self->_mapView setMapType:MAMapTypeNavi];
            break;
        case 7:

// 校准地磁
self->mControlData.MagCor= 1;

            [self performSelector:@selector(delayMagCor) withObject:nil afterDelay:1];
            break;
        case 8:

// 校准加速计
self->mControlData.LevelCor= 1;

            [self performSelector:@selector(delayLevelCor) withObject:nil afterDelay:1];
            break;
        case 9:

// 离线地图
{
UIViewController *detailViewController = [MAOfflineMapViewController sharedInstance];
[self.navigationController pushViewController:detailViewController animated:YES];
self.navigationController.navigationBar.hidden = NO;
[self.navigationController setNavigationBarHidden:NO animated:YES];

        }
            break;
        case 10:

// 找回

            break;
        case 11:

// 镜头方向
[self->mWiFiTool sendTcpData:SET_VIDEO_ROLLOVERS_COMMOND_REQ withData:NULL];
break;
case 12:
// SD卡信息

// [self->mWiFiTool sendTcpData:GET_SDCARD_INFO_COMMOND_REQ withData:NULL];
[self performSelector:@selector(init_XPopup_SearchSD) withObject:nil afterDelay:0.5];

            break;
        case 13:

// 弹出SD卡
// [self XPopup_UnLockView:6];
[self->mWiFiTool sendTcpData:MOUNT_SDCARD_COMMOND_REQ withData:NULL];

            break;
        case 14:

// 设备信息
[self->mWiFiTool sendTcpData:GET_DEVICE_INFO_COMMOND_REQ withData:NULL];
break;
case 15:
// 对频信息
{

               NSString*urlString=@"http://172.16.11.10/goform/http_getusersetting";
           //    1.创建manager
               AFHTTPSessionManager *manager =[AFHTTPSessionManager manager];
           //    发送数据格式
               manager.requestSerializer=[AFHTTPRequestSerializer serializer];
           //    接受数据格式
               manager.responseSerializer=[AFJSONResponseSerializer serializerWithReadingOptions:NSJSONReadingMutableLeaves];
               manager.responseSerializer.acceptableContentTypes = [manager.responseSerializer.acceptableContentTypes setByAddingObject:@"text/html"];
               
               [manager GET:urlString parameters:nil headers:nil progress:^(NSProgress * _Nonnull downloadProgress) {
                       NSLog(@"%lli/%lli",downloadProgress.completedUnitCount,downloadProgress.totalUnitCount);
                   } success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
                       NSLog(@"getApSSidInfo成功");
                      
                       
                       ApSSIDInfo* mApSSIDInfo=[ApSSIDInfo yy_modelWithJSON:responseObject];
                      
                       self->rssilimit=mApSSIDInfo.rssilimit;
                       NSLog(@"mApSSIDInfo--%d",self->rssilimit);
                       if([mApSSIDInfo.apssidgroup containsString:@"LGGO_GPS_"]){
                        
                           [self XPopup_UnLockView:8 msg:[mApSSIDInfo.apssidgroup componentsSeparatedByString:@","][0]];
                           
                       }else{
                           [self XPopup_UnLockView:9 msg:@"未配对"];
                       }
                       
                       
                   } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                       NSLog(@"请求失败");
                       NSLog(@"error:%@",error.localizedDescription);
                   }];
           }
            break;
        
        case 16:

// 修改连接强度
self->isEditSSID = true;
[self getApSSidInfo:value];
break;

        case 17:

// 连接强度
[self getApSSidInfo:0];
break;
default:
break;
}

    [wk_popView dismiss];
};
self.popView_DeviceSettingPopView=popView;
[popView pop];

}

from lstpopview.

YXHTom avatar YXHTom commented on August 16, 2024

以上是第一个XPopup

from lstpopview.

YXHTom avatar YXHTom commented on August 16, 2024

//SD卡信息
-(void)init_XPopup_SearchSD{
if (self->mSDInfo !=nil) {
// dispatch_async(dispatch_get_main_queue(), ^{
UINib *nib = [UINib nibWithNibName:@"XPopup_SearchSD" bundle:nil];
XPopup_SearchSD *view = [nib instantiateWithOwner:nil options:nil].firstObject;

    [view setValue:self->mSDInfo.capacity :self->mSDInfo.free :self->mSDInfo.used :self->mSDInfo.type ];
    view.layer.cornerRadius = 10;
    view.layer.masksToBounds = YES;
    
    
    LSTPopView *popView = [LSTPopView initWithCustomView:view popStyle:LSTPopStyleSmoothFromTop dismissStyle:LSTDismissStyleSmoothToBottom];
    LSTPopViewWK(popView)
    popView.bgClickBlock = ^{
        [wk_popView dismiss];
    };
    self.popView_SearchSD=popView;
    [popView pop];

// });
}

from lstpopview.

LoSenTrad avatar LoSenTrad commented on August 16, 2024

@YXHTom 加我微信a_LSTKit 😔

from lstpopview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.