<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Josh Guffey on Medium]]></title>
        <description><![CDATA[Stories by Josh Guffey on Medium]]></description>
        <link>https://medium.com/@joshguffey?source=rss-970b67be9c45------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3vEv8CED1i0SK0vw.jpg</url>
            <title>Stories by Josh Guffey on Medium</title>
            <link>https://medium.com/@joshguffey?source=rss-970b67be9c45------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 14:52:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@joshguffey/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Color Changing Background on Scroll]]></title>
            <link>https://medium.com/@joshguffey/color-changing-background-on-scroll-983c42f1df42?source=rss-970b67be9c45------2</link>
            <guid isPermaLink="false">https://medium.com/p/983c42f1df42</guid>
            <category><![CDATA[javscript]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Josh Guffey]]></dc:creator>
            <pubDate>Thu, 03 Sep 2015 19:44:24 GMT</pubDate>
            <atom:updated>2015-09-04T21:48:54.309Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*u4WboJ6QDoK5lU6xfQ3l1w.gif" /></figure><p>While working on a project (I’ll be announcing soon!) at <a href="http://www.collectiveray.com/">Collective Ray</a>, our design team wanted a nice color-changing background. Now, I know we could have used a static gradient, or simply faded between sections, but I thought it would be cool if the background changed as the user scrolled down the page, in a fixed manner. Usually when I meet a challenge like this, the first thing I do is check to see if anyone else has already done it, and of course in no time I found this jsfiddle of a jQuery powered implementation: <a href="http://jsfiddle.net/cgspicer/V4qh9/">http://jsfiddle.net/cgspicer/V4qh9/</a>. It’s great, but we needed a bit more. The current version only supports fades between two colors so I forked the code and expanded on it a little bit.</p><h3>Installing</h3><p>You’ll need <a href="https://jquery.com/">jQuery</a>, <a href="https://github.com/jquery/jquery-color/">jquery.color-2.1.0.js</a>, and the bits of HTML/CSS/JS included in this <a href="http://jsfiddle.net/jguffey/mxkx9j2o/">jsfiddle</a>.</p><h3>Make it your own.</h3><p>In the fiddle, I use `&lt;section&gt;` elements to mark the content boundaries, but you can use any element you want by changing the selector on line 8, and the corresponding CSS and HTML. The array of strings in the call to `scrollColors` (line 16) is where we store the colors we’d like to transition to. Remember to change the CSS background-color property for body (our color-change target) to match the first element in this array, or you’ll still get the bright pink color when the page first loads.</p><p>Thanks to the <a href="https://github.com/jquery/jquery-color/">jQuery Color plugin</a>, hex, rgb, and even rgba values are allowed. This can yield some cool effects when layered over an image or video. The alpha channel in RGBA is animated just like the other color channels, so you could have a sold color change opacity with scroll.</p><p>Enjoy!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=983c42f1df42" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing HoroscopeApp]]></title>
            <link>https://medium.com/@joshguffey/introducing-horoscopeapp-21cfc650c867?source=rss-970b67be9c45------2</link>
            <guid isPermaLink="false">https://medium.com/p/21cfc650c867</guid>
            <dc:creator><![CDATA[Josh Guffey]]></dc:creator>
            <pubDate>Mon, 13 Jul 2015 18:40:56 GMT</pubDate>
            <atom:updated>2015-07-13T18:40:56.844Z</atom:updated>
            <content:encoded><![CDATA[<p>Here at Collective Ray we love to learn and create. So when we had some time to devote to internal product development we reached into our archives and found some inspiration. A <a href="https://dribbble.com/shots/1410274-Horoscope-App-iPhone-UI?list=users&amp;offset=19">dribbble shot of Brian’s</a> provided the perfect weekend project for us to learn about using WatchKit.</p><p>Horoscope applications are typically ugly and featured bloated. We wanted ours to be clean, airy and straight to the point. People who check their Horoscope want to do so while on the go. So, we updated the UI and created an iPhone and Watch app that allows users to quickly check their daily horoscope.</p><p>We’re giving it away for free! Please check it out <a href="https://itunes.apple.com/us/app/horoscopeapp/id993765819?ls=1&amp;mt=8">here</a>, share it with your friends, or <a href="/service/mailto:support@horoscopeapp.io">drop us a line</a> and let us know what you think.</p><h3>Technical Details</h3><p>With Watch OS2 just announced a lot of things changed but the basic ideas should continue to be useful. We won’t go into details about the code behind this project, but we’d like to share some of the high level approach, along with links to that go into the nitty-gritty details.</p><p>Our app consumes an API to get the daily horoscopes. To make this easier, we use <a href="https://github.com/Hearst-DD/ObjectMapper">ObjectMapper</a> to turn JSON feeds into Data. It’s an open source Swift framework that does all the dirty work for you, we highly recommend it (one can install it using <a href="https://cocoapods.org/">CocoPods</a>). We use ObjectMapper to do double duty in our app. Firstly, it consumes our JSON-based API that provides horoscope data to the phone. Secondly, we include it in the WatchExtension to handle receiving the data from the iPhone. We’ll go into the details of that second point now.</p><p>Getting data from the phone to the Watch is paramount for any Watch application. There is a great presentation by <a href="http://twitter.com/NatashaTheRobot">@NatashaTheRobot</a> available on video <a href="https://realm.io/news/architecting-app-apple-watch-natashatherobot/">here</a>. In her talk she covers a few ways of accomplishing this, but for our application we take advantage of ObjectMapper and simply have our iPhone app’s AppDelegate respond to `application (application: handleWatchKitExtensionRequest userInfo: , reply:)` with a JSON string of all our horoscope data. `Mapper().toJSONString(data, prettyPrint: true)` does the work of putting the NSObject into JSON format. We run a short loop that collects all 12 signs, converts them to JSON, puts them into a single response, and sends that off to the watch in the “reply” callback. Easy.</p><p>When you’re reusing Models in both your iPhone app and the Watch Extension- bundle the Model code into a framework, and add your custom framework to the build process for both apps. That’s the <a href="https://en.wikipedia.org/wiki/Don&#39;t_repeat_yourself">DRY</a> way. In our watch extension, we have a function that calls `WKInterfaceController.openParentApplication()`, and in the `reply` callback, we parse the JSON response that we setup earlier, again we use ObjectMapper to translate JSON into a NSObject. Then we render the data.</p><p>So with that, we were able to create a simple iOS application and corresponding Watch application that we’re giving away free on iTunes- and in the process we learned a few things about using WatchKit. We hope you enjoy the app!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21cfc650c867" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>