Giter VIP home page Giter VIP logo

qqcorner's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

qqcorner's Issues

uiview加圆角报警告:[Unknown process name] CGContextAddPath: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

如题,无效的上下文.
for example:
- (UIView *)smartKeyFootView
{
UIView *footView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, MAIN_SIZE.width, RELATIVE_HEIGHT(10))];
UIView *helfCornerView = [[UIImageView alloc]init];
helfCornerView.frame = CGRectMake(RELATIVE_WIDTH(16.5), 0, RELATIVE_WIDTH(342), RELATIVE_HEIGHT(6));
helfCornerView.sakura.backgroundColor(@"Global.circularCellBackgroundColor");
[footView addSubview:helfCornerView];
[helfCornerView updateCornerRadius:^(QQCorner *corner) {
corner.radius = QQRadiusMake(0, 0, RELATIVE_HEIGHT(6), RELATIVE_HEIGHT(6));
}];
return footView;
}

上面的uiviwe就是用于在- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section中返回视图的.
一般报警会有两句话:
2019-02-12 14:53:16.144824+0800 IsolatedSecond[8464:2267719] [Unknown process name] CGContextAddPath: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
2019-02-12 14:53:16.144873+0800 IsolatedSecond[8464:2267719] [Unknown process name] clip: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

请问如何重置updateCornerRadius

在cell复用的时候,比如对话CELL
发送方我使用渐变背景
接收方我使用非统一圆角边框

因此想问问有没有方式方便地取消圆角边框
避免复用的时候出错
谢谢你
很棒的库

cell 圆角出现问题

我在 collectionviewcell 中套用了一个横向展示的 collectionview ,当在横向 collectionviewcell 使用 updateCornerRadius 时是生效了,但是,当滑动后,就导致updateCornerRadius 失效了,之前的圆角都没有了,请大佬解惑,目前我还没找到办法解决

ios10 以下 CGContextSetLineWidth(context, 1) 是不是不对?

  • (UIImage *)imageWithQQCorner:(void (^)(QQCorner *))handler size:(CGSize)size {
    QQCorner *corner = [[QQCorner alloc] init];
    if (handler) {
    handler(corner);
    }
    if (!corner.fillColor) {
    corner.fillColor = [UIColor clearColor];
    }
    UIBezierPath *path = qq_pathWithCornerRadius(corner.radius, size);
    if (@available(iOS 10.0, *)) {
    UIGraphicsImageRenderer *render = [[UIGraphicsImageRenderer alloc] initWithSize:size];
    return [render imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) {
    CGContextSetStrokeColorWithColor(rendererContext.CGContext, corner.borderColor.CGColor);
    CGContextSetFillColorWithColor(rendererContext.CGContext, corner.fillColor.CGColor);
    CGContextSetLineWidth(rendererContext.CGContext, corner.borderWidth);
    [path addClip];
    CGContextAddPath(rendererContext.CGContext, path.CGPath);
    CGContextDrawPath(rendererContext.CGContext, kCGPathFillStroke);
    }];
    } else {
    UIGraphicsBeginImageContext(size);
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSetStrokeColorWithColor(context, corner.borderColor.CGColor);
    CGContextSetFillColorWithColor(context, corner.fillColor.CGColor);
    CGContextSetLineWidth(context, 1); <--- here

这里没有使用corner.borderWidth,应该是不对的吧?

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.