Comments (7)
我通过performSelector延迟500ms创建第二个XPopup,bug出现的概率减少但是还会出现
from lstpopview.
@YXHTom 代码可以展示一下吗?
from lstpopview.
@YXHTom 或者私聊发我源码看看
from lstpopview.
-(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.
以上是第一个XPopup
from lstpopview.
//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.
@YXHTom 加我微信a_LSTKit 😔
from lstpopview.
Related Issues (20)
- pod install 报错 HOT 6
- hemstyle会失效
- 都是广告
- customView 未添加到 window,调用 layoutIfNeeded 会有警告 HOT 4
- LSTPopView上添加一个CollectionView,Cell的didSelectItemAtIndexPath的方法不调用
- 如果只想竖屏不想支持横屏切换是否有参数可以设置? HOT 4
- 定时器调试 HOT 2
- Swift版本有没 HOT 6
- 消失动画的问题 HOT 9
- 状态栏高度计算有问题,在iPhone12上调试,得出20,应该是47才对。 HOT 2
- Keyboard 和 customview 并不在同一坐标系,在presentViewController的view中弹出popview的话,customViewMaxY计算不对
- Bug和实现效果疑问 HOT 1
- 拖拽为什么不能消失? HOT 1
- pan手势的问题
- 有个问题,你滑动收拾判断 是判断的底层是不是 UIscrollVIew 但是 我底层 不是这个 有另外的滑动手势,你给我关闭了,导致我的滑动手势不能用了
- 在调用[LSTPopView removeLastPopView];没有动画效果比较干吧,希望作者大大后期可以考虑添加此功能吧。
- 动画
- 有个问题 底部弹出的view中 有个 UITableView 底部有个输入框 当点击输入框的时候 HOT 2
- 点击customview 上的某个按钮,键盘消失了,而且没有处罚按钮点击事件。 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lstpopview.