Git Product home page Git Product logo

xlform's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xlform's Issues

support ios 6 version

How to make support ios 6 version?
I removed some libraries from pods, but still have lots of error.

Undefined symbols for architecture i386 with NSString XLFormRowDescriptorType in a Swift project

Hi,

I'm using XLForm with Cocoapods in a project developed in Swift and Objective-C.

I tried to use key as XLFormRowDescriptorTypeButton (from XLForm.h) into my Swift files but when I try to compile, I have those errors:

Undefined symbols for architecture i386:
  "_XLFormRowDescriptorTypeButton", referenced from:
      __TFC7MyProject26LoginAccountViewController26_getXLFormTypeForInputTypefS0_FSiGSqSS_ in LoginAccountViewController.o

Any suggestion ?

can i set custom row click event?

hi,
can i set my custom row click event?
i try to set the tableview 'didSelectRowAtIndexPath' delegate,
then all xlform row's click event is can't work.
how can i to do these ?
thanks very much:)

[Enhancement] Move Cell Initialization into Separate Methods

Currently, all the 'setup' code for an XLForm cell is located inside the 'init' methods. This can cause issues when trying to use a category to modify the cell class. Most of the 'init' methods are themselves category methods. As a result, calls to [super initWithX] have no effect.

This issue could be avoided by moving the actual logic of setting up the cell into a separate method call. Categories and Subclasses would then be able to override this method rather than having to override init.

P.S. The 'dealloc' method would also be a good candidate for this type of change.

Disable state on rows not working when changed programmatically

I'm using v2.0.0 and I want to change the disable state of my rows programmatically without reloading the view. But when I do this the rows stay in their previous state. This happens both when I set disabled to YES or to NO.

Once I change the view or scroll the table view down so that some rows are not visible any more and I scroll back then those rows that were invisible for a moment are correctly disabled/enabled.

How can I make everything work without the need to scroll? Any workaround for me to quick-fix this thing? Also I think this is an issue with XLForm and should be fixed within the framework long-term.

Here are three screenshots, when I change the state of the "Availability" switch then all other rows should get enabled/disabled. On the first screenshot everything is fine. On the second I have enabled the switch so everything else should be disabled but it doesn't work. And on the third one you can see the state after scrolling down and up again.

ios simulator bildschirmfoto 08 07 2014 19 06 17
ios simulator bildschirmfoto 08 07 2014 19 06 23
ios simulator bildschirmfoto 08 07 2014 19 06 37

Thank you for your help!

inline date picker with minuteInterval/minimumDate/maximumDate

I need to set min/max dates and an interval for the selection. I can't seem to figure out how to do this with the current master branch. I've added some properties to XLFormDateCell to control these and updated setModeToDatePicker: to set the options on the date picker.

-(void)setModeToDatePicker:(UIDatePicker *)datePicker
{
    if ((([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeDateInline] || [self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeDate]) && self.formDatePickerMode == XLFormDateDatePickerModeGetFromRowDescriptor) || self.formDatePickerMode == XLFormDateDatePickerModeDate){
        datePicker.datePickerMode = UIDatePickerModeDate;
    }
    else if ((([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeTimeInline] || [self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeTime]) && self.formDatePickerMode == XLFormDateDatePickerModeGetFromRowDescriptor) || self.formDatePickerMode == XLFormDateDatePickerModeTime){

        datePicker.datePickerMode = UIDatePickerModeTime;
    }
    else{
        datePicker.datePickerMode = UIDatePickerModeDateAndTime;
    }

    if (self.minuteInterval)
        datePicker.minuteInterval = self.minuteInterval;

    if (self.minimumDate)
        datePicker.minimumDate = self.minimumDate;

    if (self.maximumDate)
        datePicker.maximumDate = self.maximumDate;

}

Then in my form setup I can do this to get the desired effect:

row = [XLFormRowDescriptor formRowDescriptorWithTag:@"ends" rowType:XLFormRowDescriptorTypeTimeInline title:@"Ends"];
row.value = [NSDate dateWithTimeIntervalSinceNow:60*60*25];
XLFormDateCell * dateEndCell = (XLFormDateCell *)[row cellForFormController:self];
dateEndCell.minuteInterval = 15;
dateEndCell.minimumDate = start;

If there is another way to do this without modifying the XLForm code, let me know. If this feature isn't currently supported and my solution seems acceptable to you, I can submit a pull request.

screenshot_835

Reordering Cell

I'm wondering if it has the functionality to reorder the row in a table view, Or you have any plans to do it in near future?

Using the 'Done' and 'Cancel' Buttons with a Storyboard?

This library looks fantastic so far but I'm having trouble figuring out how to add a form to an existing application. The flow I want is user taps a control -> Form is displayed in a Modal dialog with the cancel and done buttons displayed. Since the segue from the main screen to the form dialog is defined in the storyboard, there is no 'hook' where I can manually inititalize the NavigationController class. The 'init' methods of the controller classes never get called when using a storyboard, so how do I set up my form?

Consider wiring in US2FormValidator

We use US2FormValidator internally and have built a number of add-on validations/conditions beyond the framework's extensive built-in options. I highly recommend it as a means of effectively extending XLForm's validation capabilities without a lot of labor.

Crash with "not really" optional protocol methods

the -(void)configureDataManager:(XLFormDataManager *)dataManager; declared in XLFormViewControllerDelegate is optional but no test is made to ensure it exists...

Results in a crash.

Eg: XLFormViewController line 591

Row value assigned too late, otherwise nil

First of all, I'd like to thank you for this wonderful library. Great work 👍

Now about the issue:

Let's say I have a text field cell. Unless the focus moves away from the text field (ie: the keyboard has been dismissed or the user went to the next text field), [[self.form formRowWithTag:@"title"] value] returns nil regardless of the contents of the text field. That would be wrong if the text field's text is not empty. So consider this scenario:

  1. The user taps on the text field
  2. The user enters a value
  3. The user taps on the "Done" button

At this point, there is a problem because the value of the text field is nil even though it shouldn't be.

Transparent Background Color PickerView

If i click on datetime field then the picker shown to me at the bottom of the screen is transparent if i click on any textfield and then go back to any pickerview related field then it's background color changed from transparent to white.

XLFormRowDescriptorTypeSelectorPickerViewInline not available in Version 1.0.1 (current)

I am trying to implement an inline map view with XLForm like in the following screenshot:

bildschirmfoto 2014-06-25 um 18 13 24

But for some reason I can't use the XLFormRowDescriptorTypeSelectorPickerViewInline mode to implement the map inline. There's isn't even an autocompletion for it. Was it removed? Why? I need it here ... thank you for any help. Great framework apart from that! Love it. :)

Autoformatting of typed text in text fields?

It'd be nice to be able to apply autoformatters to text fields.

For example, if I'm typing a phone number, i want 1234567890 to automatically become (123)456-7890.

Or in field with mm/yy have 0119 automatically become 01/19

Button Done in UITextField

Hi,

I would like to set a Done button in an UITextField.

I tried this:

        let row = XLFormRowDescriptor(tag : name, rowType : type)

        row.cellConfigAtConfigure.setObject(placeholder, forKey: "textField.placeholder")
        row.cellConfigAtConfigure.setObject(UIReturnKeyType.Done.toRaw(), forKey: "textField.returnKeyType")
        row.required = !optional

But the XLForm SIGABRT in XLFormRowDescriptor at line 69 in cellForFormController method:

[_cell setValue:value forKeyPath:keyPath];

AFNetworking 1.3.0

XLForm seems to be a great library. I'm not able to use it because RestKit requires AFNetworking 1.3.0 and XLForm minimal 2. Is it possible to support the older AFNetworking version, or a subversion of XLForms without the XLDataLoader?

Where is the Delete button?

I upgraded from 1.0.1 to 2.0.0 and "Delete" button dissapeared.

[self setShowDeleteButton:YES];  is not working?

Whats the current way to manage the dissapeared feature?

Date picker causes crash

Run the demo, select the calendaring event item (first one). Click "starts" and then click the row again to hide. Click the cancel button. Click "Text Field Examples" in the main screen. It will crash all the time in the simulator. Both 32 and 64 bits iOS 7.1

Does XLForm support combo-box type field?

I've played around with this library, and must say it's saved me hours! So, thank you for building this.

I was trying to create a combo-box that allows user to select one of the 50 US states. However, from what I could gather, it seems XLForm does not support a combo-box. Is it something that you can add soon? If not, can you please give me some pointers as to how to implement this on my own?

Thanks!

Not really an issue

Just wanted to say thanks for the library - saved me hours this weekend. I only just realised how recently you released it, so I thought I'd pop in and let you know that I'm using it and it worked really well.

The only issue I've had is with the label for a selector field not updating, but I'll create a proper issue at some point with more details.

Cheers!

initWithCoder support

I'm using segues on my project. Navigation is performed using code like

[self performSegueWithIdentifier:@"editData" sender:self];

And the data to be edited is asigned to destination view controller on the prepareForSeguemethod

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if ([segue.identifier isEqualToString:@"editWorkerProfile"])
    {
        UINavigationController* navController = [segue destinationViewController];
        MyEditorViewController *editorController = (MyEditorViewController *) [navController topViewController];
        editorController.data = dataToBeEdited;
    }
}

The destination ViewController is initialized using "initWithCoder" and form structure is created on the "viewDidLoad" (Because data property is assigned after initialization).

With te "1.0.0" version of XLForm I used a "trick" like this on destination ViewController:

- (id)initWithCoder:(NSCoder*)aDecoder
{
    if(self = [super initWithCoder:aDecoder])
    {
        XLFormDescriptor * form  = [XLFormDescriptor formDescriptorWithTitle:@"work profile"];
        return [super initWithForm:form]; // Second init... it works with XLFrom 1.0.0!!!
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Form content is built after initialization
    [self buildForm: self.form withData: self.data]; 
}

With the actual git XLForm version this code is not working anymore: form appears empty...

¿What's the correct way to use XLForm with storyboard & segues?

Font Size

What's the rationale behind having such a tiny font size for the title and text labels?

I don't know about you but that's basically the only thing that your calendar add event example differs in when compared to the original screen.

Why isn't UIFontTextStyleBody the default value in XLFormDescriptorCell -update methods on your cells instead of UIFontTextStyleHeadline? Should drop the "Bold" trait as well in order to reproduce iOS defaults.

Am I missing something?

new cocoapod pls

Hi there...
Custom rows and step counter are really nice features that solve manually "patches" I actually use over 1.0.0 version... is there any plan to publish as pod a new version?

Thanks a lot

Add a custom row type

I'd like a custom row type added. An object would be provided that could modify the title, provide a textual value for a label or a UIView for the label (given a frame) and then perform an editing operation. Perhaps even validation.

This would obviously allow a developer to implement any type of data input method. You could do an image picker, address picker, etc.

If you are really ambitious, you could implement all existing types as subclasses of this object. I see you have XLFormSwitchCell as a base class, which would be a good start. Then the constants like XLFormRowDescriptorTypeText would just be singletons. Validation would be somewhat easier, since each class could do it's own and users could subclass a text field, say, to do custom validation.

You could, of course, have a list of XLFormValidator objects that are passed to each cell, I guess. You'd need types like XLFormRowDescriptorTypeText to be properties that returned a new instance, then, so the user could easily add validators to various cells.

I hope this makes sense. If you are open to this, I'd be open to helping code this solution.

cannot input chinese charactor

hi martin,
i want to use xlform in my ios app.
this is very easy & helpful to draw complex form.
but when i run the demo.
the text input cannot input chinese.
is there have setting to set this?

thasnk~~

Image Picker

Hi,
Image Picker disappeared in V2.0.
Any plan to bring it back?
Regards

Side by Side Text Fields

Perhaps shorter text fields for things like city and state and zip, or for an expiration date and cvc code. That would be cool.

ButtonCell doesn’t deselect table row

Any way to deselect the table row once a button is pressed. When I press a button, I need to check some other table rows and may not launch a view controller. In that case I open an alert but must also clear the ‘press’ / ‘selected’ state and can’t see how to.
Thx

Updating Row Data

Is there any way to dynamically update the value of a row? I have a project where the data for my form is coming from an asynchronous call which prevents me from simply setting the value of each row during the form creation. My initial thought was to lookup each row by tag after I get my data and set row.value to the appropriate model value. As far as I can tell though, changing 'row.value' doesn't actually update the text in the cell. Is there something I'm missing here or is there simply no way to do this right now?

Send event each time a value is selected in the picker displayed by row of type XLFormRowDescriptorTypeSelectorPickerViewInline

Hi,

First of all, I would like to warmly thanks those which created/contributed to this amazing library !

For my needs, I would like to handle when a user click on a row from the UIPickerView displayed by cell of type XLFormRowDescriptorTypeSelectorPickerViewInline.

After some research of the functioning of the XLFormInlineSelectorCell classe I didn't find any mechanism to allow me to handle the click event of a user on a value inside the UIPickerView.

My question is, should I create a subclass of XLFormInlineSelectorCell and override the update method to send an event to my main viewcontroller or call a delegate method to my main viewcontroller or is there a better way of doing this ?

Thanks !

XLFormButtonCell selected options

If i have button type cell with no buttonViewController set, should the cell default to formRowDescriptorValueHasChanged?

Right now the behavior is present view controller, but if you like to do something that doesn't require another controller how would i get notified. I've tried to use KVO but no such luck.

Thinking of setting self.rowDescriptor.value = nil if buttonViewController not present, but is that there corrent way forward?

row validation is not performed for "unrendered" row cells.

I have a "long" form with one row descriptor marked as required. The row cell is out of visible area.

If I call [self formValidationErrors] after loading, result is an empty array.
If I scroll down until the required row cell is visible and I call [self formValidationErrors], result is the array with the expected NSError object

Ipad Support

How to increase font size and cell size for iPad? in iPad it is looking so small fonts and small row height.

Swift problem

Hi,

I'm new with XLForm. I'm trying to use constant XLFormRowDescriptorTypeSelectorPickerView but I have a compiler error:

Undefined symbols for architecture x86_64:
"_XLFormRowDescriptorTypeSelectorPickerView", referenced from:
_TFC12TrocaTudo30NovaOfertaXLFormViewController13initalizeFormfS0_FT_T in NovaOfertaXLFormViewController.o
ld: symbol(s) not found for architecture x86_64

I have put the imports above in my Bridging-Header.h:

import <XLForm/XLForm.h>

import <XLForm/XLFormViewController.h>

The xCode autocomplete is working fine and all the XLForm's classes are being recognized.

Any tip?

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.