Do we have any shortcut to remove iOS documentation commnets?
When we copy the code from apple documentation it’s copied along with ///.
I would like to uncomment with the Xcode shortcut (if any).
///
/// struct PlayButton: View {
/// @Binding var isPlaying: Bool
///
/// var body: some View {
/// Button(action: {
/// self.isPlaying.toggle()
/// }) {
/// Image(systemName: isPlaying ? "pause.circle" : "play.circle")
/// }
/// }
/// }
///
2
Answers
You can select your code and use Command + /
My approach would be to edit multiple lines simultaneously and remove them.
⌥ Option
delete
3 times to remove the slashes, thenescape
to exit this mode.So in short:
⌥ Option
+ drag down on the lines you want to edit.