Friday, November 9, 2012

3.Use one UIAlertView to pass the string parameter to display multiple way Alert Message//.





-(void)Show_Alert:(NSString*)strMessage
{
    UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:nil message:strMessage delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
    [alertView show];
}

// some method here

     if ([txtSchDate.text length]==0)
        {
            [self Show_Alert:@"Please select schedule date"];return;
        }
        if ([txtSchStartTime.text length]==0)
        {
            [self Show_Alert:@"Please select Start Time"];return;
        }
        if ([txtSchEndTime.text length]==0)
        {
            [self Show_Alert:@"Please select End Time"];return;
        }


No comments:

Post a Comment