Questions tagged uikit

Explore the latest questions and answers asked by our top developers.

collectionview global header does not push cells down and stays on top instead

I have a collection view header (blue) and cells (red). I want to be able to show/hide header programmatically, however when I show the header programatically it appears on top of the cell (or makes scrollview go down a bit). I would like the header to push the whole scrollview down, so I wouldn’t have […]

UIKit – How to prevent default blur and focus background of UITextField?

As you can see in the image, the UITextField (only on tvOS?) by default has these behaviors: A translucent overlay (make the background and the white text grey in the second button) A white background and bigger size when it’s focused (the first button) How do I remove/change these behaviors? What did I do? I […]

By Tr1et
Categorised as swift, tvos, uikit Tagged , ,

Changing font color of Date Picker with inline style

I need to change the text color of my .inline style Date Picker. A Google search led me to this post. This works perfectly on .wheels style, but doesn’t work on .inline: My code: class ViewController: UIViewController { @IBOutlet weak var datePicker: UIDatePicker! override func viewDidLoad() { super.viewDidLoad() datePicker.preferredDatePickerStyle = .inline self.datePicker.backgroundColor = .blue datePicker.setValue(UIColor.white, […]

By orihpt
Categorised as ios, ios14, swift, uidatepicker, uikit Tagged , , , ,

iOS Admob open app ads issue with black background underneath

I implemented the open app ads (video here: This looks like the first "Discouraged implementation example" in the official guide: In the discouraged example below, the ad is placed after the loading screen and there is no content visible under the ad. I simply call present in the loading screen like this: [ad […]

By John
Categorised as admob, ios, uikit Tagged , ,

How to update window frames on an iPad split view?

I am trying to add a banner window which should show on top of the main window at all times. nothing from the main window should ever block the content on that banner window and the banner window should also not block the content of the main window. The following code worked fine on an […]

By Anirudh Bandi
Categorised as ios, ipad, ipados, swift, uikit Tagged , , , ,

UIBarButtonItem working but not visible with Xcode11 and Xcode12

After migrating our app to Xcode12 from Xcode10 we are seing an issue with our UIBarButtonItems. Some of those are not visible but still working. We were able to target more specifically the following: Xcode10.3 on iOS12: no issue Xcode10.3 on iOS13 through release: no issue Xcode10.3 on iOS14 through release: no issue Xcode11.7 on […]

By lchamp
Categorised as ios, objective-c, uibarbuttonitem, uikit, xcode Tagged , , , ,

What is a good approach to sharing a data model between a table/collection view controller and its associated diffable data source subclass?

I have a UITableViewController with a model property declared in it. When migrating from UITableViewDataSource protocol conformance to a subclass of UITableViewDiffableDataSource outside of the table view controller, the model is no longer accessible in the data source. What would be a recommended approach to sharing a data model between the two, so say a […]

UITableView drag and drop a cell onto another cell?

I have a UITableView with a Drag and Drop delegate set up. I am able to drag cells between other cells in the UITableView but it does not seem like there is a delegate method for what happens if I drag a cell on top of another cell, in which case I want to combine […]

By aritroper
Categorised as drag-and-drop, ios, swift, uikit, uitableview Tagged , , , ,

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: And I wanted to know how to show the Date Picker like in the first image (that it’s covering all the screen with the blur effect) only […]

By TLG Codin
Categorised as ios14, swift, uidatepicker, uikit Tagged , , ,

Hide/Show Navigation Bar at ViewWillAppear and ViewWillDisappear UI Glitch

so I have 2 VC that I want to set its navigation bar hide when it appears and show again when it disappears. This is my code class FirstNavigationVCViewController: UIViewController { @IBOutlet weak var button: UIButton! override func viewDidLoad() { super.viewDidLoad() title = "First Nav" button.addTarget(self, action: #selector(press), for: .touchUpInside) } override func viewWillAppear(_ animated: […]

By 2r83
Categorised as ios, swift, uikit Tagged , ,
1 2 3 5

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us