I am just starting out learning iOS development as a hobby in my spare time - so please be patient if this question seems dumb.
But how do I edit the UI without using the xcode graphical user interface? Is there some like underlying XML definition like Android has in android studio?
The reason I ask is if I ever need to change 1 dimension, it means I would have to manually go to every single storyboard element, and change it by hand as opposed to editing them efficiently from some main config file like dimens.xml
If you select your storyboard in Xcode, right click, and choose Open As -> Source Code, you will see the XML.
It's not simple to work with in that form (in my opinion), but it's available.
Related
I want to send the file I'm currently editing to a printer, like I did in Notepad++ for example.
I havn't found any hint on a print command. Is it not possible ?
It is not yet available, but I found an issue report for that feature.
It's currently in the backlog, so we can expect it soon.
https://github.com/Microsoft/vscode/issues/5953
Edit:
In the meantime:
https://marketplace.visualstudio.com/items?itemName=nobuhito.printcode
https://marketplace.visualstudio.com/items?itemName=pdconsec.vscode-print
Now you can install addon for VS Code - search "PrintCode".
Note that the repository for this extension was last updated in February 2018 with numerous issues outstanding.
I found the PrintCode extension inspiring but unfinished and with a number of flaws. In particular it depends on a specific paper size to wrap and as a result does not respond well if you change paper size or orientation in the print dialog.
It's open source so I looked at the code and didn't like that either. No programmer ever likes another's coding style. So I pinched the idea of using a web-browser as platform driver for HTML printing -- my hat is off to the PrintCode author for that cunning insight -- and wrote my own.
In the process I fixed all the known bugs, added everything on my wishlist and a couple of things suggested by others. The biggest thing was figuring out the CSS required to respect print dialog paper size and orientation. This also sorts out the mysterious disappearing line numbers problem, although I'm not sure why. The next biggest thing was learning to probe for an unused port, a problem that also afflicts PrintCode causing the browser to open showing no content.
Major issues
PrintCode depends on a web service. You can't use it offline.
Many people want to be able to open a file, select a portion and print just the selection.
The print dialog supports changing paper size and orientation. This clashes with the way PrintCode works.
Some people like to run multiple VS Code windows.
When you print a markdown file, you probably don't want it printed like a text file when it can be rendered with fonts and proper headings and bullets etc.
Support is required for remote workspaces.
Because each instance of VS Code needs a different port for its embedded webserver, you can't just use a setting. Dynamic port allocation is necessary.
Remote workspaces weren't even a thing until two years after maintenance ceased on PrintCode.
If you want to survey your options, get onto https://marketplace.visualstudio.com, choose the Visual Studio Code tab and search for printing.
If you just want a link to my version, it's here http://marketplace.visualstudio.com/items?itemName=pdconsec.vscode-print.
If you like what you see but need something I haven't thought of, the marketplace page has a link to the repo on github. Create an issue and tell me what you need -- or write it yourself and submit a PR.
Now there is an extension available for printing from the VS Code Editor.
It's called VS Code Printing Free.
I've tried it for a couple of days and it works fine.
Poor man's answer: Copy code to Notepad2 or Notepad++ and print from there.
The colour coding will be different though
You can use an Extension of VS Code: PrintCode
Install extension PrintCode
On Mac: command + shift + P
choose command> PrintCode
I have modified the https://marketplace.visualstudio.com/items?itemName=pdconsec.vscode-print. If you change the values that I have marked in the picture in the extension settings a browser tab opens with the you can then print this also works on the Ipad. It works also with the code-server Version inside a Docker Container.
I put the file on github https://github.com/chrishdx/vsc-print
enter image description here
I'm developing an app on iOS 8, and using Xcode 6.
Being on iOS, to develop code you have to go through a Edit -> Compile -> Run -> Verify cycle.
A problem that I have had pretty much forever is: How do you keep this feedback loop as minimal as possible, regardless of how many levels of navigation your application has?
Consider this example. My application has say, 5 levels of navigation before I can get to the component I would like to develop. For instance:
Login screen -> Loading screen -> Menu w/ network requests -> Screen with input validation -> Text Editor
I want to iterate on my Text Editor component really quickly.
Due to the number of levels of navigation sequence looks like this.
Edit code.
Compile code.
Run app
(Login screen) Login (optional)
(Loading screen) Wait a while.
(Menu w/ network requests) Select an appropriate item
(Screen with input validation) Input data that passes validation
(Text Editor) Check that change to text editor has taken effect (e.g. change of font size or some such)
Of course, there are challenges in architecting the app to allow testing in this way, including but not limited to
how do you supply the view controller under test with test data?
how do you guarantee the view controller under test, tested in isolation, will look as expected when integrated back into the context of the app itself?
I'm convinced the answer is almost certainly NOT functional automated testing (KIF, Subliminal, Calabash et. al.), but some way of breaking the application up into testable units. Not from the perspective of unit testing, but of User Interface testing as well.
i.e. I should be able to tap 'Run' (Cmd + R) and immediately see the editor in action.
For quick iterations, I like to make an Xcode sub-project. To this by selecting the project file (the blue one), and then doing File->New... project. In the save window, select "Add to" to place it inside your project.
Then, just add your existing files by reference (make sure not to copy them!). They will build and run independently of the rest of the larger project.
This is especially useful for testing UI code where creating a functional interface is more difficult than processing the data it displays. You can mock up some simple objects to provide data for the UI, if needed.
You then do full integration and testing back in your main project.
I find it incredibly tedious every time I edit a core data model in the XCode model builder to select "Editor -> Create NSManagedObjectSubclass", then select the project group and directory in which to place the generated files, and agree that yes, I do want to replace their old versions.
It would be really great to have a one line shell command to generate these with a default group and directory. Does such a tool exist? If not, how would one go about writing such a tool?
I don't think there's any way to automate Xcode like that. The closest you can come is the generic UI automation functionality in AppleScript, but what you're asking for is pretty complex.
Instead, you may want to investigate mogenerator. It doesn't do the exact same thing that Xcode does, but it is basically a tool to regenerate CoreData classes as part of your build system, without interfering with custom code you may want to write for the class.
Every application seems to start with me taking a similar app, thowing out the "meat" of it and using the skeleton for my new project.
I don't always get all that I want from a previous project, nor do I need everything from it, but certain things keep cropping up again and again:
about box (with contact email being generated from the app name & version number direct from the project options)
splash screen (source & duration)
only allow single copy to run
prevent task switching
acccept dropped files?
minimaize to tray
hide from task manager
recent files list
that sort of thing.
I used too have such a skeleton for C++ Builder, years ago. It just read an .INI file and customized the app's behaviour accordingly.
Before I take the trouble to port it to Delphi, does anyone know of anything similar which is freely available?
You can simply create your skeleton project and add it to the repository (IDE menu Project\Add to Repository).
If you want to be able to dynamically create different projects based on some parameters (user input) you can also write a wizard using the OpenTools API.
I'm using SketchFlow for the first time, and am confused as to why my text isn't showing up in the "Buxton Sketch" font it's supposed to (see image). I just did a repair installation, and it didn't make a difference. In the Text properties, I don't see "Buxton Sketch" as an option, either. I'd appreciate any help.
UPDATE
Everything looks fine in the SketchFlow player (when I hit F5), but not in the designer.
Compared to this:
Proper "wiggly" font http://www.lorenheiny.com/wp-content/uploads/sketchflowwigglystyles.png
I tried downloading the SketchFlow files from a tutorial I had used, and it worked fine. It turned out the difference was that my files resided within a subfolder of a directory I had named "C#" - where I've kept all of my Visual Studio source files for a long time, with no problems (until now). Moving the SketchFlow project to a different directory fixed it.
What makes it even stranger is that the C# directory is 2 levels higher up than the solution's directory, so I don't know why anything within the solution would even matter.
Are you able to create anything with that font? Can you create a textblock and set the text to the Buxton Sketch font?
We encountered this same issue - but found a slightly different solution.
In our case, SketchFlow projects were being in the default location (My Documents\Expression\Blend 3\Projects), and the screens weren't coming up with Buxton Sketch.
The difference we found is that, in our environment, "My Documents" is mapped to a network storage location (H:\Data). What we observed was:
Open the project via My Documents\Expression\Blend 3\Projects. No Buxton Sketch. :-(
Open the project via H:\Data\Expression Blend 3\Projects. Buxton Sketch OK. :-)
Click "Embed" in the Text properties on most "Sketchy" controls to get Buxton Sketch to appear at design time in Blend for MS Visual Studio 2013 (v 12.0.50429.0 update 2)
If you paste items from other sketchflow screens, ensure you paste after you have already added a "Sketchy" control to your screen and don't "Overwrite existing resource with copied resource" when a "Resource Key Conflict" occurs, "Discard the copied resource and use the existing resource" if the resources from your copied items already exist or leave as default and add them.
First, make sure you've started by creating a new Sketchflow Application from Blend 3. Then from within Blend 3 in your Sketchflow project on the toolbar, click the chevron at the bottom of the list (the >>). From there expand Styles and select SketchStyles. From there you should see all the sketchy controls like BasicTextBox-Sketch and ListBox-Sketch. Those all have the sketchy look that you want.
It shows up at design time for me.
(source: bryantlikes.com)