Giter Club home page Giter Club logo

Comments (4)

wwmz avatar wwmz commented on July 22, 2024

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.

anotherCPL avatar anotherCPL commented on July 22, 2024

重新试了一下,还是可以复现的。
复现条件 :
1.把.wTapViewSet(sender)这句去掉;
2.然后在横屏界面使用这个弹框。就会出现。
我这个是有刘海屏的iPhone,只要有底部安全区域和刘海屏的手机,视图横屏都会被挤压。

而且横屏的时候用其他类型弹框,有时候布局也会变得错位了。当使用强制横屏的时候,你使用[UIScreen mainScreen]这个方法来判断当前屏幕的宽高就会出现布局错乱,这个函数好像是根据手机重力感应才变换的,只有强制横屏才会出现这种情况。

from wmzdialog.

wwmz avatar wwmz commented on July 22, 2024

重新试了一下,还是可以复现的。 复现条件 : 1.把.wTapViewSet(sender)这句去掉; 2.然后在横屏界面使用这个弹框。就会出现。 我这个是有刘海屏的iPhone,只要有底部安全区域和刘海屏的手机,视图横屏都会被挤压。

而且横屏的时候用其他类型弹框,有时候布局也会变得错位了。当使用强制横屏的时候,你使用[UIScreen mainScreen]这个方法来判断当前屏幕的宽高就会出现布局错乱,这个函数好像是根据手机重力感应才变换的,只有强制横屏才会出现这种情况。

修改了一下横竖屏的frame可更新看看

from wmzdialog.

anotherCPL avatar anotherCPL commented on July 22, 2024

重新试了一下,还是可以复现的。 复现条件 : 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)

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.