UITableView를 화면에 표시할 수 없습니다.
阿神
阿神 2017-04-25 09:03:45
0
2
641

다음 코드에 문제가 있나요?
시뮬레이터에서 데이터를 표시할 수 없습니다. 어떻게 해야 하나요?

"ViewController.h" 가져오기

"ZYStatus.h" 가져오기

@interface ViewController ()
@property(nonatomic,strong)NSArray *status;
@end

@ViewController 구현

-(NSArray *)상태
{

으아악

}

  • (void)viewDidLoad {

    으아악

    }

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

으아악

}

-(UITableViewCell )tableView:(UITableView )tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

으아악

}
@end

가져오기 <Foundation/Foundation.h>

@interface ZYStatus : NSObject

@property(nonatomic,copy)NSString *text;
@property(nonatomic,copy)NSString *icon;
@property(nonatomic,copy)NSString *name;
@property(nonatomic, copy)NSString *그림;
@property(비원자,할당) BOOL VIP;

-(인스턴스 유형)initWithDict:(NSDictionary *)dict;
(인스턴스 유형)statusWithDict:(NSDictionary *)dict;
(NSArray *)array;

@end

"ZYStatus.h" 가져오기

@implementation ZYStatus

-(인스턴스 유형)initWithDict:(NSDictionary *)dict
{

으아악

}
(instancetype)statusWithDict:(NSDictionary *)dict
{

으아악

}

(NSArray *)배열
{

으아악

}

@end

阿神
阿神

闭关修行中......

모든 응답(2)
给我你的怀抱

NSArray *array1 = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"statuses" ofType:“plist”]];

给我你的怀抱

NSArray *array1 = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"statuses" ofType:"plist"]];
파일을 구문 분석할 때 pathForResource 뒤에 파일 이름 "statuses", ofType이 옵니다. 그 뒤에는 파일 접미사 "plist"가 옵니다

최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿