Post

Replies

Boosts

Views

Activity

Incorrect documentation for NSString.localizedUserNotificationString(forKey:arguments:)?
The documentation for NSString.localizedUserNotificationString(forKey:arguments:) says that “If a string resource corresponding to the specified key cannot be found, the returned string is empty.”. In reality however it appears that the “forKey” parameter is returned in such a case and not an empty string. This behavior is actually the useful behavior. Am I missing something?
1
0
1k
Feb ’23
Command Line Tools beta 3 for Xcode 14.1 available but no Xcode 14.1 installed
I'm running Monterey 12.6 on Intel and suddenly I get in Software Update the message "An update is available for your Mac - Command Line Tools beta 3 for Xcode 14.1" although I do not have installed any Xcode 14.1 beta version on this Mac. Two questions: Does anyone know why this is happening in the first place? Should I ignore this update or is it safe to proceed?
3
7
2.5k
Sep ’22
How to properly disable a UISlider
I have a view controller where a UISwitch is used to enable resp. disable a UISlider: class ViewController: UIViewController { ... @IBOutlet weak var slider: UISlider! @IBAction func doToggle(_ sender: UISwitch) { slider.isEnabled = sender.isOn } ... } When doToggle is executed and slider.isEnabled is set to false the slider cannot be moved anymore which is expected behavior. Unexpectedly though, any blue color left to the knob remains unchanged and the slider looks as if it were still enabled. I can only force the color change by adding an explicit call to setNeedsLayout(). @IBAction func doToggle(_ sender: UISwitch) { slider.isEnabled = sender.isOn slider.setNeedsLayout() } I am now wondering whether this a bug. Note that enabling / disabling a UIButton immediately also gives visual feedback that the button is enabled resp. disabled and there is no need to call setNeedsLayout(). Any insights are highly appreciated.
2
0
1.4k
Apr ’22