Comments (4)
DialogTypePop和DialogPopTypeCustom类型的时候tableview的cell的右边会多出10px的像素的空白内容,这好像是个索引的内容的宽度。
例子: Dialog() .wTagSet(100) .wTypeSet(DialogTypePop) // .wPopStyleTypeSet(DialogPopTypeCustom) .wShowAnimationSet(AninatonZoomIn) .wHideAnimationSet(AninatonZoomOut) .wWidthSet(100) .wShadowAlphaSet(0) .wAngleSizeSet(CGSizeMake(8, 8)) .wMainOffsetYSet(8) .wPopViewBorderWidthSet(1) .wShadowCanTapSet(YES) .wShadowAlphaSet(0.7) .wPopViewRectCornerSet(DialogRectCornerAllCorners) .wTapViewSet(sender) // .wPopCustomViewSet(^UIView *{ // return contentView; // }) .wDataSet(@[ @{@"name":@"发起群聊",@"image":@"bbb"}, @{@"name":@"添加朋友",@"image":@"aaa"}, @{@"name":@"扫一扫",@"image":@"bbb"}, @{@"name":@"收付款",@"image":@"aaa"}, ]) //自定义cell高度 .wCellHeightSet(44) //自定义cell(如有需要) .wCustomCellSet(^UITableViewCell *(NSIndexPath *indexPath, UITableView *tableView, id model, BOOL isSelected){ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"WXCell"]; if (!cell) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"WXCell"]; } cell.contentView.backgroundColor = [UIColor redColor]; cell.backgroundColor = [UIColor orangeColor]; return cell; }) .wStart();
复制了你的代码没重现
from wmzdialog.
重新试了一下,还是可以复现的。
复现条件 :
1.把.wTapViewSet(sender)这句去掉;
2.然后在横屏界面使用这个弹框。就会出现。
我这个是有刘海屏的iPhone,只要有底部安全区域和刘海屏的手机,视图横屏都会被挤压。
而且横屏的时候用其他类型弹框,有时候布局也会变得错位了。当使用强制横屏的时候,你使用[UIScreen mainScreen]这个方法来判断当前屏幕的宽高就会出现布局错乱,这个函数好像是根据手机重力感应才变换的,只有强制横屏才会出现这种情况。
from wmzdialog.
重新试了一下,还是可以复现的。 复现条件 : 1.把.wTapViewSet(sender)这句去掉; 2.然后在横屏界面使用这个弹框。就会出现。 我这个是有刘海屏的iPhone,只要有底部安全区域和刘海屏的手机,视图横屏都会被挤压。
而且横屏的时候用其他类型弹框,有时候布局也会变得错位了。当使用强制横屏的时候,你使用[UIScreen mainScreen]这个方法来判断当前屏幕的宽高就会出现布局错乱,这个函数好像是根据手机重力感应才变换的,只有强制横屏才会出现这种情况。
修改了一下横竖屏的frame可更新看看
from wmzdialog.
重新试了一下,还是可以复现的。 复现条件 : 1.把.wTapViewSet(sender)这句去掉; 2.然后在横屏界面使用这个弹框。就会出现。 我这个是有刘海屏的iPhone,只要有底部安全区域和刘海屏的手机,视图横屏都会被挤压。
而且横屏的时候用其他类型弹框,有时候布局也会变得错位了。当使用强制横屏的时候,你使用[UIScreen mainScreen]这个方法来判断当前屏幕的宽高就会出现布局错乱,这个函数好像是根据手机重力感应才变换的,只有强制横屏才会出现这种情况。修改了一下横竖屏的frame可更新看看
问题1. 测试了多次,还是那个iPhoneX安全区域的问题还是没法解决,只要横屏的时候这个弹框在左或者右边的安全区域就会被挤压,我尝试着在根视图Controller设置 additionalSafeAreaInsets这个属性,但是效果并不理想。
问题2. 现在修复问题横屏高度会错乱了(横屏高度没问题),就是宽度还会错误,你可以尝试着举起手机右下角倾斜一点角度再点击出弹框,这个Toast宽度会变得和横屏的宽度一样,但是平放在桌面不要紧。
示例:
Dialog()
.wMessageSet(message)
.wTypeSet(DialogTypeToast)
.wMessageFontSet(15)
.wToastPositionSet(DialogToastBottom)
.wStart();
最后,还是谢谢作者的回复和修复了- -这个太折腾了~
from wmzdialog.
Related Issues (20)
- 日期选择希望增加一个几点到几点的选择 HOT 2
- 富文本设置了setLineSpacing 计算高度问题! HOT 2
- format格式为HH:mm时wMinDateSet无效
- DialogTypeDatePicker HOT 1
- looks so smart
- 请问如何修改弹窗的背景颜色呢? HOT 5
- 请问如何修改弹窗圆角的大小呢? HOT 2
- DialogTypeSheet,无法多行显示吗? HOT 9
- [feature]Please support Carthage HOT 1
- 请问如何修改,点击后的高亮颜色 ,现在是黄色 HOT 3
- 当 wTypeSet(DialogTypeDatePicker) 时候如何设置文字不要这种凹凸的对齐方式? HOT 4
- 日历设置了默认日期没效果;设置了最小日期和最大最小值效果一直左滑后再右滑发现title日期不对 HOT 1
- 提个小需求:能否增加设置语言 HOT 4
- 日历为多选时,能不能设置最多选择个数?比如可以多选2个、3个、5个等。
- 关于日历的想法及问题
- 获取农历日期崩溃`- (BOOL)updateDateYear:(NSInteger)year Month:(NSInteger)month index:(NSInteger)index`出错导致
- 自定义弹窗
- 自定义View实现了WMZCustomPrototol HOT 1
- 支持OC吗? 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 wmzdialog.