NSImageView
which has been styled to look like the image view on the login screen of OS X Lion and Mountain Lion
It should work on OS X 10.6 and up and it supports retina screens. To build the source you need ARC (must at least be enabled for the CDMedallionView.m
file).
As CDMedallionView
is a subclass of NSImageView
you can use it as you would use an NSImageView
instance. For example in code;
CDMedallionView *medallionImageView = [[CDMedallionView] alloc] init];
medallionImageView.frame = NSMakeRect(0.f, 0.f, 60.f, 60.f);
medallionImageView.image = /* some NSImage instance */;
medallionImageView.borderWidth = 2.f; // Default is 4.0.
[self.view addSubview:medallionImageView];
The class can also used via interface builder, drag out an NSImageView
and using the “Identity” inspector (⌘+⌥+3) set the class to CDMedallionView
. You can then configure it as you please using the other inspector panels. To change the shine, shadow and border width and color create an outlet to the view and then set those in code.
You can get the component from the GitHub project rastersize/CDMedallionView where you can also create issues and pull requests if you find any problems or opportunity to improve. The code is available under the MIT license. See the license file for more information.
]]>develop
branch for quite some time). It also raises the OS X deployment target to 10.6 and drops support for the now deprecated garbage collection.
Thanks to JustSid, tonyxiao and dwlnetnl for their contributions and helping to squash some bugs as well as improve the framework.
You can get it from its GitHub page, rastersize/CDEvents, and the API documentation has been updated.
(The project is still licensed under the MIT license.)
]]>CoRD is a native remote desktop client for Mac OS X and allows you the user to connect to Windows machines over the Remote Desktop Protocol (RDP). There is also the official client by Microsoft but it keeps crashing for me, especially when quitting it, and it does not have a built-in server list. Two things which CoRD provides.
Sadly CoRD has received less updates as time has passed by. A transition to FreeRDP, which is mostly required, has been planned for quite a few years now. As such I felt that the only way for me to not have to suffer while looking at the user interface graphics as well as the application icon was to fix them myself. Initially I planned to just update the existing original graphics files for retina and then re-export them as an additional @2x
file. This did not happen.
As I initially could not find the original graphics files I set out to re-create them instead, from the ground up. When at the last icon, I was unable to find a way to make the application show it in use so I looked around on the website for a screenshot of it and stumbled upon a ZIP file with the originals. Thus that last, clock, icon was more or less the original scaled to @2x
. More on the user interface graphics later, now on to the application icon.
The original application icon file did obviously not contain any retina assets since the icon was created long before Apple settled down and decided to go the iOS way with @2x
. If you are view this page on a retina screen you should be able to recognise the blurryness of the original application icon shown below.
The intention with the new application icon was to capture the look and feel of the old icon – to make users used to the old versions feel at home – while still making it feel new and shiny. Furthermore the goal was to make the icon show how CoRD bridges OS X and Windows and it being a utility application.
The icon tries to convey that it bridges the gap between OS X and Windows by utilising the starry, galaxy styled photos Apple use as desktop backgrounds by default in OS X. In turn the black cubes both reflect the connection to the Windows flags as well as the old application icon. Lastly the type of frame matches the utility application icon frame used in OS X. The frame matches that of the System Preferences icon quite closely. The new icon also fits a lot better in the dock, taking up the same amount of vertical space as Apple’s icons.
Even though the icon is almost completely made using vector shapes and layer effects in Photoshop, exporting it to 10 different sizes was a real chore… Well OK, the 16-by-16 pixel @1x
icon was created separately. See it below, preferably on a @1x
screen as it will look blurry on a @2x
screen due to scaling.
The application icon was also used a the basis for the new document icons. They are very much standard (compliant) white sheets of paper with a curled corner with the application icon in the middle. Another 10 exports in color and 10 in grayscale.
While updating the user interface graphics I tried to keep them somewhat similar to how the looked previously. Although some things were revamped, such as the next and previous session buttons which now use standard controls instead of being round custom butcons.
The new icons are, like with the application icon, intended to look quite similar to previous ones but with a more updated look. Not a lot to say about them besides that the @2x
versions look better than the @1x
.
You can check them all out by visiting CoRD’s GitHub project page or by downloading CoRD and running it directly. The Photoshop files are located in the GraphicsOriginals
directory in the root, except for the application icon where the .psd
files are located in Resources/App Icon
, while the exported .png
images exist in the Resources
directory.
All the icons and graphics are licensed under the Attribution-NonCommercial-ShareAlike 3.0 United States (CC BY-NC-SA 3.0) and the copyright belongs to Aron Cedercrantz.
]]>styles.css
. The custom theme approach probably required more effort than just hacking the classic theme but I am hoping it will prove easier to maintain and update.
Stuff left to fix are the code blocks which currently look quite awful, as well as the tables. That will have to wait though.
Update: Slightly updated today (2012-08-13); whiter, more space, new header and red instead of blue.
]]>So far I must say I like the pen but the Mac OS X application needs to be completely redesigned. It looks and acts terrible. What else can you say when it asks you to draw on your screen to calibrate the pressure sensitivity. Copy-paste job from their more traditional tablets maybe?
No it is not pretty.
I will try and post what I think of the pen when I have used it some more. Check this space for a new blog post on the subject in the future!
]]>ObjectToXPC
is a small open source project I hacked together today. It simplifies the conversion between a few Objective-C classes and the “new” XPC objects. The library also comes with unit tests which covers quite a few scenarios, woop woop!
So that might be cool but what is XPC? XPC is new technology from Apple introduced in Mac OS X 10.7 (not publically available in iOS). It allows you to separate your application in different logical parts – services. These services all run as individual processes. Furthermore, each logical part can have a unique set of sandbox privileges. For example you can have one XPC service for network based communication and another for creating a ZIP-file of some downloaded data. Thus the technology can help yoy make your application more stable and secure.
ObjectToXPC
supports a few basic Objective-C classes and most XPC Object types.
ObjectToXPC
will allow you to convert instances of the following Objective-C classes to and from XPC Objects;
NSArray
,NSData
,NSDate
,NSDictionary
,NSNull
,NSNumber
,NSString
.If you try to convert an NSArray
or a NSDictionary
instance which contains an object which we can not convert (i.e. if the method -XPCObject
is not implemented) the project will halt via an assertion. But only if the DEBUG
macro has been set. Otherwise an error will only be logged to the console via NSLog()
and program execution will continue with the object being skipped.
The following types of XPC Objects can be converted to and from the previously mentioned Objective-C classes (via for example -initWithXPCObject:
);
XPC_TYPE_ARRAY
,XPC_TYPE_BOOL
,XPC_TYPE_DATA
,XPC_TYPE_DATE
,XPC_TYPE_DICTIONARY
,XPC_TYPE_DOUBLE
,XPC_TYPE_INT64
,XPC_TYPE_UINT64
,XPC_TYPE_NULL
,XPC_TYPE_STRING
.You can find the project and the glorious source code on the GitHub project page. Feel free to fork, add and fix stuff which I have missed or forgotten. Feel free to send me a pull request, I will happily intergrate it (if it looks OK)! The Xcode project file currently contains one dynamic library target and one unit test target.
To use it you can either link with the library or copy the source files manually into you project. You need all the .h
and .m
files found in the Source
directory in case you opt for the latter case. As the XPC API was introduced in OS X 10.7 the project requires OS X 10.7 or newer, big suprise there. This is required both for building the project (with Xcode 4.2+ and ARC turned on) as well as running it. ObjectToXPC
will not build for, or run on, the iOS platform as XPC Services does not exist (publically) on it.
The project is licensed under the “Simplified BSD license” (2-clause), for the exact terms please see the LICENSE file in the repository.
Please file any bug reports in the issue tracker for ObjectToXPC on GitHub or even better fix it and then send me a pull request, also via GitHub.
Have you created an application which use any of my open source projects (including ObjectToXPC)? Please tell me about it. Not because you have to but because I would love to know! My contact details are available on my about page.
]]>