h文件
#import <Foundation/Foundation.h>
@interface ApisTest : NSObject{
}
-(void)htest;
@end
m文件
#import 'ApisTest.h'
@interface ApisTest(Private)
-(void)mtest;
@end
@implementation ApisTest
-(void)mtest
{
}
-(void)htest
{
加载中…
加载中…
加载中…
加载中…
加载中…h文件
#import <Foundation/Foundation.h>
@interface ApisTest : NSObject{
}
-(void)htest;
@end
m文件
#import 'ApisTest.h'
@interface ApisTest(Private)
-(void)mtest;
@end
@implementation ApisTest
-(void)mtest
{
}
-(void)htest
{
来自:http://www.cnblogs.com/xincdm/archive/2011/08/15/2130763.html
声明property的语法为:@property(属性 [, 属性2, ...]) 类型
名称;
属性分为3类:
1.读写属性(Writability)包含:readwrite / readonly
2.setter语义(Setter Semantics)包含:assign / retain / copy
3.原子性(Atomicity)包含:nonatomic
下面具体说明各个属性的含义
readwrite / rea
#import <UIKit/UIKit.h>
@interface MainView : UIViewController
{
}
-(IBAction)push:(id)sender;
@end
MainView.m
#import 'MainView.h'
#import 'SecondView.h'
@implementation MainView
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
@interface Test : NSObject
{
}
@property (getter = getStr, retain) NSString* strTest;
@end
。m
-(void)setStrTest:(NSString *)strTest
{
}
-(NSString*)getStr
{
-(long)fileSizeForDir:(NSString*)path//计算文件夹下文件的总大小
{
随机取20个
select