5 Replies
      Latest reply on Mar 22, 2018 5:44 AM by KlemensStrasser
      KlemensStrasser Level 2 Level 2 (35 points)

        Hey,

         

        I've made a playground book with an first page that just features the title, an note (that sound needs to be enabeld) and a link to the next page. There is a space between the note and the link and one after the link, so the user can click there to enter some text. Is there any way to make this whole page non-editable?

         

        Best,
        Klemens

        • Re: Disable editability of playground page
          Cascades42 Level 1 Level 1 (0 points)

          You might wish to review the documentation on the editable areas.

           

          By editing your Swift Playgrounds Book in XCode you can remove the ability to edit the entire page or areas of the page, as well as hide code.

            • Re: Disable editability of playground page
              KlemensStrasser Level 2 Level 2 (35 points)

              Thanks - But I did already look at that site and haven't found what I want.

               

              You've said that I can I edit the book such that the entire page is not editable - Would be awesome if you could tell me how that works! (:
              Because the site only says that "Adding editable code areas to a page locks any content outside of those areas" - but I don't have any editable areas and do not intend to add any.

               

              The code looks like this:

               

              /*:
              
              # Dummy Name
              ## WWDC 2018 Scholarship Application
              ### by Klemens Strasser
              - Important:
              This Playground features sound playback. Please turn up your speaker and disable silent mode or use headphones while testing. Thanks! ❤️
              */
              
              
              //: [Next Page](@next)
              
              
              

               

              I can enter code in line 9 and line 11, which is what I want to disable.

                • Re: Disable editability of playground page
                  Cascades42 Level 1 Level 1 (0 points)

                  It seems I was mistaken, making the entire page unable to be edited isn’t possible. But if you add a //#-hidden-code after your link to the next page, and move the end of the comment down to immediately above the link then at least the typing will not be possible between the text and the link. Unfortunately it will be possiblue after the link. Like so:

                   

                  /*
                  ### Name
                  Message...
                  
                  
                  */
                  //: [Next Page](@next)
                  
              • Re: Disable editability of playground page
                KMT Level 9 Level 9 (15,495 points)

                Not sure it would help your example, but you could grab a screenshot of the actual page, then paste it in as an image/background instead - not saying you'd get away with visible inputs that didn't respond, tho, so...

                 

                I won't ask how you ended up stuck with an input you don't want.

                  • Re: Disable editability of playground page
                    KlemensStrasser Level 2 Level 2 (35 points)

                    That would be possible But I guess I rather stick with a single line where people can put code. Thanks anyways!

                     

                    And I guess I haven't said this clearly enough - There is no input on the page. The code I've included above is all the code that is on that page. And it seems like  since there is no dedicated area where people can write code, playgrounds makes it possible to write code wherever there is a empty line. And that's what I want to turn off