Commit Graph

18 Commits

Author SHA1 Message Date
Sasha Weiss
d267ec8305
Run swiftformat . 2025-12-30 11:34:05 -08:00
Igor Solomennikov
3618969472
Add convenience methods for setting up standard full-screen static views.
method to put provided views into a vertical stack view.
• method to put provided buttons into a vertical stack view.

All these would allow me to update reg flow screens to look the same without specifying layout metrics multiple times.
2025-10-15 12:34:17 -07:00
Igor Solomennikov
cefb46b871
Introduce OWSViewController.contentLayoutGuide.
Designed to define reference area for static content that works well across all devices and interface orientations.
2025-10-15 12:31:25 -07:00
Igor Solomennikov
78d035cceb Revert "Introduce OWSViewController.contentLayoutGuide."
This reverts commit 4d1c77b2f4.
2025-10-09 17:46:00 -07:00
Igor Solomennikov
4d1c77b2f4 Introduce OWSViewController.contentLayoutGuide.
Designed to define reference area for static content that works well across
all devices and interface orientations.
2025-10-09 17:44:58 -07:00
Igor Solomennikov
af48dd5186
Workaround for dysfunctional UIKeyboardLayoutGuide on iOS 15.
• bring back keyboard frame tracking to OWSViewController if running on iOS 15.
• add our own layout guide to OWSViewController that is updated based on keyboard frame notifications on iOS 15; on newer iOS versions it's a proxy to view.keyboardLayoutGuide.
• use OWSViewController.keyboardLayoutGuide where needed.
• in media composer screen (not OWSVIewController subclass) we already track keyboard frame - use that to position bottom toolbar on iOS 15.

I have also discovered that profile avatar editing screen was somewhat broken on older (15, 16) iOS versions. Fixed that here.
2025-10-02 10:12:45 -07:00
Igor Solomennikov
ac2a39c09a
Remove keyboard frame tracking from OWSViewController.
Let individual view controllers do the layout using (relatively) new UIView.keyboardLayoutGuide.
2025-09-23 12:03:32 -07:00
Max Radermacher
e95139e935
Prefer Swift-native type over Obj-C variant 2023-11-15 19:08:22 -06:00
Sasha Weiss
f983a18940
Add a hook to OWSViewController for contentSizeCategoryDidChange 2023-06-15 13:26:55 -07:00
Igor Solomennikov
0686b39547 Add necessary imports to Swift files.
Those would be required for future PRs.
2023-06-13 14:46:12 -07:00
Igor Solomennikov
c054f3de91
Remove unnecessary "@objc" in SignalUI. 2023-05-16 16:39:19 -07:00
Igor Solomennikov
bb2b665f6f
Convert Theme to Swift. 2023-05-02 12:49:36 -07:00
Harry
7daed0ae2f
typo fix
Co-authored-by: Utsav Dave <utsavdave1997@gmail.com>
2023-04-24 10:30:09 -07:00
Harry Sanabria
fe96c75920 Apply rotation+keyboard updates properly in OWSViewController 2022-11-09 08:51:39 -06:00
Harry
5a42e0e608
A few stories fixes
This change:

- Ensures that the tab bar stays hidden when disabling stories from
  within the stories tab
- Updates the keyboard constraint when orientation changes
- Updates the stories search bar constraint to never resize the safe
  area layout guide
2022-11-07 14:31:37 -06:00
Harry
c745f9a6ae
Refactor OWSViewController
* Remove the useless shouldUseTheme

* Remove the useless shouldBottomViewReserveSpaceForKeyboard

* Add ViewControllerLifecycle

* Use more sensible constraints for keyboard layouts

* Consistent theme updates. themeDidChange is what you subclass, applyTheme is each class' internal application of theme changes, if needed

* Add app lifecycle hooks

* pr feedback

* pass through touches on the keyboard layout view(s)

* fix lint
2022-11-03 13:12:13 -07:00
Evan Hahn
f07735f706 Precommit script should fail if lint fails
This change should have no user impact.

I thought I did this in 1b00741b6d7dbfbe48e5b1c46f856902d0e6d02a...this
*actually* does it.
2022-10-28 15:51:02 -07:00
Harry
5865a0a478
Translate OWSViewController to swift 2022-10-28 10:24:55 -07:00