.h .m 및 xib 파일을 함께 만들어야하나요? 그것은 권위가 있습니까? xib 파일이없는 클래스 생성
내가 나중에 TextAudioViewController.xib을 추가 TextAudioViewController 클래스에 관련. 각 콘센트를 추가했습니다.ViewDidLoad에 오류가 없습니다. 그러나 TabBar를 탭하면보기가 여전히 비어 있습니다.
모든 파일을 함께 만들지 않았기 때문에 그럴지 모르겠습니다. xib와 클래스 파일 사이에 누락 된 링크가 있습니까? 다른 클래스와
, 내가 함께 .H하는 .m 및 XIB를 생성하고 뷰가 성공적으로 ... TabBar의 공략 후로드
당신이 작성해야 할 필요는 없다
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
if (self.tabBarController == nil)
{
NSArray* languages = [NSLocale preferredLanguages];
NSString* currentLang = [languages objectAtIndex:0];
NSString* path = @"";
if ([currentLang isEqual: @"en"] || [currentLang isEqual: @"fr"] || [currentLang isEqual: @"es"])
{
path = [[NSBundle mainBundle] pathForResource:currentLang ofType:@"lproj"];
}else{
path = [[NSBundle mainBundle] pathForResource:@"en" ofType:@"lproj"];
}
selectedBundle = [NSBundle bundleWithPath:path];
[self startApplication];
}
return YES;
}
컨트롤러를 initWithNibName :으로 초기화하고 nib name을 매개 변수로 전달 했습니까? –
나는 그것을 좋아했다 : TextAudioViewController * textAudioController = [[TextAudioViewController alloc] init]; TextAudioViewController의 pageViewController –
에 추가합니다. initWithNibName을 사용하지만 매개 변수가 비어 있습니다. –