Calling a customized uipopviewcontroller inside the cell


#1

How can i call a customized uipopviewcontroller (uistoryboard) when i double click a particular cell.

thank you.

customized keypad

new form with the need for a customized keypad


#2

Greetings Program!

Try this:

- (void)shinobiDataGrid:(ShinobiDataGrid *)grid didTapCellAtCoordinate:(SDataGridCoord *)coordinate isDoubleTap:(BOOL)isDoubleTap
{
    // find the cell that was edited
	SDataGridTextCell *cell = (SDataGridTextCell*)[shinobiDataGrid visibleCellAtCoordinate:coordinate];
	self.modifyCell = cell;
	
	if ([cell.coordinate.column.title isEqualToString:@"Part/Service"] && isDoubleTap)
    {
			SDataGridRow *row = cell.coordinate.row;
			
			NSLog(@"\n----------------------------------\nRow: %@\nCell: %@\n----------------------------------\n", row, cell);
			
			// The view controller you want to present as popover from the storyboard.
			UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
			PriceListViewController *controller = [storyBoard instantiateViewControllerWithIdentifier:@"PriceListViewController"];
			controller.selectedGridCell = cell;
			controller.delegate = self;
			
			UIPopoverController* popover = [[UIPopoverController alloc] initWithContentViewController:controller];
			popover.delegate = self;
			popover.popoverContentSize = CGSizeMake(320,400);
			
			// Store the popover in a custom property for later use.
			controller.popover = popover;
			
			//Present the popover
			[popover presentPopoverFromRect:cell.frame
									 inView:self.view
				   permittedArrowDirections:UIPopoverArrowDirectionAny
								   animated:YES];
	}
}

Wg


#3

thank you Sir for the reply i have some errors when i tried using your code

1. self.modifyCell = cell; cause an error what do you mean by modifyCell?

2.controller.selectedGridCell = cell; selectedGridCell not found

did i need to import any header file?

thank you


#4

It’s a code snippit from my app as an example of how i do it. Those are properties in my app that are set; you can remove them.

Wg