Post

Replies

Boosts

Views

Activity

Reply to Change localization of UIDatePicker in iOS 14
users can change localization on the fly without restarting You should do it by opening the apps settings and let user select the language : func openSettings() { guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else { return } if UIApplication.shared.canOpenURL(settingsUrl) { UIApplication.shared.open(settingsUrl, completionHandler: nil) // { (success) in } }
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’21
Reply to Error loading Storyboard
Thanks for the feedback. Problem is that XCode 11.7 won't let you publish on the appstore. You should try: change the name of your XCode (11.7) to XCode11 for instance to keep it as a development version. Then Reload XCode 12 (at least 12.4 or 12.5 if you are curious enough), from downloads/more Check if it works now. In anycase, don't forget to close the thread.
May ’21
Reply to MKMapView: How do I set mapType? (beginner question)
But everything returns an error... Can any one help me, please?  Where can I find an explanation of swift syntax? A few more comments: when you have error, please post the error what you tried: let map = MKMapView(.mapType = .hybridFlyover ) is a wrong syntax, as you have noticed. When you call a class initialiser that has parameters, it would be something like this syntax: let map = MKMapView(mapType: .hybridFlyover) No dot before the label for the parameter no equal but colon sign But this does not work here because no such initialiser exist (you could subclass MKMapView and create such a convenience init) This works: import MapKit class MyOwnMKMapView : MKMapView { convenience init(mapType: MKMapType) { self.init() self.mapType = mapType } } class KMLViewerViewController: UIViewController, MKMapViewDelegate { let map = MyOwnMKMapView(mapType : .hybridFlyover ) // You use your subclass // etc. ... }
Topic: Programming Languages SubTopic: Swift Tags:
May ’21
Reply to Having strange trouble with touchesMoved, need help.
OK, now we get the screenshots. But some explanation of what each picture is would help. Also some questions on your code: override func touchesMoved(_ touches: SetUITouch, with event: UIEvent?){ super.touchesMoved(touches , with:event) guard touches.first != nil else { return } if toggleHigh {highliteGem(theGem: myGems[0], clearAll: true)} if let touch = touches.first, let node = myGV.currentGem, node.isMoving == true { let touchLocation = touch.location(in: self) node.moved = true print(touchLocation) node.position = touchLocation node.isMoving = true node.inSlot = false //addTrailToTwinkle(theNode: node) } } In which class is this ? ie, what is self ? do we see effect of toggleHeight in the pictures of the gif ? line 10: we get there only when isMoving. So what the need ? what is the result of the print ? Is it what you expect ?
Topic: Programming Languages SubTopic: Swift Tags:
May ’21
Reply to iPhone IDE
Developing on iPhone ? With the screen size. It is already hard on a 15" Macbook… I fear you are dreaming here. Did you see how huge and complex XCode is ? 10 GB code… And how frequently it has to update to cope with the OSes evolutions. So you'd better see how to best use XCode as it is and ask for improvements through Feedback assistant.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21
Reply to Change localization of UIDatePicker in iOS 14
Thanks for feedback, I was sure it did work… As it is not possible to edit message, I duplicate the answer. You can change localization on the fly without restarting (works only over iOS 13.) You should do it by opening the app settings and let user select the language for the app: func openSettings() { guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else { return } if UIApplication.shared.canOpenURL(settingsUrl) { UIApplication.shared.open(settingsUrl, completionHandler: nil) // { (success) in } }
Topic: UI Frameworks SubTopic: UIKit Tags:
May ’21
Reply to Most wanted Xcode features…
Wanted Feature : Get practical way to update an old project to open in recent version of Xcode. Pain point:  When trying to open an old project with a recent version of Xcode, one get a message to update from Swift x - Swift y, using and older Xcode. Problem is that the needed old Xcode may not run with the MacOS version. I noted in several occasions, that I just needed to set the version of Swift in project Build settings 'Swift Language version' from unknown to Swift 5 for instance. Then on opening, automatic conversion was proposed, without need to launch ancestral version of Xcode. Feasibility: Simply a need for better message and advice.
May ’21
Reply to Most wanted Xcode features…
Wanted Feature : Get better information about incompatibility between XCode and device. Pain point: Frequent question on the forum about compatibility of such version of Xcode with a version of iOS on attached device. This highlights that alert message from Xcode should provide more precise and helpful information about the incompatibility. Feasibility: Simply a need for more explicit message.
May ’21
Reply to Seeking App to Lock Phone
Lock is a system function, I don't think that could be done. And imagine the risk: some app you download locks your iPhone until you pay something… But there is a solution. Ask someone to change your password and you'll be forced to ask him/her to unlock. This person will 'set the human timer'. Good luck and desintox. Don't forget to close the thread by marking the correct answer before you shut down the Mac as well for some time.
Topic: App & System Services SubTopic: Core OS Tags:
May ’21