Questions tagged maccatalyst

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

DatePicker on Mac not saving date until return key is pressed

I’m adapting my iPad app to Mac with Mac Catalyst and am having a problem with the datePicker (it has a datePickerMode of time). On iPad the datePicker is a wheel and whenever the user scrolls on the date picker the dateChanged action is fired. But on Mac the date picker is not a scroller […]

By fphelp
Published
Categorised as datepicker, maccatalyst, macos, swift

UIMenuController submenu

I’m trying to implement an UIMenuController with some UIMenuItems in a Mac Catalyst app with the following: let menu = UIMenuController.shared menu.menuItems = [itemA(), itemB(), itemC()] menu.showMenu(from: someView, rect: someView.bounds) // itemB and itemC are just as the following private func itemA() -> UIMenuItem { let item = UIMenuItem(title: “Some item”, action: #selector(test)) return item […]

By Ivan Cantarino
Published
Categorised as ios, maccatalyst, swift, uimenucontroller, uimenuitem

TextView automatically typing return key [Mac Catalyst]

I’m adapting my iPad app to Mac Catalyst and in the app I have a UITextView inside a UITableViewCell with some strange behavior. All of my textViews inside tableview cells are entering the return key. I just press on a textView and it’s stuck pressing the return key making new lines (I’m not typing anything). […]

By ap123
Published
Categorised as maccatalyst, swift, uitextview, xcode

macCatalyst app: how to close a window without terminating the app?

I’m developing an app by using macCatalyst. When user has closed the window on mac version, the app is terminated. It was possible to change this behavior in cocoa by using: applicationShouldTerminateAfterLastWindowClosed method or by setting NSSupportsAutomaticTermination to NO in plist file. How can I get the same in a macCatalyst app? Source: Swift

By emreoktem
Published
Categorised as catalyst, maccatalyst, swift

Change prompt color for UITextField on mac catalyst

How can I programmatically change the color of the prompt on mac catalyst for an UITextField? The prompt exist but with the same color as UITextField. The prompt is showing the right color on iOS. I unsuccessfully tried .tintColor Code + iOS and Mac Catalyst result Source: Ios

By Christophe Vichery
Published
Categorised as ios, maccatalyst, uitextfield

Detect Single Modifier Key Change in UIKit for Mac (Catalyst)

I am porting an iOS app on MacOS using UIKit for Mac also known as iPad Apps for Mac or Project Catalyst. The app uses keyCommands from UIKit to detect a single modifier key press: UIKeyCommand(input: “”, modifierFlags: .shift, action: #selector(singleShift)) This code works perfectly on iPad with an external keyboard, I am getting the […]

By Dmitriy
Published
Categorised as ios, maccatalyst, macos, swift, uikitformac

Catalyst – Opening context menu programatically

I’m using a context menu in my catalyst app by using let interaction = UIContextMenuInteraction(delegate: self) editButton.addInteraction(interaction) This works fine on Mac and menu is opened when user clicked by using right mouse button. On the other hand, I need to open the same menu on a normal button click on some cases especially if […]

By emreoktem
Published
Categorised as maccatalyst, swift

Open a new window in Mac Catalyst

I am porting an iPad app using Mac Catalyst. I am trying to open a View Controller in a new window. If I were using strictly AppKit I could do something as described in this post. However, since I am using UIKit, there is no showWindow() method available. This article states that this is possible […]

By Arturo Reyes
Published
Categorised as appkit, ios, maccatalyst, macos, uikit

Exclude pod when porting to mac with catalyst

Porting apps to mac is finally possible thanks to Catalyst, problem is, numerous pods don’t support AppKit. Most common one would be Crashlytics / Firebase. In […]/Pods/Crashlytics/iOS/Crashlytics.framework/Crashlytics(CLSInternalReport.o), building for Mac Catalyst, but linking in object file built for iOS Simulator, file ‘[…]/Pods/Crashlytics/iOS/Crashlytics.framework/Crashlytics’ for architecture x86_64 Since it’s a recent topic, I couldn’t find doc on […]

By AncAinu
Published
Categorised as cocoapods, ios, ipad, maccatalyst, swift

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
faq