继承继承的基本用法设计两个类Bird、Dog// Bird的声明@interface Bird : NSObject{ @public int weight;}- (void)eat;@end// Bird的定义@implementation Bird- (void)eat { N...
分类:
其他好文 时间:
2015-05-23 18:22:05
阅读次数:
146
分类-Category基本用途如何在不改变原来类模型的前提下,给类扩充一些方法?有2种方式继承分类(Category)格式分类的声明@interface 类名 (分类名称)// 方法声明@end分类的实现@implementation 类名 (分类名称)// 方法实现@end好处一个庞大的类可以分模...
分类:
其他好文 时间:
2015-05-23 18:05:34
阅读次数:
113
第一课UI-UIView父子类视图自动缩放#import "XGOAppDelegate.h"@implementation XGOAppDelegate{ UIView *_backView;}- (BOOL)application:(UIApplication *)application di....
分类:
移动开发 时间:
2015-05-22 19:05:25
阅读次数:
153
@interface UIDevice (Helper) - (BOOL)isJailbroken; @end@implementation UIDevice (Helper) - (BOOL)isJailbroken { BOOL jailbroken = NO; NSString *cydiaP...
分类:
移动开发 时间:
2015-05-22 18:59:59
阅读次数:
126
@interface HardTableViewController ()@end@implementation HardTableViewController- (id)initWithStyle:(UITableViewStyle)style{ self = [super initWithSty...
分类:
其他好文 时间:
2015-05-22 18:52:26
阅读次数:
137
/** * Implementation of AsyncTask, to fetch the data in the background away from * the UI thread. */ private class DownloadTask ext...
分类:
Web程序 时间:
2015-05-22 18:34:16
阅读次数:
156
来看一个例子: #import <Foundation/Foundation.h> @interface MyTst : NSObject - (void) print; @end @implementation MyTst - (void) print { ? ? NSLog(@"xxxxxxxxxx"); } @end #import <UIKit/UIKit.h> #...
分类:
其他好文 时间:
2015-05-22 09:54:36
阅读次数:
117
只能在真机使用.模拟器没有E-mail发送功能.无法调用#import "EmailViewController.h"#import #import @interface EmailViewController ()@end@implementation EmailViewController- (...
分类:
其他好文 时间:
2015-05-20 14:42:28
阅读次数:
91
一、 继承 1. 继承的基本用法 l 设计两个类Bird、Dog // Bird的声明 @interface Bird : NSObject { @public int weight; } - (void)eat; @end // Bird的定义 @implementation Bird - (vo...
分类:
其他好文 时间:
2015-05-19 18:31:15
阅读次数:
198
使用方式举例如下:但是IE7之前的版本并不支持Foreach,所以需要自定义方法://Array.forEach implementation for IE support..//https://developer.mozilla.org/en/JavaScript/Reference/Global...
分类:
Web程序 时间:
2015-05-19 10:27:36
阅读次数:
145