小编fre*_*nnn的帖子

CGContextSetLineWidth(context,1) - 宽度几乎总共至少2个像素而不是1

CGContextSetLineWidth(context, 1)宽度为几乎alwayas至少2个像素代替1-

QQCandleStickLayer.m

-(id)init
{
    self = [super init];
    if(self != nil)
    {       
        self.delegate = self;       
        self.opaque = NO;       
    }
    return self;
}

- (void)drawLayer:(CALayer*)layer inContext:(CGContextRef)context{

    CGContextSetLineWidth(context, 1.0f);
    CGContextSetAllowsAntialiasing(context, false);
    CGContextSetShouldAntialias(context, false);
    CGContextSetInterpolationQuality(context,kCGInterpolationNone);
    CGContextSetShadowWithColor(context, CGSizeMake( 0.0, 0.0 ), 0, NULL);


    CGContextMoveToPoint(context, self.bounds.origin.x+30.5f, self.bounds.origin.y+self.bounds.size.height-indent);
    CGContextAddLineToPoint(context, self.bounds.origin.x+30.5f, self.bounds.origin.y+self.bounds.size.height-(self.bounds.size.height-lastY)); 
    CGContextClosePath(context);
    CGContextSetRGBStrokeColor(context, 119.0f/255, 119.0f/255, 119.0f/255, 1.0);
    CGContextStrokePath(context);
}
Run Code Online (Sandbox Code Playgroud)

QQDefluviumLayer.m

- (void)drawLayer:(CALayer*)layer inContext:(CGContextRef)context{  
    UIImage *myDefluvium = [UIImage imageNamed:@"delfluviumNewRotatedSmall.png"];
    CGLayerRef layerCircle = CGLayerCreateWithContext(context, myDefluvium.size,NULL);
    if (layerCircle)
    {
        CGContextRef layerContext = CGLayerGetContext(layerCircle);
        CGContextDrawImage(layerContext, (CGRect){ CGPointZero, …
Run Code Online (Sandbox Code Playgroud)

iphone quartz-graphics

13
推荐指数
2
解决办法
7932
查看次数

为什么AVAudioPlayer会在应用程序来自后台模式后自动继续播放?

为什么AVAudioPlayer会在应用程序来自后台模式后继续播放,即使在应用程序进入后台之前播放器已暂停?

通常我想知道为什么AVAudioPlayer会在应用程序来自后台后自动继续播放(因为当应用程序进入后台时 - 我无法像AVAudioPlayer和AVAudioSession的其他代表那样捕获beginInterruption).ps:对不起我的英文:)

iphone background avaudioplayer avaudiosession

9
推荐指数
1
解决办法
1004
查看次数