여기에 iPhone 프로그래밍 초보자 용 질문이 있습니다. 기본보기에서 버튼을 눌러 다른보기로 이동하려면 어떻게합니까?iPhone이 버튼을 눌렀을 때 다음보기로 전환하는 방법?
나는 내가 버튼을 누르고, 디버깅 할 때 실행되는 다음 함수는, 그가 거기 통과,하지만 내 "경고"보기가 표시되지 않습니다 있습니다
-(IBAction) showWarningView:(id)sender
{
if(self.showWarning == nil){
WarningViewController *nextView = [[WarningViewController alloc] initWithNibName:@"Warning" bundle:[NSBundle mainBundle]];
self.showWarning = nextView;
[nextView release];
}
[self.navigationController pushViewController:self.showWarning animated:YES];
}
내 주요 RootViewController은 다음과 같습니다 : 나는있는 UITableViewController의 탐색 컨트롤을 사용하고하지만 내가보기 기반 응용 프로그램에서 버튼을 누를 때 단지 내 다른보기를 표시하는 데 사용해야합니까
#import <UIKit/UIKit.h>
#import "WarningViewController.h"
@interface RootViewController : UIViewController {
IBOutlet UIButton *button1;
WarningViewController *showWarning;
}
@property(nonatomic,retain) WarningViewController *showWarning;
-(IBAction) showWarningView:(id)sender;
@end
? 감사합니다.
그래, 우리가 어쨌든 위의 글을 쓴 것은 아니겠습니까? 그가 실제로 그걸 사용하고 싶지 않은 것 같아요. – cssmaniac
@dimitri ye, 더주의 깊게 읽고, 지금 편집 했어야했습니다. – gabtub