zoukankan      html  css  js  c++  java
  • 12345的789

    UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.backView.bounds

                                                               byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight

                                                                     cornerRadii:CGSizeMake(12.f, 12.f)];

                CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];

                maskLayer.frame = self.backView.bounds;

                maskLayer.path = maskPath.CGPath;

                self.backView.layer.mask = maskLayer;

    - (void)refreshBackgroundCornerRadius:(NSIndexPath *)indexPath {

        self.backView.layer.cornerRadius = 0;

        

        if (indexPath.section == 0) {

            if (indexPath.row == 3) {

                UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.backView.bounds

                                                               byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight

                                                                     cornerRadii:CGSizeMake(12.f, 12.f)];

                CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];

                maskLayer.frame = self.backView.bounds;

                maskLayer.path = maskPath.CGPath;

                self.backView.layer.mask = maskLayer;

                

            } else if (indexPath.row == 0) {

                UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.backView.bounds

                                                               byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight

                                                                     cornerRadii:CGSizeMake(12.f, 12.f)];

                CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];

                maskLayer.frame = self.backView.bounds;

                maskLayer.path = maskPath.CGPath;

                self.backView.layer.mask = maskLayer;

            } else {

                

            }

        }else if(indexPath.section == 1){

            if (indexPath.row == 1) {

                UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.backView.bounds

                                                               byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight

                                                                     cornerRadii:CGSizeMake(12.f, 12.f)];

                CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];

                maskLayer.frame = self.backView.bounds;

                maskLayer.path = maskPath.CGPath;

                self.backView.layer.mask = maskLayer;

                

            } else if (indexPath.row == 0) {

                UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.backView.bounds

                                                               byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight

                                                                     cornerRadii:CGSizeMake(12.f, 12.f)];

                CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];

                maskLayer.frame = self.backView.bounds;

                maskLayer.path = maskPath.CGPath;

                self.backView.layer.mask = maskLayer;

            } else {

                

            }

        }

    }

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

        YGProfileCell *profileCell = [tableView dequeueReusableCellWithIdentifier:YGMainProfileCellID];

        profileCell.backgroundColor = [UIColor clearColor];

        profileCell.selectionStyle = UITableViewCellSelectionStyleNone;

        

        [profileCell refreshProfileCell:self.profileDatas[indexPath.section][indexPath.row]];

        [profileCell refreshBackgroundCornerRadius:indexPath];

        

        return profileCell;

    }

    - (UITableView *)tableView {

        if ( !_tableView ) {

            _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];

            _tableView.backgroundColor = [UIColor clearColor];

            _tableView.bounces = NO;

            _tableView.delegate = self;

            _tableView.dataSource = self;

            _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;

            _tableView.showsVerticalScrollIndicator = NO;

            _tableView.sectionFooterHeight = 12;

            [_tableView registerClass:[YGProfileCell class] forCellReuseIdentifier:YGMainProfileCellID];

        }

        

        return _tableView;

    }

    #pragma mark - NSLog

    #ifdef DEBUG

    #define LCLog(fmt, ...) NSLog(@"%s [Line %d] %s ", __FUNCTION__, __LINE__, [[NSString stringWithFormat:fmt, ## __VA_ARGS__] UTF8String]);

    #else

    #define LCLog(...)

    #endif

    NSStringFromSelector(_cmd)

    #define ValidStr(str) ([str isKindOfClass:[NSString class]] && str.length ? str : @"")

    #define ValidDic(dic) ([dic isKindOfClass:[NSDictionary class]] && dic ? dic : [NSDictionary dictionary])

    #define ValidArr(arr) ([arr isKindOfClass:[NSArray class]] && arr ? arr : [NSArray array])

    + (BOOL)isIphoneXx{

        BOOL isIphoneXx = NO;

        if (@available(iOS 11.0, *)) {

            UIWindow *mainWindow = [UIApplication sharedApplication].windows.firstObject;

            if (mainWindow.safeAreaInsets.bottom > 0.f) {

                isIphoneXx = YES;

            }

        }

        return isIphoneXx;

    }

    提高技能如同提升自信心。
  • 相关阅读:
    圈子
    限制我们的最大敌人不是自己,也不是思维,是时空。
    社交的本质就是生活!
    没有归零思维,就不会有突破
    什么是老板思维,什么是员工思维,深有体会,最近被N个行业洗脑……
    太相信书的人,格局不会太大
    在一个规则没有被建立好的时代,那些活生生的牛人,就是仅存的有效教科书
    个人发展阶段与回报对应表
    分布式,去中心化,协作性,可适应性
    [测试题]line
  • 原文地址:https://www.cnblogs.com/chims-liu-touch/p/14472235.html
Copyright © 2011-2022 走看看