Category "swift"

using avplayerkit issue while playing video black screen coming

hello i am new to swift and i am using AVPlayerViewController for plaing video from my url but issue is that i am not able to load video only black screen showi

UITableViewRowAction vs UISwipeActionsConfiguration

The two APIs seem to get the same result. In which case is it better to use one over the other? override func tableView(_ tableView: UITableView, editActionsFo

bg color of view controller status bar area in UIViewControllerRepresentable

I am using a UIViewControllerRepresentable for a view controller that can accomplish things I can't do in SwiftUI. I am trying to get the status bar area appear

Swift Combine - Accessing separate lists of publishers

I have two lists of URLs that return some links to images. The lists are passed into a future like static func loadRecentEpisodeImagesFuture(request: [URL]) -&g

How to scroll particular views under the scrollview in ios using swift?

I have views like below 75% view is Scrollview and 25% is Bottom Imageview. childView which is inside scrollviews My Screen UI I tried below code as w

SceneKit – What's the difference between SCNAction and CABasicAnimation?

I'm still very new to SceneKit and SpriteKit and just started working on animating some SCNNodes. One thing I don't get is when to use SCNAction and when to us

Show Current Location and Update Location in MKMapView in Swift

I am learning how to use the new Swift language (only Swift, no Objective-C). To do it, I want to do a simple view with a map (MKMapView). I want to find and up

How to achieve realistic Depth of Field effect in SceneKit?

I'm trying to render a frame, with realistic depth of field effect. I've already tried the depth of field properties in the camera node, but it doesn't produce

How to change font of UIButton with Swift

I am trying to change the font of a UIButton using Swift... myButton.font = UIFont(name: "...", 10) However .font is deprecated and I'm not sure how to chang

Failed to render and update auto layout status, Failed to launch designables agent because tool was shutting down

I start working on an iOS project and it's using IB and storyboard. I build it after cloning from the repository and it was successful. But the problem is after

AVPlayer layer not showing video content sometimes

AVPlayer layer not showing video content sometimes but plays audio. This happens some times not each time Here is my lines of code : override func viewDidLoa

Type of expression is ambiguous without more context Swift

I am getting a 'Type of expression is ambiguous without more context ' on this part of code from a project I am trying to upgrade to latest Swift version. I can

HTML-like table layout (i.e. auto-resizing table cells) in SwiftUI View?

I’d like to render a table of text cells in my SwiftUI View in a way, that every cell auto-resizes just so much that the text fits in it. So I did this:

Top-level Bool encoded as number property list fragment. PropertyListEncoder

I have this generic function to save in NSUserDefaults, in generally works but now I want to save a boolean value and I get an error. I could not find anything

Load a UIView from nib in Swift

Here is my Objective-C code which I'm using to load a nib for my customised UIView: -(id)init{ NSArray *subviewArray = [[NSBundle mainBundle] loadNibNamed

Move the annotation on Map like Uber iOS application

I am working on a project where I need to create a similar iOS application to UBER and OLA where the car is moving based on the location. I'm looking for some k

"Undefined symbol: protocol descriptor for Swift.ExpressibleByFloatLiteral" issue while installing react native on macOS Big Sur

I was trying to install React Native on my system, and found that it failed to install CocoaPods dependencies which is required by that template error. sudo arc

Extending Array to check if it is sorted in Swift?

I want to extend Array class so that it can know whether it is sorted (ascending) or not. I want to add a computed property called isSorted. How can I state the

How to call a function from a different swift file

I have multiple swift files of type UIViewController in my Xcode 6 beta-2 project. I basically want to know some data from file A to use in file B. My files are

UICollectionView attempt to create view animation for nil view

I have a UICollectionView with 2 sections. In the first one there is a custom UISegmentedControl with two options: "All" and "Favourite".When I click one of the