Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

row.cellClass and row.action.viewControllerClass are mutually exclusive? #727

Closed
romanr opened this issue Feb 11, 2016 · 2 comments
Closed

Comments

@romanr
Copy link
Contributor

romanr commented Feb 11, 2016

I have custom row and custom row action controller at the same time.
If I add customCell to the row, the action.ViewControlelrClass is not called anymore on row select.

Once you set cellClass XLForm don't perform row action anymore and expect it to be done by customCell?

Do I have to perform initialization and display of action.viewControllerClass manually from my CustomCell?

row = [XLFormRowDescriptor formRowDescriptorWithTag:@"item" rowType:rowTypePopoverPush title:@"Item"];
row.cellClass = [ItemCell class];
row.action.viewControllerClass = [Picker class];
[section addFormRow:row];

ItemCell:

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.textLabel.text=@"Item";
    }
    return self;
}

- (void)configure
{

}

- (void)update
{


}
@mats-claassen
Copy link
Member

Hi,
Yes you have to do it manually. The XLFormButtonCell does it for example but it is not an inherited feature.

@romanr
Copy link
Contributor Author

romanr commented Feb 12, 2016

That should be mentioned in Custom Cell Class chapter of documentation. I spent hours trying to understand why nothing happens when you tap custom cell.

mats-claassen added a commit that referenced this issue Jun 1, 2016
updated readme with some comments. Fixes #771, fixes #727, fixes #696
markrickert added a commit to markrickert/XLForm that referenced this issue Sep 29, 2016
* master: (27 commits)
  Add property in XLFormTextViewCell to limit number of characters
  Add property in XLFormTextFieldCell to limit number of characters
  change XLFormUnspecifiedHeight constant to not collide with Automatic dimension
  datePicker.locale property public to developer,for example, _birthdayRow = [XLFormRowDescriptor formRowDescriptorWithTag:kBirthdayTag rowType:XLFormRowDescriptorTypeDateInline title:@"Birthday"]; [_birthdayRow.cellConfig setObject:[[NSLocale alloc] initWithLocaleIdentifier:@"en"] forKey:@"locale"];
  Refactored '-(id)init' to '- (instancetype)init'
  Update 'initializeForm' example.
  Update pod badge
  [fixes xmartlabs#452] respect the currentLocale when parsing decimal values
  Remove the fix for suppressing "Empty snapshot" warnings when presenting action sheets
  Updated code to actually use the optionTitle variable
  Fixed selector action sheet to use the row's value transformer
  update pod version
  added count to empty check. Helpful to validate multiple selectors being empty
  Fix decimal number formatting. closes xmartlabs#514
  Added height property to XLFormRowDescriptor
  updated readme with some comments. Fixes xmartlabs#771, fixes xmartlabs#727, fixes xmartlabs#696
  Add support for NSFormatter
  Do validation can be nullable. fixes xmartlabs#705
  fix crash when using cell style Value2. closes xmartlabs#770
  Fix when the textFieldPercentage is applied. Closes xmartlabs#776
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants