-
Notifications
You must be signed in to change notification settings - Fork 430
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
RETextItem. Space between label and textField #115
Comments
Coukd you please post code that you're running? |
RETableViewSection *birthSection = [RETableViewSection sectionWithHeaderTitle:NSLocalizedString(@"Birth", nil)];
[_manager addSection:birthSection];
REDateTimeItem *dateOfBirth = [REDateTimeItem itemWithTitle:NSLocalizedString(@"Birth date", nil) value:_person.dateOfBirth placeholder:@"-" format:@"MMM d, y" datePickerMode:UIDatePickerModeDate];
dateOfBirth.onChange = ^(REDateTimeItem *item){
weakSelf.person.dateOfBirth = item.value;
[weakSelf.managedObjectContext save:nil];
};
[birthSection addItem:dateOfBirth];
RETextItem *birthPlace = [RETextItem itemWithTitle:NSLocalizedString(@"Place of Birth", nil) value:_person.placeOfBirth placeholder:NSLocalizedString(@"-", nil)];
birthPlace.clearButtonMode = UITextFieldViewModeWhileEditing;
birthPlace.autocapitalizationType = UITextAutocapitalizationTypeWords;
birthPlace.textAlignment = NSTextAlignmentLeft;
birthPlace.onEndEditing = ^(RETextItem *item){
weakSelf.person.placeOfBirth = item.value;
[weakSelf.managedObjectContext save:nil];
};
[birthSection addItem:birthPlace];
#pragma mark Styling
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
cell.textLabel.textColor = [UIColor colorWithRed:0.091 green:0.561 blue:0.989 alpha:1.000];
cell.textLabel.font = [UIFont systemFontOfSize:14];
} |
Can't understand what is the reason... |
There must be something else in your code that's causing it. |
Did you figure it out? Was the problem in your code or there's a bug? |
No, not yet. I'm pretty sure that there is no problem with my code, however I have suspicion that this problem somehow connected with localisation... |
Can it be that sizeWithFont is using the default text in english instead of the localized text? |
@ericertl Localized text is shown without any problems. |
@romaonthego I can send you the project via Dropbox, so you can check for yourself. I don't have any ideas why is this happens. |
@romaonthego That's weird, but I still can't figure it out what is wrong. P.S.: I don't have any scroll view delegate methods. My first suspicion was on the collection view, which is used as table header view, but I even removed it and got the same results. |
void (^onChange)(RETextItem *item) |
I can't right align the value of item. If I use item.textAlignment, it exactly does what shmidt said. How do you right align the value of the item keeping the title left aligned? Is there a way to do that? |
Same amount of characters for the "Place of birth", written in different languages gives different result:
How can I fix English version?
The text was updated successfully, but these errors were encountered: