찾다

 >  Q&A  >  본문

UITableView를 화면에 표시할 수 없습니다.

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

"ViewController.h" 가져오기

"ZYStatus.h" 가져오기

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

@ViewController 구현

-(NSArray *)상태
{

으아악

}

-(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

阿神阿神2846일 전647

모든 응답(2)나는 대답할 것이다

  • 给我你的怀抱

    给我你的怀抱2017-04-25 09:05:45

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

    회신하다
    0
  • 给我你的怀抱

    给我你的怀抱2017-04-25 09:05:45

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

    회신하다
    0
  • 취소회신하다