03 2015 档案
摘要:#import "MyView.h"@interface MyView (){ CGMutablePathRef pathRef;}@end@implementation MyView-(id)initWithCoder:(NSCoder *)aDecoder{ if (self=[su...
阅读全文
摘要:/**绘制圆形*/ CGContextRef contextRef=UIGraphicsGetCurrentContext(); CGContextAddArc(contextRef, 150, 300, 100, 0, 3.14*2, 0); CGContextStrokePat...
阅读全文
摘要:/**绘制三角形*/ CGContextRef contextRef=UIGraphicsGetCurrentContext(); CGContextMoveToPoint(contextRef, 100, 100); CGContextAddLineToPoint(contex...
阅读全文
摘要:1:首先选中项目WaterDropTest.xcodeproj文件后单击鼠标->输入我们要重新命名的工程名,然后会弹出一个对话框,点击rename按钮2、xcode菜单中选-》product-》scheme->managescheme,3、对工程下面的文件夹重命名4、然后再xcode中在来对该文件夹...
阅读全文
摘要:-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ [UIView transitionWithView:_imageViewFirst duration:1.0f options:UIViewAnimationOp...
阅读全文
摘要:[UIView beginAnimations:nil context:nil]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:_imageViewFirst cache:YES]; ...
阅读全文
摘要:#import "ViewController.h"@interface ViewController ()@property (strong, nonatomic) IBOutlet UIImageView *imageViewFirst;@property (strong, nonatomic)...
阅读全文
摘要:#import "ViewController.h"@interface ViewController ()@property(nonatomic,strong)CALayer *imageLayer;@property(nonatomic,strong)CALayer *maskLayer;@pr...
阅读全文
摘要:#import "ViewController.h"@interface ViewController ()@property(nonatomic,strong)CALayer *imageLayer;@end@implementation ViewController- (void)viewDid...
阅读全文
摘要:#import @interface ProgressView : UIView@property(nonatomic,assign)CGFloat progress;@property(nonatomic,strong)UIColor *layColor;@end#import "Progress...
阅读全文
摘要://创建一个队列 NSOperationQueue *operation=[[NSOperationQueue alloc]init]; //把任务放在NSBlockOperation里面 NSBlockOperation *myOperation=[NSBlockOpe...
阅读全文
摘要:#import @class TTOperation;@protocol TTOperationDelegate -(void)operationComplete:(NSData *)data;@end@interface TTOperation : NSOperation@property(non...
阅读全文
摘要://创建一个队列 NSOperationQueue *operation=[[NSOperationQueue alloc]init]; //把任务放在NSBlockOperation里面 NSBlockOperation *myOperation=[NSBlockOperati...
阅读全文
摘要:#define KURL1 @"http://img0.imgtn.bdimg.com/it/u=79920747,2237302485&fm=90&gp=0.jpg"#define KURL2 @"http://img5.imgtn.bdimg.com/it/u=2983485216,136114...
阅读全文
摘要:1:dispatch_get_global_queue 后台执行队列2:dispatch_get_main_queue 主队列3:dispatch_queue_create("test", DISPATCH_QUEUE_CONCURRENT) 自定义队列:其中第二个参数为DISPATCH_QUE...
阅读全文
摘要:#import "ViewController.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UILabel *remindLabel;@end@implementation ViewController- (v...
阅读全文
摘要:dispatch_queue_t queue=dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dispatch_group_t group=dispatch_group_create(); ...
阅读全文
摘要:#import "ViewController.h"#define IMAGE_COUNT 6@interface ViewController (){ UIImageView *myImageView; int currentIndex;}@end@implementation Vie...
阅读全文
摘要:UIImage *image=[UIImage imageNamed:@"1"]; UIImageView *imageView=[[UIImageView alloc]init]; imageView.image=image; imageView.frame=CGRectMake...
阅读全文
摘要:#import "ViewController.h"#define WIDTH 50#define PHOTO_HEIGHT 150@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad{ ...
阅读全文
摘要:#import "ViewController.h"#define WIDTH 50@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; ...
阅读全文

浙公网安备 33010602011771号