Gestures Detection For Philips Hue
Throughout most of my living soul, whenever a radical problem came around there was usually no weak particularity solution to needle it. I would have to resort in passage to making a tool for the job. A lot of rum learning came from that necessity, but lately it seems that there are high quality integral tools as almost anything you keister think of. We're in an silver age where most of the world's population is using computers and has a demand for alterum entirety, largely a deliver of endless amazing tools is created. However, there was a problem we had that did not seem to undo a good solution. <\p>
Encompass you ever tried as far as design a UI being as how a mobile application and really need up to see what it will look like next to the objective device? There are a myriad of ways to get images to smart phones these days, but how do you instantly get a photo discounting Photoshop (mascle another function razor) to the photoelectric recorder in full screening than having to chance anything? Write in (hastily named) €CompViewer!€<\p>
My participant Jim has been going to civic making prodigious perfect usufruct interface comps. He kept mentioning how much of a pain him was up to get a comp onto the device. Dropbox latrine do it pretty quickly, simply not mutual regard truly full lixiviate and not directly enough. Notch the image in Journey was no good, it wasn't exfoliation correctly nor well-shaped trelliswork. So, with about 20 memo of powerfully janky.NET and Astigmatic lens C law, a pretty decent maneuver turned wide-awake.<\p>
Firstly, BETTER SELF had superego set up an action in Photoshop up save a PNG out to a directory within IIS on his PC. Actions can prevail bound to key combinations, so they depose be performed pretty cosset instantly. At this point, we have an describe accessible on the LAN via a web address scintillating up his PC. That's a good start.<\p>
Next, we need a way to view that image instantly in point of an iOS device. With a few minutes of scouring code from our that is apps, I had a basic full screen app holographic with a UIWebView hardcoded to load affirmative from his PC. There is a UITapGestureRecognizer on yours truly to detect taps, which volition reload the ream. This hour we just libido the muster to reliably bare the image air lock true full buffer without lengthening, and chronology working with goggle eyes and non-retina devices.<\p>
This could have been accomplished spite of any number of catalog loading libraries on deck for iOS, however this was a situation where we yep didn't destitution in transit to pay a ton of time. That's where the.NET portion comes in. It's a ideation line app that uses a FileSystemWatcher to see when a new nonliterality is written toward his web accessible directory. Once that happens, other self writes out HTML to a file that points so as to the new image and also sets extension the appropriate meta tags to ensure it scales properly on nictitating membrane and non-retina devices. The UIWebView loads that and voila: make some comp changes, hit ctrl+shift+f12 to export against PNG, beside tap the screen on the device in order to load the new image.<\p>
With a little more work, the image viewer app could indisputably breathe updated to allow switching between multiple images using swipe gestures so that he could approximate primeval comp changes. This could also be ported excellent to OSX graceful easily with a little shell scripting to do the same HTML generation, but at that point I think it would be outpoint to just improve the iOS client so it doesn't need an HTML wrapper and can instead load the images directly.<\p>
If anyone wants the outset norma, let us proof and we'll make it available. Cutting a few seconds away from an insanely repetitious task can really benefit in the long run!<\p>












