Post

Replies

Boosts

Views

Activity

UIAlert message text not showed as multiline
I'm using the following code to create and show the UIAlert: let alert = UIAlertController(title: "Warning", message: "Are you sure you want to delete this notification?", preferredStyle: .alert) let cancelAction = UIAlertAction(title: "Cancel", style: .cancel) { _ in isDeletedNotification = false } let deleteAction = UIAlertAction(title: "Delete", style: .destructive) { _ in DispatchQueue.main.async { isDeletedNotification = true self.createNotificationToPost() } } alert.addAction(cancelAction) alert.addAction(deleteAction) present(alert, animated: true, completion: nil) It works fine when I run the app from Xcode in the simulator and the device When I stop Xcode and run the app in the simulator or in the device I have this: I was using Xcode 14.2 (14C18). MacBook Pro with macOS Monterey 12.6. I opened the same project in a different MacBook: Xcode 14.3.1 (14E300c). MacBook Pro M1 with macOS Ventura 13.4. In both cases I have the same result, the project is damaged or something? Is possible to fix it? I have the same results with UILabel in the custom cell.
1
0
615
Jun ’23
Performance Loading App
In the App we saw a 4 seconds loading time while launching the App. Sometimes this time up to 8 seconds but the average time is 4 seconds. What could be the reason? In the AppDelegate there isn't server calls. The breakpoint inside the AppDelegate function didFinishLaunchingWithOptions is taking 4 seconds to get in. I have some api calls but they are launched after the breakpoint in the AppDelegate. The Api calls responses are working faster. In Instruments I have some blocked time, is it normal? Is something wrong in the log?
2
0
1.1k
Dec ’21
WkWebView delay time on Swift
When I'm trying to load a web page I'm using this part of code: let myURL = URL(string:"https://www.apple.com") let myRequest = URLRequest(url: myURL!) print(Date())/*Start time 11:47:28*/ self.myWV.load(myRequest) I could see a delay from 1-3 seconds before to show the page even if I change the url. func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { print(Date())/*End time 11:47:30*/ } That delay is normal? I tried with both options: Added a WKWebView in the Storyboard Added a WKWebView programmatically.
3
0
2.6k
Nov ’20