How to add a UITableView inside the UIAlertView in iPhone?

后端 未结 5 1257
无人共我
无人共我 2020-12-10 17:17

I want to add the UITableView inside the alert view.

I have tried to add a table view as a sub view of alert view, it\'s not working. Can you give me so

5条回答
  •  孤城傲影
    2020-12-10 18:12

    Its working in my case

    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"title" message:@"click for submission \n\n\n\n "delegate:self  cancelButtonTitle:@"click for submission"
    otherButtonTitles:nil];
    
        table = [[UITableView alloc]initWithFrame:CGRectMake(10, 40, 264, 120)];
        table.delegate = self;
        table.dataSource = self;
        [alert addSubview:table];
    
        [alert show];
    
        [table release];
    
        [alert release];        
    

提交回复
热议问题