Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can modify the sample code iPad-Dynamic-Table-Cells for rendering dynamic form in iPhone along with with popover display also </p> <p>Add the below 6 files of project available on git-hub <a href="https://github.com/50pixels/FPPopover">https://github.com/50pixels/FPPopover</a> to your iPad-Dynamic-Table-Cells sample code</p> <p>FPPopoverController.h/.m, FPPopoverView.h/m, and FPTouchView.h/.m</p> <p>Now modify the FPTouchView.m, EditableTableDataRowItem.h and EditableTableDataRowItem.m as below</p> <pre><code>//In EditableTableDataRowItem.h @interface EditableTableDataRowItem : UIViewController &lt;UITableViewDataSource, UITableViewDelegate, UIPopoverControllerDelegate, UITextFieldDelegate,FPPopoverControllerDelegate&gt; { id&lt;EditableTableDataRowItemDelegate&gt; delegate; RowItemControlType itemControlType; // So named to denote that this does not correspond to a UIControl NSArray *controlSelections; // List of items to display for popup control type NSString *listKey; // If controlSelections array contains NSManagedObjects or NSDictionaries, the key to use to get a string to represent the item CGSize baseSize; // Default size of the control, with width relative to other items on the row BOOL resizeable; // Determines whether item can be resized based on row width UIControl *control; // Standard control particular to the type of row item UIImage *normalImage; // Used to customize the appearance of any button-based control type UIImage *selectedImage; // Used to customize the appearance of any button-based control type CGSize originalBaseSize; int state; int selectedIndex; UIPopoverController *optionPopoverController; FPPopoverController *popover; id&lt;FPPopoverControllerDelegate&gt; delegate1; } @property(assign) id&lt;EditableTableDataRowItemDelegate&gt; delegate; @property(assign) id&lt;FPPopoverControllerDelegate&gt; delegate1; @property(nonatomic, retain) FPPopoverController *popover; . . </code></pre> <p>//In EditableTableDataRowItem.m</p> <pre><code>- (IBAction)buttonPressed:(id)sender { [delegate rowItemWasSelected:self]; if (self.itemControlType == ControlTypeToggleButton) { . . . } else if (self.itemControlType == ControlTypePopup) { UITableViewController *popoverTable = [[[UITableViewController alloc] initWithStyle:UITableViewStylePlain] autorelease]; popoverTable.tableView.dataSource = self; popoverTable.tableView.delegate = self; popover = [[FPPopoverController alloc] initWithViewController:popoverTable]; popover.tint = FPPopoverDefaultTint; if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { popover.contentSize = CGSizeMake(300, 500); } else { popover.contentSize = CGSizeMake(200, 300); } popover.arrowDirection = FPPopoverArrowDirectionAny; [popover presentPopoverFromView:sender]; } . . . } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [popover dismissPopoverAnimated:YES]; } </code></pre> <p>//In FPTouchView.m file //Need to handle this method</p> <pre><code>-(UIView*)hitTest:(CGPoint)point withEvent:(UIEvent *)event { UIView *subview = [super hitTest:point withEvent:event]; //To-Do // return subview; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload