Category "uikit"

UITextView cutting off last line of text

I am trying to render out a UITextView within a UITableViewCell. For some reason the last line of my text is being cut off. I have followed numerous posts on h

How to change icon color in UIAction inside UIMenu? [duplicate]

Trying to change icon color in UIAction but changing tint does not seem to work at all. Any idea? let imageView = UIImage(systemName: "eye")!

Keyboard's globe button (🌐) was disappeared, iOS 15

when updated to iOS 15 , my app got this issue. Keyboard's globe button (🌐 at left bottom corner) was disappeared, but we could click it. Does anyone ha

my app crash in uikit ,only happen on IPhone X and above exception name NSInternalInconsistencyException

Failed to load bounding path bitmap data from the asset manager for asset name: BoundingPathBitmap-1125x2436-375x812-3.00x The crash happen on the viewcontroll

Open UIDatePicker programmatically in iOS 14

I have this normal UIDatePicker (sorry that it's not in English, please ignore that): But the problem is that it only appears when I'm pressing the Date Picker

UIStepper - start counting from 1

I have successfully implemented core data and UISteppers. Every time I try to edit a saved record the UI Stepper starts over from 0. Please help me to figure pu

Google Places, Swift Package Manager & M1 Mac issues

I have students using Google Places AutoComplete with iOS UIKit and Swift. Students with M1 Macs still seem to not be able to use the simulator with this SDK an

Core Bluetooth. How can I check does peripheral already connect?

During development I got a problem witch related to the connection central and peripheral. When one of the central already connected with perepheral I have to d

How to add space and resize image for rightView of UITextField

I need to make this kind of text fields but I don't know how can I make spacing for rightView. Here is a code where I'm trying to set rightView image let i

UIKit automatically switch to another VC after launch screen appear

I'm trying to automatically switch from lauch screen to home screen after 3 sec. This is code in entry point view controller override func viewDidAppear

Animate a UILabel and UIButton within a single UIView.transition block?

I need to animate the change of the value of a UILabel and a UIButton's image property. I currently use two UIView.transition blocks which seem to work fine, bu

How to use a SwiftUI view in place of table view cell

How can I use a SwiftUI view struct in place of a traditional cell and xib in a UITableViewController? import UIKit import SwiftUI class MasterViewController:

iOS - Change UICollectionView layout to fill rows instead of columns

Is it possible to change the UICollectionView so that it fills the rows instead of the columns ? Here's an image explaining it : EDIT : It's an horizontal scro

How to detect current device using SwiftUI?

I am trying to determine whether the device being used is iPhone or iPad. Please see this question: Detect current device with UI_USER_INTERFACE_IDIOM() in Swi

Error Domain=SSZipArchiveErrorDomain Code=-1 "failed to open zip file" UserInfo={NSLocalizedDescription=failed to open zip file}

_ = try? SSZipArchive.unzipFile(atPath: filePath, toDestination: downloadPath.absoluteString!, overwrite: true, password: nil, progressHandler: {

Unable to hide the navigationBar when embedding SwiftUI in UIKit

I am trying to hide the navigationBar when putting some SwiftUI inside of a UIKit UIViewController: override func viewWillAppear(_ animated: Bool) { super.vi

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

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

Can't select a folder with UIViewRepresentable & UIDocumentPicker

I'm trying to create a picker for a user to choose a folder in a SwiftUI app. However, there doesn't seem to be any SwiftUI document picker yet so I was attempt

How do you share a data model between a UIKit view controller and a SwiftUI view that it presents?

My data model property is declared in my table view controller, and the SwiftUI view is modally presented. I'd like the presented Form input to manipulate the d