以下是完整代码: /*
?*?this?file?is?an?implementation?of?stack
?*?file?name:?stack.c
?*?author:?John?Woods
?*?date:?2015/5/9
?*?statement:?anyone?can?use?this?file?for?a...
分类:
其他好文 时间:
2015-05-09 22:11:36
阅读次数:
161
给分类添加“属性”咱们知道,分类中可以添加方法,却无法添加属性。那咱们有其他的方法来实现吗?
先来看看下面这段代码:@interface UIView (nl_Frame)
@property (nonatomic, assign) CGFloat nl_width;
@end @implementation UIView (nl_Frame)
- (void)setNl_width:(CGFlo...
分类:
其他好文 时间:
2015-05-09 16:31:25
阅读次数:
170
一、面向对象和封装 面向对象的三大特性:封装、继承和多态 在OC语言中,使用@interface和@implementation来处理类。 @interface就好像暴露在外面的时钟表面,像外界提供展示以及接口。@implementation就好像隐藏在时钟内部的构造实现,把具体的实现封装...
分类:
其他好文 时间:
2015-05-08 09:21:53
阅读次数:
213
1 #import "ViewController.h" 2 @interface ViewController () 3 @end 4 @implementation ViewController 5 6 - (void)viewDidLoad { 7 [sup...
分类:
其他好文 时间:
2015-05-07 23:48:42
阅读次数:
128
UIViewController.m 1 #import "ViewController.h" 2 #import "CustomerSlider.h" 3 @interface ViewController () 4 5 @end 6 7 @implementation ViewControl.....
分类:
其他好文 时间:
2015-05-07 23:45:17
阅读次数:
245
1 #import "AppDelegate.h" 2 3 @interface AppDelegate () 4 { 5 UISlider* lider; 6 } 7 8 @end 9 10 @implementation AppDelegate 11 ...
分类:
其他好文 时间:
2015-05-06 21:07:19
阅读次数:
235
/*
?*?this?c?file?is?a?implementation?of?linear?list
?*?author:?John?Woods
?*?date:?2015/5/3
?*?exclaim:?anyone?can?use?the?file?to?any?purpose
?*/
?
#include?<stdio....
分类:
其他好文 时间:
2015-05-06 18:26:04
阅读次数:
325
class implementation{public:~implementation() { std::cout sp1(new implementation());std::cout sp2 = sp1;std::cout<<"The Sample now has "<<sp2.use_cou....
分类:
其他好文 时间:
2015-05-06 17:11:18
阅读次数:
125
@interface PTABabyEditBaseVC ()@property (nonatomic) UIImagePickerController *imagePickerController;@end@implementation PTABabyEditBaseVC- (void)viewD...
分类:
其他好文 时间:
2015-05-06 16:53:39
阅读次数:
97
为什么需要单例模式?为了保持一个类只有一个实例(对象)如何实现代理模式?第一步:全局变量第二步:重写allocwithzone方法第三步:shared*** 方法例子:static XMPPServer *server = nil;@implementation XMPPServer//单例+(X...
分类:
移动开发 时间:
2015-05-06 14:43:45
阅读次数:
104