-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix(ios): use auto layout to respect safe areas #1099
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
base: master
Are you sure you want to change the base?
Conversation
- Generated-by: XCode 26, GPT-5
- GPT-5 added this, but this plugin supports minimum cordova-ios 6 which supports minimum iOS 11, so this code is not necessary
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.
I tested this with
cordova.InAppBrowser.open('https://www.apache.org', '_blank', 'location=no,toolbarposition=top')
It seems to have some spaces at the bottom. Is this expected?
|
Thanks for posting this. There should be no gap at the end. I will fix this. |
- Constrain WebView to view bottom, when the address bar is hidden and the toolbar is at top - Handle case, when toolbar is hidden - Add contraints to spinner - Remove code which was related to manual layout - Don't set height manual for toolbar and adresslabel, let auto layout decide. This aligns the toolbar better on iOS 26 with the new button layout.
|
@johann9898 I fixed this. The WebView stretches now to the bottom edge of the phone |
|
@dpogue Is this ok to merge? |
|
@dpogue I see my IDE Visual Studio Code uses LF for line endings and not CRLF. Is there a rule, which one is to use for this project or does it not matter? |
Leave it as LF. We do not use CRLF. |
|
@erisu Ok, I thought this was the thing you mentioned when I changed the package.json in cordova-ios |
LF and CRLF refer to the types of line breaks used by different operating systems. For example, Linux and macOS use LF ( What I commented on last time was the removal of the trailing newline at the end of the file. Cordova repos generally keep a trailing newline at the end of the file. |
Thank's for the clarification. So I know, that every file has to end with an empty new line. I will keep this in mind in future changes. |
dpogue
left a comment
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.
Missing a trailing line break and there are a few weird formatting changes, but the implementation looks okay otherwise
All Cordova project files have to end with an empty new line
I added the trailing line brake.
Can you explain, what you mean with these |
|
@dpogue I would merge this now, is this ok? |
dpogue
left a comment
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.
This is probably fine to merge.
The "weird formatting" I saw was stuff entirely unrelated to the safe area insets that seemed inconsistent with the code style for the rest of the project, like
- (void)goBack:(id)sender
{
[self.webView goBack];
}changing to
- (void)goBack:(id)sender {
[self.webView goBack];
}
How it looks before and now:
iOS 18.5
iOS 26
Platforms affected
Motivation and Context
Description
Testing
Checklist
(platform)if this change only applies to one platform (e.g.(android))