TIL you can detect whether the targetEnvironment is iPadOS in SwiftUI with the following code:
extension UIDevice {
static var isIPad: Bool {
UIDevice.current.userInterfaceIdiom == .pad
}
static var isIPhone: Bool {
UIDevice.current.userInterfaceIdiom == .phone
}
}
Here’s the Stack Overflow comment I got this code from.
TIL you can find a file recursively in Linux with the following command:
find . -name "*foo"
Here’s the Stack Overflow comment I got this from.
TIL you can have syntax highlighting with code blocks in JIRA.
Here’s an example inspired from the docs:
{code:java}
// Some comments here
public String getFoo()
{
return foo;
}
{code}
TIL you can switch back to the previous branch by running git switch -
.
TIL you can navigate to the previous directory with cd -
.
TIL that there’s a free, open source, private, iOS fitness app called OutRun (App Store).
TIL you can get music recognition (Shazam) in your Control Center.
TIL you can get Vim keybindings in XCode 13.
Menu Bar -> Editor -> Vim Mode
TIL you can create an iOS shortcut to turn Bluetooth off completely.
Or you can download mine.
TIL you can create an iOS shortcut to turn Wifi completely off.
Or you can download mine.