-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
feat(iOS): line break mode prop iOS updates to consume new cpp functions #46129
feat(iOS): line break mode prop iOS updates to consume new cpp functions #46129
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this and for splitting the original PR
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
hey @shubhamguptadream11, I was testing the new changes and I'm not sure they work as intended... Also, can we use |
the issue can be due to a recent change we pushed that refactors how we draw the text in |
I verified this behaviour by testing // Create a paragraph style
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
paragraphStyle.lineBreakMode = NSLineBreakByClipping; // Example line break mode
// Create attributes dictionary
NSDictionary<NSAttributedStringKey, id> *attributes = @{
NSParagraphStyleAttributeName: paragraphStyle,
NSFontAttributeName: [UIFont systemFontOfSize:16], // Example font size
NSForegroundColorAttributeName: [UIColor blackColor] // Example text color
};
// Create attributed string with attributes
NSAttributedString *attributedText = [[NSAttributedString alloc] initWithString:self.textField.text attributes:attributes];
// Set attributed text to the text field
self.textField.attributedText = attributedText;
// Set up border
self.textField.layer.borderWidth = 1.0; // Border width
self.textField.layer.borderColor = [UIColor grayColor].CGColor; // Border color
self.textField.layer.cornerRadius = 5.0; // Optional: for rounded corners
// Add the text field to the view
[self.view addSubview:self.textField]; Solution:
I am renaming the Thanks! |
@cipolleschi I already pushed the changes related to renaming. So do you want me to revert it? or you can handle it. |
@cipolleschi merged this pull request in fe941a8. |
Summary:
Solves this issue: #44107
Changelog:
[IOS] [ADDED] - Line break mode for TextInput components. This includes iOS updates to consume new cpp functions.
This PR is a breakdown of this PR.
Test Plan: