CGContextRef context = ();
//设置起始点
CGContextMoveToPoint (context, 160, 100);
CGContextAddLineToPoint (context, 100, 180);
CGContextAddLineToPoint (context, 160, 180);
// 设置边界
[[UIColor blackColor] setStroke];
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.border_box { | |
box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[textfield becomeFirstResponder]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//获取类的方法 | |
+ (void)LogAllMethodsFromClass:(id)obj | |
{ | |
u_int count; | |
//class_copyMethodList 获取类的所有方法列表 | |
Method *mothList_f = class_copyMethodList([obj class],&count) ; | |
for (int i = 0; i < count; i++) { | |
Method temp_f = mothList_f[i]; | |
// method_getImplementation 由Method得到IMP函数指针 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.m | |
// 数据持久化 | |
// | |
// Created by fhefh on 16/3/13. | |
// Copyright © 2016年 fhefh. All rights reserved. | |
// | |
#import "ViewController.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('someUlSelector').delegate('someLiSelector', 'click', function() { | |
//codes... | |
//$(this) for the current jquery instance of the element | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1、 三角函数 | |
double sin (double);正弦 | |
double cos (double);余弦 | |
double tan (double);正切 | |
2 、反三角函数 | |
double asin (double); 结果介于[-PI/2, PI/2] | |
double acos (double); 结果介于[0, PI] | |
double atan (double); 反正切(主值), 结果介于[-PI/2, PI/2] | |
double atan2 (double, double); 反正切(整圆值), 结果介于[-PI, PI] | |
3 、双曲三角函数 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.m | |
// 图片水印 | |
// | |
// Created by fhefh on 16/3/21. | |
// Copyright © 2016年 fhefh. All rights reserved. | |
// | |
#import "ViewController.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// DataBaseHandler.h | |
// 代码:http://www.jianshu.com/p/a02479cc5e15 | |
// | |
#import <Foundation/Foundation.h> | |
#import <sqlite3.h> | |
@interface DataBaseHandler : NSObject | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.m | |
// 图片截屏 | |
// | |
#import "ViewController.h" | |
@interface ViewController () | |
@property (weak, nonatomic) IBOutlet UIImageView *picView; |