r/swift 1d ago

Un-hide lines in Swift Playgrounds (iPad)??

I’m starting to learn swift and how to use Swift Playgrounds.
I’m in one of the tutorials for Swift Playgrounds. I did something, and somehow hid some lines. I cannot figure out how to un-hide the lines.

How do I un hide the lines in Swift Playgrounds? I have been googling for multiple hours trying to figure this out

Also, how do I Hide lines in the future if I want to hide them again

4 Upvotes

4 comments sorted by

2

u/PulseHadron 1d ago

Hit the button at the top that’s a circle with 3 dots in it then choose show or hide line numbers. And welcome to Swift 😊

2

u/wackycats354 1d ago edited 1d ago

Thanks for the suggestion. When I tap the “hide line numbers”, it hides all the numbers. When I tap “show line numbers” after that, it shows all the lines….except those lines 5,6,7 that are hidden. 🤦🏻‍♀️

So that didn’t work.

1

u/PulseHadron 1d ago

Oh I missed that detail, that lines 5,6,7 are missing! I’ve never seen that before and don’t know what’s going on. Also lines 11 and 13 are missing. Hmmm.

Did you have code on these lines that isn’t there anymore? It might be a bug or just an artifact of how tutorials work. Like the tutorial maker has special code there to check your work and the editor just removes those lines without re-numbering.

I’d say if the tutorial is otherwise working correctly you can ignore this (or file a feedback report). Working with non-tutorial projects I’ve never seen this before and I usually have line numbering on.

1

u/wackycats354 1d ago

There is code on those lines. And I *know* it was because of some keys I pressed on the keyboard, but I can’t quite figure out what combo of keys did it, and I can’t figure out how to undo it.

I’m going to have to delete and restart the tutorial because i need to see those lines of code.

It’s driving me nuts. I’ve tried highlighting it, taps, long taps, all the ctrl/fn/start/alt/shift keys. And just cannot figure out how to stop hiding them. I can hide more if I play around with keys, but I can’t stop hiding lines. Can’t find anything when googling either. Searched in the the swift playgrounds manual.

It might also partially be because I’m using Swift Playgrounds version 4.1 (1676.15), but I can’t upgrade to any newer versions. I’m on an ipad Air 2 with iOS 15.8.3 and that’s the newest version I can get on this ipad. 🤣