iOS开发之自定义一个单例这里我使用宏:// .h#define single_interface(class) + (class *)shared##class;// .m// \ 代表下一行也属于宏// ## 是分隔符#define single_implementation(class) \s...
分类:
移动开发 时间:
2015-04-24 22:27:09
阅读次数:
214
这是一个仿照网易客户端侧栏效果(demo),用最简单的方法实现,以下只是一部分代码:有兴趣的同学可以到gitHub下载,下载地址:demo
#import "ViewController.h"
#import "BSYItem.h"
#import "BSYView.h"
@interface ViewController ()
@end
@implementation...
分类:
移动开发 时间:
2015-04-22 15:17:02
阅读次数:
189
push的时候隐藏底部的tabbar#import"mainNavigationControllers.h"@interface mainNavigationControllers ()@end@implementation mainNavigationControllers- (void)view...
分类:
其他好文 时间:
2015-04-22 11:25:02
阅读次数:
137
From a code point of view, Equinox is an implementation of the OSGi core framework specification,...
分类:
其他好文 时间:
2015-04-22 09:35:41
阅读次数:
144
这个方法不常用,容易被忽略,但是用起来还是蛮方便的@implementation HMAdViewController- (void)viewDidLoad{ [super viewDidLoad]; // 1.背景图片 UIImageView *bg = [[UIImageView all...
分类:
其他好文 时间:
2015-04-21 20:18:38
阅读次数:
98
NILFS(new implementation of a log-structured file system )可以像版本控制软件一样做到对文件读写版本的控制,它可以以快照的方式保存某个时刻写在磁盘上的内容,并且可以在任意时刻回到以前的某个版本,虽然它的功能并没有版本控制软件那样强大,但是它一定程度的提升了应用程序写磁盘的效率(缩短了查找磁盘的时间),并且每一次读写都有记录,这样即使在系统宕机时也可以很快恢复系统宕机前的数据,很值得学习。...
分类:
其他好文 时间:
2015-04-21 16:10:56
阅读次数:
121
OC中定义类 1 // 设计一个车类 2 @implementation Car : NSObject 3 // 这个大括号里面写所有的属性 4 { 5 @public 6 int wheels ;//轮子个数 7 double speed;//时速 8 9 }10...
分类:
移动开发 时间:
2015-04-21 00:11:36
阅读次数:
177
#import "ViewController.h"
#import
@interface DataModel : NSObject
@property (nonatomic,copy)NSString *stockName;
@property (nonatomic,assign)float price;
@end
@implementation DataModel
@end
...
分类:
移动开发 时间:
2015-04-20 18:33:54
阅读次数:
148
#import "ViewController.h"
@interface
ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
// UIActivityIndicatorView
等待旋转
...
分类:
其他好文 时间:
2015-04-20 15:05:01
阅读次数:
143
成员变量作用域
/**
*
* @public : 在任何地方都能直接访问对象的成员变量
* @private : 只能在当前类的对象方法中直接访问(@implementation中默认是@private)
* @protected : 可以在当前类及其子类的对象方法中直接访问 (@interface中默认就是@protected)
* @package : 只要处在同一个框架中,就能直...
分类:
其他好文 时间:
2015-04-19 08:55:33
阅读次数:
138