2014-11-21 2 views
0

Я создаю приложение, в котором я хочу показать uialert view. Я даю NSLocalized строку для этого uialertview. Но моя строка Nslocalized не отображается в uialertview, появляется только пустой вид предупреждения. я неспособен understaand чем проблема ниже мой код:NSlocalized string не отображается на uialert view

if(!self.transporterCompanyName_.text || [self.transporterCompanyName_.text isEqualToString:@""] || !self.transporterLastName_.text || [self.transporterLastName_.text isEqualToString:@""] || !self.transporterFirstName_.text || [self.transporterFirstName_.text isEqualToString:@""] || !self.transporterEmail_.text || [self.transporterEmail_.text isEqualToString:@""] || !self.transporterTelNo_.text || [self.transporterTelNo_.text isEqualToString:@""] || !self.transporterUserName_.text || [self.transporterUserName_.text isEqualToString:@""] || !self.transporterPassword_.text || [self.transporterPassword_.text isEqualToString:@""] || !self.transporterConfirmPassword_.text || [self.transporterConfirmPassword_.text isEqualToString:@""]){ 

     [FBMessageHandler displayAlertMessageWithOkButton:NSLocalizedString(@"All text fields are mandatory. Please fill the complete form and then submit!", @"incomplete reg form") backgroundImage:nil tag:0 andDelegate:self addInQueue:NO andParentViewController:self]; 

     return; 
    } 

вот мой FbMessageHandler

+ (void)displayAlertMessageWithOkButton:(NSString *)message backgroundImage:(NSString*)bImage 
            tag:(int)tagValue 
          andDelegate:(id)delegate addInQueue:(BOOL)queue andParentViewController:(UIViewController *)viewController 
{ 
    FBAlertViewController *alert = [[FBAlertViewController alloc] initWithNibName:@"FBAlertWithOkOption" andMessage:message backgroundImage:bImage tag:tagValue andDelegate:delegate addInQueue:queue buttonText:nil]; 
    [viewController addChildViewController:alert]; 
    [viewController.view addSubview:alert.view]; 
    [alert didMoveToParentViewController:viewController]; 
    alert = nil; 
} 

Thanx заранее

+0

вашего предупреждения вида не в порядке, проверьте, что «сообщение» есть приходит в пустом или нулевом .. –

+0

сообщения не приходит пустой или пустой –

+0

'NSLog' вашего LocalizedString. – NeverHopeless

ответ

0

просто попробовать этот

[FBMessageHandler displayAlertMessageWithOkButton:NSLocalizedString(@"All text fields are mandatory. Please fill the complete form and then submit!", @"incomplete reg form") backgroundImage:nil tag:0 andDelegate:self addInQueue:NO andParentViewController:self]; 

в

[FBMessageHandler displayAlertMessageWithOkButton:NSLocalizedString(@"All text fields are mandatory. Please fill the complete form and then submit!, incomplete reg form") backgroundImage:nil tag:0 andDelegate:self addInQueue:NO andParentViewController:self]; 

выбор нет 2

NSString *msgstr=[NSString stringWithFormat:@"All text fields are mandatory. Please fill the complete form and then submit!,incomplete reg form"]; 


    [FBMessageHandler displayAlertMessageWithOkButton:msgstr backgroundImage:nil tag:0 andDelegate:self addInQueue:NO andParentViewController:self]; 
+0

помог :) thanx :) –

Смежные вопросы