내 응용 프로그램에서 UINavigationController
을 사용하고 있으며 어떤 이유로 인해 CompanyView라는 third xib
으로 페이지를 전환 할 수 없습니다. 첫 번째에서 두 번째이지만 세 번째에서 세 번째로 바뀌지 않습니다. 나는 아마 뭔가 잘못하고 있지만 누군가 내 코드를 살펴볼 수 있다면 멋질 것입니다. 나는 내가 믿는 바르게 설정된 버튼을 가지고있다. 다음은보기를 변경하지 않습니다 xib
내 .h file
입니다 :UINavigationController를 사용하여 다른보기로 이동
#import "MenuView.h"
@implementation MenuView
-(IBAction)btnClicked:(id)sender {
CompanyView * companyView = [[CompanyView alloc] init];
companyView.title = @"Company";
[self.navigationController pushViewController:companyView animated:YES];
[companyView release];
}
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)didReceiveMemoryWarning
{
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
#pragma mark - View lifecycle
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:
(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
@end
도움을 줄 수 있습니다. 내 CompanyView.h 및 .m 파일에 추가해야하는 코드가 있습니까? – Maple