In Swift playgrounds, I started with an empty playground template (I'm new to playgrounds) and wanted to have the Live View take up the whole screen. I saw this:
Fullscreen for Swift Playgrounds on iPad
Which said to modify a Manifest.plist file but there is no Manifest.plist file in the playground. I also don't see any .playgroundpage file which other people have referenced in other questions for the actual location of the Manifest.plist file.
Where should I put this file? I want it to look like a fullscreen app for context (if the code editor is hidden) and I have a MacBook and iPad which both edit the same file.
I'm using the most up to date version of XCode.
To locate the Manifest.plist
Step 1: Navigate to your playgroundbook from your MacBooks iCloud drive
Step 2: Rightclick and click show package contents
Step 3: Navigate to the playgroundpage folder to find the Manifest.plist you need to change.
Step 4: Edit Manifest.plist change LiveViewEdgeToEdge from NO to YES this will removes the border.
Step 5: To have the Live View take up the whole screen, on the Ipad select the tab between the editor and the live view and drag it, to expand the live view.
After Dragging
Related
I am working my way through the Apple iBooks title "App Development with Swift." On page 86, it says to open the Assistant Editor to make a connection to an interface element. In the accompanying image, the editor shows a nice, neat, compact snippet of code, about a dozen lines long.
However, when I open the editor in my follow-along project, the same UIViewController file shows me about 600 lines of code. The steps I'm taking to get here are Open Xcode, select New Single-view iOS Project, select Main.storyboard, select the ViewController object in the outline, and open the assistant editor.
Is there a setting somewhere to show a simplified version of the code? Or has the code for the ViewController changed that much since the book was released? Or did they maybe just create a super-simple version of the editor for the images in the book?
I'd like to be able to follow along with what they're doing in the book, but at this point I'm stuck.
Click on 'Automatic' above the source editor and select the view controller.
As in android, they can use any vector image formats. My designer gave my abc.ttf file which contains icons for the app. The interesting thing about TTF is, it is not stretched or pixelate while increasing the size. So plz help me to figure out, is there any way to use TTF or any other vector image format.
Thnks
Posted my solution at medium.
Refer SVG or TTF icons in iOS (Swift 4.0) without using any third party library.
Step 1: Get your ttf file from the designer or get it online. I am showing with fontAwesome icons.
Link where you get ttf file. : https://fontawesome.com/v4.7.0/
Download this and extract it. You will see the fonts folder in it. Go to fontawesome-webfont.ttf.
Step 2: Open this TTF file and install
After Installation
Step 3: Open to your iOS project, go to your storyboard/Xib file add an UILabel.
Step 4: Add/import TTF file (downloaded) to your project.
Step 5: Now in your attribute inspector, go fonts and choose custom and click on family, you will see a list of fonts.
Choose FontAwesome (or you ttf file name).
That is so easy man. :P
Wait your last step is remaining.
Step 6: (Last One): Open your font file, select icon which you want to use and copy it.
Paste in the text area of your UILable in your storyboard/Xib.
You can use any icon from this file and there is plenty of icons already available at https://fontawesome.com/cheatsheet?from=io. You just need to copy and paste in the text of your label.
Step 1, 2 and 3 are a one-time process for a project and if you want to use the same TTF file in another project as well skip step 1 and 2.
The same procedure goes with buttons.
You can use vector PDFs instead of images
Refer How to use vectors in Xcode
In my iOS application I deleted the .xcodeproj file to remove it from git control and then I've add the same file few days later.
Now I have a storyboard which is the one from a few days and I have changed a lot on the storyboard. So how can I regenerate the correct storyboard back?
The thing is, that everything works if I start the application except that I can't work with the storyboard in this form.
For example a scene in my storyboard looks like this:
The white views are not displayed
Open your Xcode project
Right click on the folder your want to add your Storyboard file to
Click Add files to "your-project-name"...
Browse to your storyboard and add it
Whenever I open my project I only see what is shown in this picture:
I can neither see the toolbar nor the compile button (play). The following picture is how it suppose to look like.
I have just started programming so I hope someone can help me with this problem.
What you are seeing in the first picture is Xcode opening a file. In the second picture, you have a project.
Open the .xcodeproj file to get the second view. If you just open a file you won't get any compile buttons or anything because there are no project settings to tell Xcode how to compile.
On the top bar, Go to View->Show Toolbar
I have a Storyboard in Xcode 5.1 with a base Localization of English, and a second Localization in French.
When I'm using the Xcode Storyboard editor the strings are shown in English, as expected. Is there any way to make Xcode display the Storyboard in my other localization (French)?
I don't want to change Mac OSX's language, I'm hoping there's an option in Xcode somewhere.
EDIT: I have this in my resources folder
If I double-click Main.storyboard then the storyboard opens showing English (base language), as expected.
Is there a way to view Main.storyboard, but showing the text displayed in Main.strings?
EDIT:
I've since discovered (thanks to this tutorial) that there's a 'preview' option in Xcode. To get this, open the storyboard, click the 'assistant' editor, click the 'assistant editor menu button' (immediately to the right of the > arrow at the top left of the assistant window) and select Preview. This shows how the ViewController will look in landscape/portrait 568/480 high modes. Very handy, but still shows everything in English.
If only this'd let me select a localization, it'd be a great way to check the text layout works in different languages..
I believe that Xcode is not prepared to show localized storyboards in Interface Builder when using string files. However, it allows for you to convert formats quite easily. Select your storyboard file and in the utilities panel, select the language you want to preview:
Change the "Localizable Strings" to "Interface Build Cocoa Touch Storyboard":
You should now be able to select the French storyboard file and preview it within IB.
Once you are done, you can convert the file back to "Localizable Strings" reversing this procedure, or using your source code version control system. Then you can update the base file with any necessary adjustments, and verify it is to your liking using this method again.
Xcode 6 now includes a feature to do this.
From What's New in Xcode - New Features in Xcode 6:
Preview in Interface Builder. While designing in Interface Builder, the preview assistant can show how the interface appears in other languages. You can see how your interface responds to longer or shorter languages.
Hurrah!
Just click on you storyboard file and you can devellope it to show your Localization storyboard.
In Your case if you use the localization "base" option, you must see 3 storyboard file (one for "base localization", one for english and one for french).
Sorry for my english but i hope that help you.