码迷,mamicode.com
首页 >  
搜索关键字:implementation    ( 1803个结果
UIView动画下
#import "ViewController.h"@interface ViewController (){ UIButton *btn;}@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoa...
分类:其他好文   时间:2015-04-01 16:50:06    阅读次数:120
dispatch_once 单例设计模式
//单例模式 #import "MySingleton.h" @implementation MySingleton - (instancetype) sharedInstance{ static MySingleton *SharedInstance = nil; static dispatch_once_t onceToken; dispatch_on...
分类:其他好文   时间:2015-04-01 13:42:49    阅读次数:127
在类的头文件中尽量少引入其他头文件 <<Effective Objective-C>>
与C 和C++ 一样,Objective-C 也使用“头文件”(header file) 与“实现文件”(implementation file)来区隔代码。用Objective-C 语言编写“类”(class)的标准方式为:以类名做文件名,分别创建两个文件,头文件后缀用.h,实现文件后缀用.m。创建好一个类之后,其代码看上去如下所示: // EOCPerson.h #import <Foun...
分类:其他好文   时间:2015-04-01 09:32:47    阅读次数:133
简单的画板
#import "MyView.h"@interface MyView (){ CGMutablePathRef pathRef;}@end@implementation MyView-(id)initWithCoder:(NSCoder *)aDecoder{ if (self=[su...
分类:其他好文   时间:2015-04-01 00:19:54    阅读次数:114
图灵社团第一次培训(继承和多态)
继承:继承是使用已存在的类的定义作为基础建立新类的技术,新类继承旧类,就可以实用旧类的部分数据。例如实例变量的继承和方法的继承。 旧类Aaa @interfance Aaa:NSObject { int val; } -(int)intVar; @end @implementation Aaa -(int)intVar { var=1000; return var; }...
分类:其他好文   时间:2015-03-31 22:32:00    阅读次数:108
控制器的生命周期
#import "MJOneViewController.h" @interface MJOneViewController () @property (nonatomic, strong) NSArray *apps; @property (nonatomic, strong) NSArray *persons; @end @implementation MJOne...
分类:其他好文   时间:2015-03-31 22:26:45    阅读次数:208
OC入门第一课
OC入门第一课 hello.m(implementation)  hello.c #import  引入头文件 #include import是include的加强版,预处理只要预处理一次 编译链接:clang hello.m -framework Foundation  (-fobjc-arc 用自动引用计数编译)//终端默认为手动引用计数  (-fno-objc-ar...
分类:其他好文   时间:2015-03-31 09:10:08    阅读次数:153
My implementation of AVL tree
C++实现的avl平衡树 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 class AvlNode 10 { 11 public : 12 ...
分类:其他好文   时间:2015-03-31 00:39:12    阅读次数:224
通过layer的contents属性来实现uiimageview的淡入切换
#import "ViewController.h"@interface ViewController ()@property(nonatomic,strong)CALayer *imageLayer;@end@implementation ViewController- (void)viewDid...
分类:其他好文   时间:2015-03-31 00:25:10    阅读次数:166
mysql索引结构原理、性能分析与优化
原文??http://wulijun.github.com/2012/08/21/mysql-index-implementation-and-optimization.html 第一部分:基础知识 索引 官方介绍索引是帮助MySQL高效获取数据的数据结构。笔者理解索引相当于一本书的目录,...
分类:数据库   时间:2015-03-30 23:17:39    阅读次数:548
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!