mirror of
https://github.com/jialexd/sdk-ameba-v4.0c_180328.git
synced 2026-07-07 20:15:46 +00:00
first add sdk
This commit is contained in:
commit
f91efd1250
3915 changed files with 1291882 additions and 0 deletions
30
tools/uart_adapter/app/iOS/uartadapter/CustomCellBackground.m
Executable file
30
tools/uart_adapter/app/iOS/uartadapter/CustomCellBackground.m
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
Copyright (C) 2015 Apple Inc. All Rights Reserved.
|
||||
See LICENSE.txt for this sample’s licensing information
|
||||
|
||||
Abstract:
|
||||
Custom UIView to draw a rounded blue box to represent a selected cell.
|
||||
*/
|
||||
|
||||
#import "CustomCellBackground.h"
|
||||
|
||||
@implementation CustomCellBackground
|
||||
|
||||
- (void)drawRect:(CGRect)rect
|
||||
{
|
||||
// draw a rounded rect bezier path filled with blue
|
||||
CGContextRef aRef = UIGraphicsGetCurrentContext();
|
||||
CGContextSaveGState(aRef);
|
||||
UIBezierPath *bezierPath = [UIBezierPath bezierPathWithRoundedRect:rect cornerRadius:5.0f];
|
||||
bezierPath.lineWidth = 5.0f;
|
||||
[[UIColor blackColor] setStroke];
|
||||
|
||||
UIColor *fillColor = [UIColor colorWithRed:0.529 green:0.808 blue:0.922 alpha:1]; // color equivalent is #87ceeb
|
||||
[fillColor setFill];
|
||||
|
||||
[bezierPath stroke];
|
||||
[bezierPath fill];
|
||||
CGContextRestoreGState(aRef);
|
||||
}
|
||||
|
||||
@end
|
||||
Loading…
Add table
Add a link
Reference in a new issue