当用户从表中选择第一行时出现弹出框?
当用户从弹出窗口中选择任何行时,应将单元格添加到相应的表中,即显示弹出窗口的表?我怎样才能做到这一点?
third = nil;
self.colorPickerPopover = nil;
UITableViewCell *cell= [tableView cellForRowAtIndexPath:indexPath];
CGRect rect=CGRectMake(cell.bounds.origin.x+300, cell.bounds.origin.y+10, 10, 10);
if (indexPath.section ==0) {
if (indexPath.row == 0 ) {
if (third == nil) {
third = [[ThirdViewController alloc] initWithStyle:UITableViewStylePlain];
UINavigationController *controller = [[UINavigationController alloc] initWithRootViewController:third];
self.colorPickerPopover = [[UIPopoverController alloc] initWithContentViewController:controller] ;
[colorPickerPopover setDelegate:self];
[self.colorPickerPopover presentPopoverFromRect:rect inView:cell permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
UIBarButtonItem *closeButton = [[UIBarButtonItem alloc] initWithTitle:@"Close" style:UIBarButtonItemStylePlain target:self action:@selector(cancelClicked)];
[[UINavigationBar appearance] setTintColor:[UIColor darkGrayColor]];
third.navigationItem.leftBarButtonItem = closeButton;
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStylePlain target:self action:@selector(doneClicked)];
[[UINavigationBar appearance] setTintColor:[UIColor darkGrayColor]];
third.navigationItem.rightBarButtonItem = doneButton;
}