응용 프로그램을 컴파일 할 때 제목에 언급 된 오류가 발생합니다. 이 오류를 어떻게 해결할 수 있습니까? 기본적으로, 나는 한 테이블에서 다른 테이블로 가고 싶다. 계층 구조, 탐색.iPhone : 오류 : 구조체 또는 공용체가 아닌 무언가에 'table'멤버 요청
NextViewController.m
#import "RootViewController.h"
#import "NextViewController.h"
@implementation NextViewController
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
// Release anything that's not essential, such as cached data
}
- (void)dealloc {
[super dealloc];
}
- (IBAction) changeTable:(NSString *)str{
tblCSS.table = str;
}
은 마지막 줄은 오류가 있습니다.
더 많은 코드가 필요하면 질문하십시오. 이 게시물을 수정 해 드리겠습니다.
건배, 잭
NextViewController.h는
#import <UIKit/UIKit.h>
@interface NextViewController : UIViewController {
IBOutlet UITableView *tblCSS;
}
- (IBAction) changeTable:(NSString *)str;
@end
'tblCSS'를 정의하는 헤더 (.h 파일)에 대한 코드를 게시해야합니다. 그것은 당신의 문제가있는 곳입니다. – TechZen
.h –
으로 업데이트 된 게시물 UITableView에는 'table' 속성이 없습니다. 뭐하고 싶어? – kennytm