UI问题
华仔的倔强
这个社会只有没有能力的人,才会抱怨。
展开
-
解决子视图超出父视图无法响应问题
前言在日常开发过程中,难免都会遇到子控件超过父视图的情况。超出父视图的部分是不能响应点击事件,但是总有些情况需要我们让超出的部分响应点击事件,那么就需要用到convertPoint。convertPoint相关的方法转换像素点// 将像素point由point所在视图转换到目标视图view中,返回在目标视图view中的像素值- (CGPoint)convertPoint:(CGPoint)point toView:(UIView *)view;// 将像素point从view中转换到当前视原创 2021-04-27 17:41:26 · 998 阅读 · 0 评论 -
iOS 弹出视图弹出问题
问题描述在从上向下弹出视图的过程中,会出现部分控件还在原来的地方显示,底部的视图已经收缩。解决方式:在弹出的View设置_alertView.clipsToBounds = YES;clipsToBounds:源码解释: @property(nonatomic) BOOL clipsToBounds; // When YES, content and subviews are clipped to the bounds of the view. Default is NO.原创 2021-04-12 20:31:12 · 295 阅读 · 0 评论 -
UICollectionView遇到的问题
问题1问题描述:在做顶部弹窗的时候,UICollectionView有两个Section时,如果两个Section的宽度不一致。点击某个item,调用[self.collectionView reloadData]时,会出现宽度错乱。目前解决方案:- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtI原创 2021-04-12 19:57:48 · 317 阅读 · 0 评论