Category "swift"

How to compress of reduce the size of an image before uploading to Parse as PFFile? (Swift)

I was trying to upload an image file to Parse after taking photo directly on phone. But it throws an exception: Terminating app due to uncaught exception '

How to load animations made in Blender to ARKit?

I made a 3D object in Blender and made some custom animation to it. However, I manage to load the object to the scene, but not the animation. This is what it

Click through custom NSWindow

I have custom NSWindow with custom NSView set as its contentView. The window gets initialized with: [window setOpaque:NO]; [window setBackgroundColor: [NSColo

How can I encode a string to Base64 in Swift?

I want to convert a string to Base64. I found answers in several places, but it does not work anymore in Swift. I am using Xcode 6.2. I believe the answer might

Grouped UITableView with Shadow and Corner Radius?

I was wondering how one might go about creating a grouped UITableView with sections that have a drop shadow and rounded corners. Also, the section header is sel

Why am I getting an expected expression for my else if lines in SWIFT Xcode? (Basic)

I am completely new to coding and have been learning through sources such as skillshare and Udemy. In one of the projects, I was asked to create a simple app wh

Implicitly animating SCNNode's transition from one ARImageAnchor to another

I’m trying to make my AR experience more user friendly. I have this SCNnode (objectNodeToPlace) that I want to place over the node created/update by the r

Downloading and Processing .xls (Excel) files in Swift

I want to build an Iphone app that can download an Excel file and show the content in a table. I think i managed to download the file but the data i get looks

How to make UIImageView animation wait for dynamicAnimator behavior to finish to start animating

I'm working on an animation for an app, where a shoe box falls from the top of the screen and lands on a pedestal, then the box opens. I was wondering if there

Is there any way to swipe to delete/ Add actions into cell in UITableview Diffable datasource?

I am trying to add swipe actions into my tableview. when I used simple tableview datasource method it worked fine (trailingSwipeActionsConfigurationForRowAt). b

How can I set the Dragging Image in SwiftUI on macOS

I am trying to change the preview image for drag and drop from the default for a GridView which seems to include all the visible items in the grid. As I underst

Getting the difference between two Dates (months/days/hours/minutes/seconds) in Swift

I am trying to get the difference between the current date as NSDate() and a date from a PHP time(); call for example: NSDate(timeIntervalSinceReferenceDate: 14

How can I debounce a method call?

I'm trying to use a UISearchView to query google places. In doing so, on text change calls for my UISearchBar, I'm making a request to google places. The proble

Keychain access control from the app with different names

I am using keychain in my macOS app to store jwt tokens (access and refresh)(kSecClassGenericPassword) and I have figure out that I can't manage existed data vi

Keychain access control from the app with different names

I am using keychain in my macOS app to store jwt tokens (access and refresh)(kSecClassGenericPassword) and I have figure out that I can't manage existed data vi

failed: permission_denied when setValue: or removeValue: in Firebase Database | Swift 4

I have seen lots of answers in stackoverflow but none is working for me! This is my code: import UIKit import Firebase class ViewController: UIViewController

How to make a gradient circular path in Swift

I want to create a gradient circular path like the following image: and I have the following code: circularPath = UIBezierPath(arcCenter: .zero, radius:

Need to check that braces in given array are balanced or not

Braces in a string are considered to be balanced if they met the following conditions, All braces must be closed. braces come in a pair of the form of (), {},

MapAnnotation, how can we decide the zIndex of an Annotation?

when using the MapKit.Map to display multiple Annotation overlapping, everything works properly whether you use MapPin, MapMarker or MapAnnotation. The tricky p

How to check is a string or number

I have an array ["abc", "94761178","790"] I want to iterate each and check is a String or an Integer? How to check it ? How to convert "123" to integer 123