#import <Foundation/Foundation.h> @interface Person : NSObject + (instancetype)sharePerson; @end @implementation Person + (instancetype)sharePerson{ P
分类:
其他好文 时间:
2016-01-30 22:55:24
阅读次数:
191
1 // 2 // ViewController.m 3 // HelloWorld 4 // 5 // 6 // 7 #import "ViewController.h" 8 @interface ViewController () 9 @end 10 @implementation ViewCo
分类:
移动开发 时间:
2016-01-30 18:09:59
阅读次数:
234
#import "ViewController.h" @interface SpecialLabel:UILabel @end @implementation SpecialLabel - (CGSize)sizeThatFits:(CGSize)size { CGSize s = [super s
分类:
其他好文 时间:
2016-01-30 01:55:14
阅读次数:
275
在关闭显示的情况下, 可以达到每毫秒3万个的生成速度 /** * An Implementation of Twitter Snowflake ID Generator */ public class SnowflakeId { private final static long EPOCH = 0
分类:
编程语言 时间:
2016-01-29 20:53:08
阅读次数:
308
1 #import "ViewController.h" 2 3 @interface ViewController () 4 5 @end 6 7 @implementation ViewController 8 9 - (void)viewDidLoad { 10 [super viewDidL
分类:
其他好文 时间:
2016-01-29 00:07:19
阅读次数:
190
Quick union算法 Quick union: Java implementation Quick union 性能分析 在最坏的情况下,quick-union的find root操作cost(访问array的次数)会达到N. 所以quick-union的性能也不好。
分类:
编程语言 时间:
2016-01-28 21:05:14
阅读次数:
266
效果图: #import "ViewController.h" #import <POP.h> @interface ViewController () @property (nonatomic, weak) UIView *testView; @end @implementation ViewCo
分类:
编程语言 时间:
2016-01-28 21:00:09
阅读次数:
277
1.触摸事件 1 #import "ViewController.h" 2 @interface ViewController () 3 @property (strong,nonatomic) UILabel *simple; 4 @end 5 6 @implementation ViewCont
分类:
其他好文 时间:
2016-01-27 21:13:46
阅读次数:
119
@interface ViewController (){ CALayer *_layer; CAAnimationGroup *_animaTionGroup; CADisplayLink *_disPlayLink;}@end@implementation ViewController- ...
分类:
其他好文 时间:
2016-01-27 12:49:27
阅读次数:
125
C语言中的函数分为声明和实现其实OC中的类也分为声明和实现OC类声明的格式@interface 类名: 继承的父类{ 成员变量 }方法的声明@endOC类的实现@implementation 类名方法的实现@end//定义一个人的类, 类的成员变量有int 类型的年龄 还有字...
分类:
其他好文 时间:
2016-01-27 00:55:14
阅读次数:
202