I have almost completed my first app for Mac. This app is a client that when you click on a button write inside a txt file on a Dropbox folder, the server side check the file and based and what write, do something, and then rewrite the file with a report that my client app display.
I have done everything but when I ask for a "status" command the server answer with a very long report and my label and initial window size cannot display all and I must enlarge the window. I would like to make the label scrollable so I can make my app more easy to use. It should be something really similar to UITextView in iOS development.
I am coding in Swift3.
Thank you,
Matteo Collina
Related
I have spent some hours reading Google and Stack Overflow on this, the result is an increase in bafflement!
I would have thought what I am trying to do would be easy.
I have a view that includes a background image and overlayed text (its a certificate) that needs to be printed. I have the view displayed, now need to print.
I have tried following macOS Printing in Swift
and to get the window How to access own window within SwiftUI view?
The app is OSX desktop Swift and Xcode etc all latest versions.
I would post sample code but I am at a loss as at what wat to do it. Do I need the host window? Do I need to create a view just for the print? Do I need NSPrintOperation?
Many thanks.
Does anybody know, how to change the appearance of the title bar and/or toolbar of a simple & small one-window cocoa macOS application without accessing the Xcode or installing third party applications? It's for a screen recording video project, I want to do.
I know, that there are possibilities within the applications info.plist (for example changing the app title inside the top macOS Menu Bar) but I would like to be able to change the apps window title itself and/or colors and/or fonts inside the window title bar or toolbar if possible.
Opening the app in another container window or via terminal or Applescript and adding custom parameters or even an overlay in the right position to change the styling would be okay if this is possible?
Can somebody point me in the right direction?
Thank you very much!
in short: Nibs
Nib File Viewer works until Xcode 10
saving, recompiling if possible
good luck
I have just started coding an application in cocoa on OSX 10.6.8. It is well underway mostly thanks to threads I have found here. For the subtle functionality I am about to explain I've looked everywhere and really have given it my best without success. Here is the situation:
There is a browser (chrome for now but the solution should be adaptable to FF and Safari at least)
There is my chrome extension
There is my desktop app
Text/images can be dragged on my desktop app which then organises these items by source.
For a file/text from finder, except a web browser, tagging the file with its file path is the desired behaviour, for a text I simply put clipboard as the source. Now the issue is that files/text dragged from a web browser should have the website they were dragged from as the source. There is an easy fix for files: I have an extension which sets a buffer with the last active url so that all I need to check when a file is dragged is whether it comes from the chrome cache to tag it with the content of the said buffer. My problem is for text. The way text dragging is handled is by using a service which I declared in the .plist, There is a similar unanswered question on SO and a technique that seems as if it could work but it is only available for 10.7 on. I also found a link where someone managed to get the url for itunes songs dragged on his application using http://www.mail-archive.com/cocoa-dev#lists.apple.com/msg17452.html
Is there a solution to see the URL of a dragged image/text that could be handled using only cocoa?
The only other option I see is using the extension to inject javascript code into all webpages for handling the 'dragenter' event and send the content of what is being dragged together with the source URL to the desktop app via a custom protocol. I'm not too keen on script injection and I sense some complication down that path as well.
In any case thank you for your help!
Chocozor.
I am doing a minimal port of a simple iPhone/iPad app (think 2D casual game with a single view) to the Mac (almost nothing has changed in the UI, except swapping touchable Cocoa Touch UI elements for mouse-clickable Cocoa UI elements). In the iPhone app, a little "i" button brings up a text view containing basic instructions, followed by all the required (possibly lengthy) BSD/MIT/Apache/Artistic/et.al. copyright notices and their associated disclaimers for any random borrowed code.
The ported Mac app is intended to be distributed from the Mac App store, so additional README files outside the app bundle/sandbox can't be used. I note that many Mac App store apps do not put this text in the About... box, or use a little "i" button like iPhone apps.
So where do I put the equivalent README text in a Mac App Store app?
I would like this text to be included with the Mac app so that it's viewable from within the app even when the Mac is completely off-line.
ADDED:
I see recommendations for putting all this text in the About... dialog, but, if so, my guess is that many apps are skimping on all the required text that seems to go with many of these licenses (I've seen a few with a page or two of required disclaimers. Which Mac app has all that in the About... dialog?)
Just put a Credits.html or Credits.rtf file in your bundle, it'll automatically be displayed in the dialog that's shown after clicking the "About MyApp" item in the main menu.
Usually, a Mac app includes an «About» window, with the application's icon, name, version number and author.
If you have credits to display, you may display them on that window, if it's only a few lines.
If you have a long text, you should add a «credits» button on the «About» window, that eventually opens a specific credits window, with the text you want.
I have a project that I am attempting to do and we want something similar to what the Apple store does. We thought it was a Quartz Composer interactive desktop but I've been putting together an xcode cocoa solution to do it too.
Here is an image of what I'm wondering about it is just a Title and 3 images that link out to url locations. If anyone can point me in the direction they believe can make something like this I would appreciate it.
I have used Quartz Desktop to display a .qtz but it isn't interactive. If anyone knows of another quartz desktop displaying .app that does use the interactive parts such as mouse and keyboard, it would be appreciated.
Applestore demo http://img707.imageshack.us/img707/614/dsc03934y.jpg
It's a custom proprietary program called, if I remember correctly, Concierge. But it's not doing anything tricky. You can make any NSWindow appear on the desktop by setting its window level to kCGDesktopWindowLevel.