Code Monkey home page Code Monkey logo

mhtextfield's People

Contributors

educosta avatar igotit avatar jrnk avatar mbcrump avatar mehfuzh avatar readmecritic avatar renzet avatar

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

mhtextfield's Issues

Reg Picker Lib

This lib is one feature away from being the best damn thing since sliced bread. It just needs support for a reg picker with custom picker options. If this was a android lib id be all over the contribution , but this is my first week learning ios :/

There is a problem when it calculates whether to scroll up

In your demo project, set scrollview.origin.y = 120, and the emailTextField will be hidden by the keyboard. (I use the 3.5-inch simulator.)

Solution:
In the method - (void)scrollToField,
change
CGRect textFieldRect = _textField.frame;
to
CGRect textFieldRect = [[_textField superview] convertRect:_textField.frame toView:self.window];

bug

iOS 8 issue

Hey Dev,

On iOS 8 this module has some issues with the layout constraints on Auto-layout since the introduction of Quick Type.

Please look into this and thanks in advance.

Cheers,
Amila Fonseka

Regarding Date Field

Select date and click on done.If i want to change selected date then press on date field and get crashed.

Error:-
*** Assertion failure in -[_UIDatePickerView _setDate:animated:forced:], /SourceCache/UIKit/UIKit-2380.17/_UIDatePickerView.m:302

IOS 8.1 placeholder no work

Hi,
I'm using the following code. Unfortunately, the text is not displayed in the placeholder
where am I wrong?

[_userNew setPlaceholder:@"pippooooooo"];
[_userNew setBackgroundColor:[UIColor blueColor]];
[_userNew setValue:[UIColor blackColor]forKeyPath:@"_placeholderLabel.textColor"];

Need a callback for the doneButtonIsClicked event

Hi, guy,

Thank you for your MHTextField. It is wonderful!

We need to capture the event when the done Button is clicked. So would you please to add a callback ( block or delegate is ok) .

Thanks in advance!

bitflying

Regarding Toolbar Next/Previous

Hi,

If I am using MHTextField programatically Like...

For Ex.
DemoTextField* dm =[[DemoTextField alloc] init];
[dm setPlaceholder:@"Krishan"];
[dm setFrame: CGRectMake(20, 645, 300, 40)];
[self.scrlHTText addSubview:dm];

Then toolbar next previous Button not enabled for use as per normal mode using xib/storyboard MHTextField.

Please update this issue so i can use MHTextField.
Thanks ,

Date Regarding

Date type text field should be optional setting for pre enter date in case or requienment.

Close Keyboard programmatically.

Currently the keyboard closes only if you press "Done" button. However, there could be cases where it needs to be closed programmatically.

Fix custom format bug in datePickerValueChagned method.

datePickerValueChanged bug:

//Doesn't check for self.dataFormat

//NOW:

  • (void)datePickerValueChanged:(id)sender{
    UIDatePicker datePicker = (UIDatePicker)sender;

    NSDate *selectedDate = datePicker.date;

    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    [
    dateFormatter setDateFormat:@"MM/dd/YY"];

    [_textField setText:[dateFormatter stringFromDate:selectedDate]];

    [self validate];
    }

WITH FIXED BUG:

  • (void)datePickerValueChanged:(id)sender{
    UIDatePicker datePicker = (UIDatePicker)sender;

    NSDate *selectedDate = datePicker.date;

    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];

    if (self.dateFormat) {
    [dateFormatter setDateFormat:self.dateFormat];
    } else {
    [dateFormatter setDateFormat:@"MM/dd/YY"];
    }

    [_textField setText:[dateFormatter stringFromDate:selectedDate]];

    [self validate];
    }

Please avoid constant colors

In my project textfields backgroundColor is transparent,
tintColor is a custom color.
Disabled state is a custom color...

You can put blocks events and / or delegate methods developers can write logic for their cases. Maybe someone doesn't need to be white/red background or display a message in case a field has invalid value ...

Please review methods:

//********************************************************************
(void)setup {
if ([self respondsToSelector:@selector(setTintColor:)])
[self setTintColor:[UIColor blackColor]];
...
}

//********************************************************************
(BOOL) validate{
self.backgroundColor = [UIColor colorWithRed:255 green:0 blue:0 alpha:0.5];
...
[self setBackgroundColor:[UIColor whiteColor]];
...
}

//********************************************************************
(void)setNeedsBackground
{
if (!_enabled)
[self setBackgroundColor:[UIColor lightGrayColor]];
}

Managing Choices

Great framework.
Is there any plan to support other field element like Choice List ?

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.