How do I pin an image to the left or right edge of the screen?
I have an image with an aspect ratio similar to the iPhone 15. In my code I use NSLayoutConstraint
for image with top
, bottom
, trailing
, leading
constraints anchored for device screen sides and adjust the appearance of the image with scaleAspectFill
. In this case, I see almost my entire image, regardless of the device. Even when I use the iPhone SE 1st generation, I lose small parts of the image on the left and right sides. But this is a small part (5% of the image) and that suits me. But when I use iPad I lose (30-40% of image) due to different aspect ratio compared to iPhone. So I want to be able to pin the image to the left or right side of the screen when using the iPad. Then I will lose part of the image on only one side. This is the best way for me. But if I try to use NSLayoutConstraint
with top
, bottom
, trailing
, leading
constraints and adjust the appearance of the image with scaleAspectFill
, my image is centered. How to pin an image to the left or right side for iPad?
Custom iOS Keyboard Not Displaying System Keyboard After Resetting inputView
I’m building a custom iOS keyboard using UIInputViewController. I want to toggle between my custom keyboard (with a custom view and accessory view) and the system keyboard (default QWERTY). However, when I try to reset inputView to show the system keyboard, I get a blank view instead.
Custom iOS Keyboard Not Displaying System Keyboard After Resetting inputView
I’m building a custom iOS keyboard using UIInputViewController. I want to toggle between my custom keyboard (with a custom view and accessory view) and the system keyboard (default QWERTY). However, when I try to reset inputView to show the system keyboard, I get a blank view instead.
How to wait for response of an async function in Swift
When running the following code, my function returns empty array for the function fetchProfilesForList
.
Why can’t I remove a widget family from iOS app
While noodling around with widgets I added a .systemMedium type. I have not been able to make it look good so I removed it from my code in three places
Swift: Escaping closure captures non-escaping parameter ‘onCompletion’
I have a problem with my swift. I am trying to send an API request and then retrieve data but I get the following error message:
Swift 6 iOS 18 fix small sheets?
Update to Swift 6 iOS 18 and .sheet
is now presented as small compared to previous versions on the iPad. I attempted to fix with the modifier .presentationDetents([.large], selection: $selectedDetent)
to set the sheet size .large
, but it didn’t work. I’m wondering if there’s an easy way to have the sheets display how they use to.
IOS App’s Document Folder No Longer Accessible from Files App After iOS 18 Update
After updating iOS 18, I noticed that the my app’s document folder is no longer accessible from the Files app. However, the files are still visible when I check the app’s storage in the settings under “Documents.” This issue does not occur on iOS 17, where the app’s document folder is accessible without any problems.
Problems with SensorKit data calls
The Deligate ‘didFetchResult’ method of fetching data past 24 hours from SensorKit is not being called. It is confirmed that you have already granted full access to the SensorKit and that data on the Ambient value in the device’s personal information -> research sensor & usage data are recorded.
Problems with SensorKit data calls
The Deligate ‘didFetchResult’ method of fetching data past 24 hours from SensorKit is not being called. It is confirmed that you have already granted full access to the SensorKit and that data on the Ambient value in the device’s personal information -> research sensor & usage data are recorded.