Category "ios"

UIRefreshControl not showing in landscape when in a navigation controller with large titles

I have a plain UITableViewController embedded in a UINavigationController which prefers large titles. I added a refresh control to my table view controller. On

How to show MPMediaItem Artwork in a SwiftUI list?

I try to build a SwiftUI List of all local stored songs on my iPhone. Im using the MediaPlayer Framework of Apple to get the songs and storing them inside an En

Testing storyboard from within Swift Package

In the middle of factoring code from an app into a swift package and ran into a weird issue while adding test coverage. I reference the app's main storyboard in

Adding XCFramework to framework project gives error: Include of non-modular header inside framework module

We’ve been successfully using the ACRCloud iOS SDK in our iOS app. You simply download it, add their XCFramework to your project, and add the following to

Focus on the next TextField/SecureField in SwiftUI

I've built a login screen in SwiftUI. I want to focus on the password SecureField when the user is finished entering their email. How can I do this? struct Logi

Programmatically Change multiplier of Alignment Constraint of Center X / Y

How can I programmatically change the multiplier in the simplest way? For Swift 2.0

Padding HStack in the top of any screen

I want to put an HStack which contains two Texts in the top of any device screen. the problem is when I use padding that I have to decide fixed size of padding.

iOS Observatory not discovered after 30 seconds. Error launching application on iPhone

I'm unable to debug a freshly created app on physical iOS devices when pubspec dependencies reach a certain size, because it causes the "waiting for observatory

Locale.current reporting wrong language on device

I'm trying to format currency values in an iOS app, and I'm using the current Locale settings on the device to use the appropriate currency formatting. In the

Animating 3 dots in swift iOS

I have a label and an image view. My goal is to have 3 dots animating infront of the label and to be at the foot of the label at the end as shown here I have b

UPI deep link issue - iOS

This link is not working: urlString = "upi://pay?pa=samplevpa@ybl&pn=Sample Name&am=1&cu=INR".addingPercentEncoding(withAllowedCharacters: .urlQu

New React Native project with old version of react native

I am trying to create a new react native project which should utilize an older version of react-native. The result I would like would be to do something like:

UICollectionView display 3 items per row

I have a UICollectionView created from storyboard, I want to have 3 items per row in the view. I managed to do that using the following: - (CGSize)collect

Rotate UIButton 360 degrees

I've been trying to run an animation that rotates my UIButton 360 degrees using this code: UIView.animateWithDuration(3.0, animations: { self.vineTimeCapButt

Prevent UIAlertController from dismissing on UIAlertAction

I am working on one of the application where i am promoting user for force update using UIAlertController in which i don't wanted to allow user to perform any a

iOS - APNS how to use loc_key in payload

I have a message string i want to localize before i let APNS send a message to devices. I wish i could see the json payload itself to make me understand the st

Xcode Source Control - Push local changes stuck on Loading

I keep getting this problem with Xcode source control. If I checkout a previous branch and then switch back to my latest branch, sometimes I can no longer push

How to get the Iphone type from simulator (IOS)

There are a lot of solutions to find out on which device out app is running. iOS: How to determine the current iPhone/device model in Swift? But running in th

MKMapView ignoring Safe Area on iOS 11 and iPhone X

I'm trying to migrate a app to iOS 11 and for days I'm stuck with one ugly UI bug after the other. This time: MKMapView. I have a bunch of buttons which I pinne

How to get battery life of Bluetooth Low Energy in Swift 4?

I am able to get a value for BLE battery life with the help of following questions: Read data from BLE device Reading a BLE Peripheral Characteristic and chec