<?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 Heggy Castaneda on Medium]]></title>
        <description><![CDATA[Stories by Heggy Castaneda on Medium]]></description>
        <link>https://medium.com/@heggyy?source=rss-b067cff123a7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*WbwTQjgdMUQBIphU.jpg</url>
            <title>Stories by Heggy Castaneda on Medium</title>
            <link>https://medium.com/@heggyy?source=rss-b067cff123a7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 07:48:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@heggyy/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[reverse a String]]></title>
            <link>https://medium.com/@heggyy/reverse-a-string-9fb7b86b3982?source=rss-b067cff123a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fb7b86b3982</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Heggy Castaneda]]></dc:creator>
            <pubDate>Sun, 27 Oct 2019 03:23:26 GMT</pubDate>
            <atom:updated>2019-10-27T03:23:26.609Z</atom:updated>
            <content:encoded><![CDATA[<p>Reverse a String with built-in functions — with split(), reverse(), join()</p><ul><li>The <strong>split()</strong> method splits a String object into an array of string by separating the string into sub strings. .split(&quot;&quot;)means split at every word. .split(&quot; &quot;) means split at every blank.</li><li>The <strong>reverse()</strong> method reverses an array in place. The first array element becomes the last and the last becomes the first.</li><li>The<strong> join()</strong> method joins all elements of an array into a string.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2172718ff335db03cfc9e62ef2440b71/href">https://medium.com/media/2172718ff335db03cfc9e62ef2440b71/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fb7b86b3982" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[42 coding school dorm before you move-in tips (located in Fremont, CA)]]></title>
            <link>https://medium.com/@heggyy/2-weeks-before-42-coding-school-dorm-checkin-in-fremont-ca-for-upcoming-piscine-students-50949d68b1ea?source=rss-b067cff123a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/50949d68b1ea</guid>
            <category><![CDATA[24]]></category>
            <category><![CDATA[42dorm]]></category>
            <category><![CDATA[piscine]]></category>
            <category><![CDATA[dorm]]></category>
            <category><![CDATA[codingbootcamp]]></category>
            <dc:creator><![CDATA[Heggy Castaneda]]></dc:creator>
            <pubDate>Sat, 28 Apr 2018 06:16:42 GMT</pubDate>
            <atom:updated>2018-05-03T23:24:12.389Z</atom:updated>
            <content:encoded><![CDATA[<h3>Here is what I found about things to bring/buy before moving into my dorm room for Piscine at 42 coding school.</h3><ol><li>Bring a <strong>credit card</strong> for food</li><li>42 dorm room has a <strong>twin extra long</strong> bed — <a href="https://www.dormsmart.com/All-About-Dorm-Bedding-Sizes-Including-Twin-XL-16.html">Bedding size Twin extra long</a></li><li>The room and shared bathroom (you share with your one roommate) should be relatively clean.</li><li>There is <strong>WiFi</strong> in the dorm</li><li>Bathroom <strong>shower is tub style</strong> (you can take a bath). Bring <a href="https://www.amazon.com/Best-Sellers-Home-Kitchen-Shower-Curtains/zgbs/home-garden/13749881">plastic shower curtain</a> and the <a href="https://www.amazon.com/LIHAO-Rustproof-Stainless-Curtain-Bathroom/dp/B011R29SX4/ref=pd_bxgy_201_img_2?_encoding=UTF8&amp;pd_rd_i=B011R29SX4&amp;pd_rd_r=JJJ7SE7T9BNYN5C0DVSH&amp;pd_rd_w=chbTe&amp;pd_rd_wg=lWKQJ&amp;psc=1&amp;refRID=JJJ7SE7T9BNYN5C0DVSH">rings</a> to hook them on the shower curtain rod.</li><li>Bring <strong>cleaning supplies</strong> ex) bleach to disinfect, vacuum, wipes to kill germs, lysol spray, cleaning gloves (I am planning to clean up the bathroom as soon as I arrive.)</li><li><strong>Toiletries and shower items</strong>: <a href="https://www.travel-checklist.co.uk/">personal care</a>, toilet brush, toilet paper, Kleenex tissue, paper towel, towels, soap, shampoo, conditioner, over-the-door towel hook,</li><li>Roommate may be <strong>co-ed</strong>. ex) There is a chance you may be rooming with a male roommate even though you are a female. If this is an issue you can <strong>talk to RA</strong>.</li><li><strong>Deposit</strong> about <strong>$50</strong> when <strong>check-in</strong> to dorm which may be refunded when you check out and your dorm is clean and in a good condition as you first found it.</li><li>You will <strong>barely be in your dorm</strong> since you will be coding the whole time and come to dorm to sleep.</li><li>Personal <strong>mini fridge</strong> to keep inside your dorm room.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50949d68b1ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I won Grow with Google Developer Scholarship phase 2]]></title>
            <link>https://medium.com/@heggyy/how-i-won-grow-with-google-developer-scholarship-phase-2-eeeb940f4707?source=rss-b067cff123a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/eeeb940f4707</guid>
            <category><![CDATA[scholarship]]></category>
            <category><![CDATA[grow-with-google]]></category>
            <category><![CDATA[udacity]]></category>
            <dc:creator><![CDATA[Heggy Castaneda]]></dc:creator>
            <pubDate>Tue, 24 Apr 2018 07:35:12 GMT</pubDate>
            <atom:updated>2018-04-24T17:02:26.512Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*qkryZiXNayrKeh2lnnkvIQ.png" /><figcaption>Phase 2 Grow with Google Developer Scholarship Award Letter</figcaption></figure><p>If you have been selected as a <strong>phase 1 Grow with Google Developer Scholarship</strong> and want to set yourself for success for <strong>getting phase 2</strong> of Grow with Google Developer Scholarship. You have come to the right place.</p><p>Summary:</p><ol><li><strong>Login</strong> to Grow with Google Developer Scholarship <strong>Slack</strong> and <strong>Forum </strong>daily</li><li><a href="http://www.washingtonpost.com/sf/brand-connect/hilton/the-science-of-being-there/"><strong>Meet</strong> <strong>face-to-face</strong></a> with other local scholarship peers and post photos of your meeting on #meet-up and fill out the meetup google form (you will learn about this form from Udacity).</li><li><strong>Lead</strong> forum discussion and own one slack channel that you are passionate about.</li><li><strong>Finish</strong> the challenge course!</li><li><strong>Do good</strong> by encouraging other scholarship peers by <strong>direct message</strong> them on slack or <strong>tag</strong> @theirName on the GwG forum.</li></ol><p>Detail:</p><ol><li><strong>Login</strong>ing in consistent basis shows that you <strong>care</strong> about the Udacity community and willingness to <strong>response</strong> to other peers’ questions | concerns in timely matter. I felt that checking in at least once a day is very doable and enjoyed getting to know other regulars on slack and forum. I started to <strong>build friendship</strong> and look forward to being on <strong>Slack and Forum</strong> who are also very passionate in learning through Udacity.</li><li><strong>Meeting face-to-face </strong>with folks really helped me to make that special and meaningful connection with my local GrowWithGoogle scholars. I networked with <strong>passionate, resilient, resourceful developers</strong> who care about building a community. We met at WholeFoods, UCSC-Ext campus, SF conference.</li><li><strong>Lead</strong>ing means posting <strong>meaningful questions </strong>on forum or <strong>alerting peers</strong> on tricky part in the lesson is on their way. Leading means being <strong>present on slack </strong>and <strong>sharing</strong> must-go-to events or <strong>answering questions</strong>. Leading means be the first one to <strong>volunteer</strong> for # ama_sessions or # session_leaders for the community.</li><li><strong>Finish</strong>ing the challenge course is a <strong>must-do</strong> requirement to be <strong>qualified as phase 2 scholarship winner</strong> but I want to point out its importance once again. <strong>Finish early</strong> and be a <strong>mentor</strong> for peers since you never know what life will bring you down the road which may prevent you from finishing the challenge if you wait til the last minute. Not to mention, <strong>helping </strong>others as a mentor is a very <strong>joyful experience</strong>. You must try this out; you will thank me later.</li><li><strong>Do good </strong>for Udacity scholars by direct messaging | mention (@StudentName) them on slack | forum. I really enjoyed getting personalized chats from my classmates <strong>encouraging</strong> me to <strong>keep pushing</strong> forward to <strong>finish the challenge course</strong>. In process you get to connect with folks in a <strong>deeper personal level</strong> no matter what time zone they live in. I met so many <a href="https://sites.google.com/udacity.com/gwgdevscholarship/community/student-stories">inspiring developers</a> in various walks of life. I felt humbled when I read about peers with disabilities | chronic illness | financial crisis, however, <strong>striving to succeed</strong> through Udacity scholarship program. I volunteer to give technical mock interviews and <strong>share</strong> valuable learning resources such as <a href="https://coderbyte.com/course/learn-data-structures-and-algorithms/"><strong>CoderBytes (Algorithms &amp; Data Structures)</strong></a><strong>, </strong><a href="https://tylermcginnis.com/free-react-bootcamp/"><strong>React lesson</strong></a><strong>, </strong><a href="https://javascript30.com/"><strong>JS 30 days</strong></a><strong>, </strong><a href="https://coderbyte.com/course/learn-data-structures-and-algorithms/"><strong>NGgirls workshop</strong></a><strong> </strong>with folks.</li></ol><p>In conclusion, it boils down to <strong>how much do you care about your learning and its community</strong> around it. It helps tremendously when you <strong>build close network</strong> with your classmates because learning becomes <strong>social and effortless</strong>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eeeb940f4707" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Factorialize a Number]]></title>
            <link>https://medium.com/@heggyy/factorialize-a-number-aa2ae4052c26?source=rss-b067cff123a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa2ae4052c26</guid>
            <dc:creator><![CDATA[Heggy Castaneda]]></dc:creator>
            <pubDate>Tue, 17 Apr 2018 08:42:05 GMT</pubDate>
            <atom:updated>2018-04-17T08:42:05.225Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*27dJ0B7MlJtiVvhxwtmQmA.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2469880f789565d1da62713af9d033c6/href">https://medium.com/media/2469880f789565d1da62713af9d033c6/href</a></iframe><ul><li>Recursion main take away:</li></ul><ol><li>function can see itself</li><li>function can call itself</li></ol><p>To see what information gets stored in the recursion case, set var result in Recursive case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*1vg1b_XPv74kfyo1e8Puhg.png" /></figure><p>5! = 5 * 4 * 3 * 2 * 1 // n!</p><p>4! = ___ 4 * 3 * 2 * 1 // (n-1)!</p><p>Watch for the pattern</p><p>`n! = n* (n-1)!, where n is 5.`</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa2ae4052c26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iPhone iOS app my learning journey]]></title>
            <link>https://medium.com/@heggyy/iphone-ios-app-my-learning-journey-f2faec7572cc?source=rss-b067cff123a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2faec7572cc</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Heggy Castaneda]]></dc:creator>
            <pubDate>Wed, 14 Mar 2018 08:32:26 GMT</pubDate>
            <atom:updated>2018-03-14T08:32:47.692Z</atom:updated>
            <content:encoded><![CDATA[<p>I am a JavaScript developer who is learning to code iOS app.</p><ol><li><a href="https://medium.com/@heggyy/lets-xcode-together-my-first-ios-app-43da6d2e433b">PhotoFilter</a></li><li><a href="https://medium.com/@heggyy/ios-tip-calculator-ce1633b7f5da">Tip calculator app</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2faec7572cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[iOS app: tip ‍ calculator]]></title>
            <link>https://medium.com/@heggyy/ios-tip-calculator-ce1633b7f5da?source=rss-b067cff123a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce1633b7f5da</guid>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Heggy Castaneda]]></dc:creator>
            <pubDate>Wed, 14 Mar 2018 08:22:56 GMT</pubDate>
            <atom:updated>2018-03-15T06:57:06.334Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Goal</strong>: Build tip calculator iOS app that calculates different tip amount dynamically.</p><p><strong>Code</strong>: Check out my <a href="https://github.com/heggy231/iOS-TipCalculator/blob/master/README.md">Code repo</a> for complete code. 👩🏻‍💻</p><p><strong>Take away</strong>: I had to think hard 🧐 on how to dynamically update app to calculate right tip amount when user tap on different tip button. The major break through is connecting tip buttons. In iOS buttons are segmented arrays and each button can be represented as index of array. Once I realized that 🦉then it was really matter of creating my tip [18%, 20%, 25%] array which mapped to corresponding index of button segment. Ex) segmented button index 0 maps to my tip array 18%. (Zero based index)</p><p>Lastly, linking view to function or variable inside of Swift was magical 😍 moment to me. 😮 I ❤️ how iOS app coding is very visual like I am coding inside of debugger. Go Swift! 👩🏻‍💻</p><ul><li>Let’s open Xcode. File &gt; New &gt; Project &gt; Single View App</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PnuBStKad-g8QgX8Ul7kDg.png" /><figcaption>File&gt; New Project</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NxrSHAcVSC3l6jtabjPazw.png" /></figure><ul><li>Product Name: tippy</li><li>Team: this is your team name that is registered with Xcode on your macBook</li><li>Organization name: Leave it default</li><li>Organization Identifier: It is your website name but reverse DNS order.</li><li>Press Next &gt; save it on your desktop &gt; Create</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0wn0VZn7ja0odvjG0NTZvw.png" /><figcaption>Name your project</figcaption></figure><ul><li>tippy app is up</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3fumRuq-mgy582MwnTw8wA.png" /></figure><ul><li>Notice few toggling of panels to have left hand and right hand panels on/off buy pressing this buttons.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5mN5_7A0cllp9kn7Z-tVMQ.png" /><figcaption>Toggle Panels by clicking on it</figcaption></figure><ul><li>Next, click on Main.StoryBoard</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AxdVZzHg6kF7SBuk-4reAA.png" /><figcaption>Main.StoryBoard</figcaption></figure><ul><li>Click on the Big box inside of View Controller to select &gt; click on the document icon (File Inspector) &gt; Uncheck box ‘Use AutoLayout’</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t1qs2P2k7aEAbBJzVojSyg.png" /><figcaption>Disable AutoLayout</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qnpw2LbO9gaOAQ5nkZOk4Q.png" /><figcaption>Disable Trait Var</figcaption></figure><ul><li>Zoom in by double tapping</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*Lokpy6cXvZ2YQs5j_4RhSQ.png" /><figcaption>Zoom by double tapping</figcaption></figure><ul><li>Search Object library for ui label and drag into main app view: ‘uilabel’</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*2DxB2mAeteebx75QguW0wQ.png" /><figcaption>uilabel found</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*tSLI_-UZq5-IxSTi0oMxVQ.png" /><figcaption>Drag in Label inside of main rectangle app area</figcaption></figure><ul><li>place the Label upper left hand side of the main app view</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*OniYHTa4uBamb0mIenxRog.png" /><figcaption>UILabel is up</figcaption></figure><ul><li>Next, Search Objec (Obj) library (lib) for ‘uiview’ &gt; Select ‘View’ element &gt; Drag into Main view area.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xjc8u-tW32ddE9NwwpXSDA.png" /><figcaption>drag View</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ke097UNPLU4Orla31JzlAQ.png" /><figcaption>View is up now</figcaption></figure><ul><li>3rd, element Search Obj Lib: ‘button’ and drag in to main app view.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*27n2JyK_5-K3vvSaOMcnoA.png" /><figcaption>Drag Button into main view</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U2YC2nRYtS-UYiUq4JiUTw.png" /><figcaption>Button element up</figcaption></figure><ul><li>Look to your left side panel, check out the listing of all the elements you’ve added. This is similar to layers view in photo shop.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kItwMW2Dd7EbEKX8CJo-JA.png" /><figcaption>Layers’ View or Document outline consists of Label, View, Button elements we added</figcaption></figure><ul><li>Next, click on upper right hand corner of panel &gt; select ‘properties’ icon</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OZl2Dslet7gflfwkq9A1aw.png" /></figure><ul><li>Try changing background color of ‘view’ icon: Click on ‘view’ &gt; make sure Property icon is highlighted in blue &gt; change background color to light grey.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*06Z6QMf8Dll8VAr8WukHOQ.png" /><figcaption>pick view’s background color</figcaption></figure><ul><li>To see the options for simulators &gt; click on active scheme button &gt; you can see many versions of iPhones.</li></ul><p>Note: if you have your iPhone</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GpQ8-1o1Tpn4DNSIm0_eug.png" /><figcaption>simulator size</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*eTmuhArcb1VRSPY1UERe2Q.png" /><figcaption>Different iPhones</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*1GcKKAauQJgyinoR930lNA.png" /><figcaption>Once plug in my iphone to mac book &gt; I can see my iphone device</figcaption></figure><ul><li>Comamand + r (or hit the play button) to run simulator. I have my device connected so I will now see it running on my iphone.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tm8IzjYKJeS1z2cG3wjkmg.png" /><figcaption>running on my iPhone</figcaption></figure><ul><li>Or pick iphone 6s simulator &gt; hit play button (Comamand + r)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Ca319h-yWRictczyq3Ofw.png" /><figcaption>iPhone 6s simulator up</figcaption></figure><ul><li>iOS app) it is ok to have absolute position. What you see it what you get. Move Label to the left on the stortyboard &gt; hit play button (command + r). Notice the change is reflected on your simulator.</li><li>Let’s nest element Label inside of view element (creating hierarchy of parent &gt; child relationship)</li><li>Drag ‘label’ inside of ‘view’ element</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*gSATmRjDfpREhXbMpH1WMg.png" /><figcaption>Nesting label element inside of view element</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M5_E1UdQMQmGZE0-kc-s7g.png" /><figcaption>Notice hierarchy has changed Label is nested under View</figcaption></figure><ul><li>Hover over view &gt; see the mouse icon change to hand icon &gt; grab view and notice Label and View moves together since they are grouped together (nested).</li></ul><p>Note: Why do we group? Use case1: Hide/Fade-in all elements that are grouped together. Use case2: Insert animation all elements grouped together get the special effect.</p><p>Note: Reason absolute position is encouraged in iOS development (where in HTML, it is a major violation) is once we apply auto layout on top of absolute positioning then auto layout helps the app to be responsive (stretch this element or make it landscape as iphone behavior requires)</p><ul><li>Hit Play to view the updated app.</li><li>Time for real building to start. Delete all the elements.</li><li>Search ‘uilab’ &gt; drag 4 labels into the canvas ui</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cZL56XYvm-KC878K_y9sXA.png" /><figcaption>deleted all elements and searched ‘uilab’ &gt; drag labels four times</figcaption></figure><p>Note: Quickly copy elements on canvas: drag one Label on canvas &gt; click on Label element &gt; option + drag (on the canvas) which quickly copy elements. This way we don’t have to drag 4 different times from obj lib to canvas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FQJ6rRSy4INloXNDsMm00Q.png" /><figcaption>option + drag to quickly copy elements</figcaption></figure><ul><li>Search ‘uiview’ &gt; drag ‘View’ on to canvas</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L-fVZZ8BtnB8FW3NoIne7w.png" /><figcaption>uiview View element added</figcaption></figure><ul><li>Align the buttons as shown here and flatten view element to make a horizontal divider &gt; add background color: grey</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CXt75qfTM-C2K_YlosVEBA.png" /><figcaption>buttons aligned to look nice and horizontal divider with grey background color</figcaption></figure><ul><li>Left align Bill, Tip, Total. Search ‘uitext’ &gt; Drag ‘Text Field’. Right align second column. See below for update elements.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rDX7rl02B5F40K0IVqGRMg.png" /><figcaption>right align second column</figcaption></figure><ul><li>Align all element to most right or left. Search segmented control (iOS version of radio button) &gt; drag</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iQBh-5XgqeEC7RNG7BkJbA.png" /><figcaption>segmented control last element to add</figcaption></figure><ul><li>Make 3 radio buttons: Segments: 3</li><li>Name buttons (18%, 20%, 25%), press return to save change each time.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cQapsAia1fNfcFMen0Aa8w.png" /><figcaption>Radio button (segmented control iOS name)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1iF09HJFgatbGuFBOw5Msg.png" /><figcaption>rename buttons and hit return</figcaption></figure><ul><li>Command + R (play). Now we are done with designing our app.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o9wQqYIGH3vsMdhyu9VnZQ.png" /><figcaption>iphone App</figcaption></figure><p>Note: <a href="https://pttrns.com/iphone-patterns">https://pttrns.com/iphone-patterns</a> This site has many iOS app and we can generalize that most iOS app use 4 -5 commonly used object library view elements.</p><ol><li>image view/ text on top</li><li>button (settings button gear looking thing)</li><li>tab bar (bottom tool bar on many apps to toggle to different section of app)</li><li>map view (displaying google map API)</li><li>ui web view (displaying portion of web page)</li></ol><p>There are very small number of controls that we end up using in iOS app. No need to get overwhelmed by object library.</p><p>Master view layouts means master above view types (image, button, tab bar, map, ui web) really well and corresponding properties (configuration and setting their behaviors).</p><ul><li>Important: under object lib: <strong>Navigation Bar</strong>. <strong>Never NEVER</strong> manually drag it into your canvas.</li><li>How to add <strong>navigation</strong> bar <strong>RIGHT</strong> way: <strong>Editor &gt; Embed in &gt; Navigation Controller</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1iuR0zSYeoLkZ8KASr9eDA.png" /><figcaption>Navigation Controller to Embed in Navigation Bar</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*exQpGMrx_VcVbZqNccj0-w.png" /><figcaption>Navigation Bar is on</figcaption></figure><ul><li>At this point, Command + R to Run the app.</li><li>Add Title: Tip Calculator on Navigation bar</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eEckxe9_Ci8Tjk1cUAobPg.png" /><figcaption>Title our app</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lg6YcLIdWu8JJx5vNv8nfQ.png" /><figcaption>hit play to see your changes reflected on your app</figcaption></figure><p>This is ends the <strong>designing the view layout</strong>.</p><ul><li>Add functionality to the app</li><li>Check if keyboard is connected to the app. Click on simulator <strong>iPhone &gt; Bill text box area &gt; Hardware &gt; Keyboard &gt; Connect hardware keyboard (if you don’t see keyboard on your simulator: command + k to bring up the keyboard). </strong>This is called <strong>Toggle keyboard (command + k)</strong></li><li><strong>Dismiss the keyboard view:</strong> <strong>Add </strong>obj lib:<strong> ‘tap gesture recognizer’</strong> &gt; drag onto the main part (bigger white space of your app (main view), careful not to put it under any special buttons)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ndCYKLRmu-1TyEqpBS7EYg.png" /><figcaption>Tap Gesture Recognizer</figcaption></figure><ul><li>Now we have gesture recognizer set on main view, let’s add some dynamic behavior (functional). With <strong>Tap Gesture Recognizer</strong> selected on left panel (highlighted in blue) &gt; click on top right side <strong>double ring icon.</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SVZPhkz7E1q13T4L3ZyXEg.png" /><figcaption>Very top Double Ring icon to show Swift code</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ztMf5VlC_wOYneITxhWJmw.png" /><figcaption>side by side view on right side with swift code on right side</figcaption></figure><ul><li>Control +drag tap gesture recognizer into the code block within the class ViewController code block. Notice it is <strong>right before last curly ( ‘}’ )</strong>of the class function.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*384NH8fc33VeIW98_e0_mg.png" /><figcaption>Drag tap gesture recog &gt; code block</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H-A5XAZ7jnvuR79vRzOiag.png" /><figcaption>onTap function is now created</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ufFXIJfMSMy6J3sWmePR8g.png" /><figcaption>highlight Tap Gesture &gt; double tap to confirm Action set on it</figcaption></figure><ul><li>Try it out. Build by hit play button &gt; tap main part of the app (big white blank background of app). Do you see hello in debugger console?</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cOpHrcHIfgDh7ELCa_heiQ.png" /></figure><ul><li>Code: Hide the keyboard `view.endEditing(true)`</li><li>Hit play and try it out on your simulator. Does keyboard hide?</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FY1VqpDdYadDUR9PWuEBmg.png" /><figcaption>hide keyboard</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/1*ktFJ76GWnKHkc1TswsiEYg.gif" /><figcaption>Toggle keyboard</figcaption></figure><ul><li>Click on Bill: Notice that for Bill, we want number keyboard to show up.</li></ul><p>Look around what text field properties there are. Note: Secure Text Entry for password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XI7ZQwVaem4_KZLfkGG1lQ.png" /><figcaption>Learn text field property</figcaption></figure><p><strong>User story</strong>: When click on Bill field, number keyboard is display.</p><ul><li>Select Bill text field &gt; Text Input Traits &gt; Keyboard Type &gt; Decimal Pad</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*ZjV8ZyzDVyQPQYRGu7SWxA.png" /><figcaption>Decimal Pad keyboard to pop up</figcaption></figure><ul><li>Hit Play button to save and check if number keyboard is displaying.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*3VjLtg2CnHPLpvrPDvkO6g.png" /><figcaption>decimal pad displays</figcaption></figure><p><strong>User story:</strong> Calculate tip.</p><ul><li>Select Bill: Text field &gt; Right click (double finger on MBP).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XPIwHQ2ZLlJ1VJD-4kLECA.png" /><figcaption>Notice Sent Events</figcaption></figure><p>Note: <strong>‘Sent Events’ </strong>section lists <strong>all the events</strong> that can happen in text field. Ex) If my finger touch down &gt; fire some action. If Touch up inside &gt; Do something.</p><p>User story: Every time user changes the Bill: text field, update the tip value.</p><ul><li>Drag Editing changed into code &gt; Name: calculateTip</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rP92TWk5wMUp5h1wudnOQQ.png" /><figcaption>link editing changed action to Code which will calculate Tip</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ci-VsfhaEDJJc4XbSIAezg.png" /><figcaption>Editing Changed calls calculateTip</figcaption></figure><p>User story: <strong>calculateTip</strong> function <strong>dynamically updates</strong> <strong>Total</strong> and <strong>Tip</strong> values.</p><ul><li>Ctrl + drag from Tip value <strong>$0.00 </strong>to code. Whenever we want to modify something, we drag that field and connect to the code field.</li><li>Name: tipLabel (Notice the naming convention. First part of name: tip is description what it does. 2nd part of name: Label is type.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eberVRG-6_vfEEsHOdfcbQ.png" /><figcaption>Set val to code</figcaption></figure><ul><li>Ctrl + drag from Total value <strong>$0.00 </strong>to code. Name: totalLabel</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eO2-wU_IcDfY2SpgbIOzug.png" /><figcaption>Connect &gt; Name is totalLabel</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*21XRRDQAb6HtWttqm6gjQg.png" /><figcaption>Connect from left panel List to code also.</figcaption></figure><ul><li>Add functionality to calculateTip function:</li><li>Assign Tip: $10, Total: $110</li><li>This accomplishes: calculateTip function can configure user views as change occurs on Bill field.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*jrHoFHXl8I6a3ZrR4Dt3FA.png" /><figcaption>Assign static values to tipLabel and totalLabel ($10, $110)</figcaption></figure><p>Notice: As you type you can see other functions we can add to tipLabel. We can change background color tipLabel.textColor. We can align text as we saw under properties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*8Hkde6P6FNnCSHcGDzc4BQ.png" /><figcaption>Other things we can do to tipLabel</figcaption></figure><ul><li>Run it, When typing input into Bill text field &gt; Tip and Total values gets set to $10, $110 respectively.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*sUSqsggp3oXbiGbjRWp8Hw.png" /><figcaption>Tip Total number gets assigned when Bill value is changed</figcaption></figure><p>Now, let’s dynamically change Tip and Total values.</p><ul><li>Ctrl + drag Bill Field to Code, Name: billField</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eUo6gcPu_H1b15_Xgt6Bqg.png" /><figcaption>Naming Outlet billField</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_WtPDMPLwRorR4FDgkFMjA.png" /><figcaption>billField now connect from view</figcaption></figure><ul><li>calculateTip function:</li></ul><p>// Double ( string ) &gt; converts string into number ex) billField.text is string.</p><p>// Notice ! &gt; Swift really likes !</p><p>// ?? &gt; otherwise. If <strong>Double(billField.text!) </strong>is not valid (ex: If user inputs ‘abc’ inside of Bill field &gt; Swift won’t be able to convert ‘abc’ into number &gt; Therefore set default value 0.</p><p><strong>let bill = Double(billField.text!) ?? 0</strong></p><p>// <strong>\( </strong>*Whatever inside here will be treated as variable* <strong>)</strong></p><p><strong>tipLable.text = “$\(tip)”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5jzCh85ux7DiFXiEZYwU1g.png" /><figcaption>20% tip</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*40dFz3gddZrf5jhv-gvPQw.png" /></figure><p>User story: Number format should be currency (two zeros after decimal point) format.</p><p>// $“%f”, tip replaces %f and following tip is processed as variable (%f for decimal values)</p><p>// “%@” &gt; strings | other objects</p><p>// “%d” &gt; extra values</p><p>tipLabel.text = String(format: “$%f”, tip)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tSszh6qcvKuOftuhKALXLA.png" /><figcaption>format to show decimal points</figcaption></figure><p>Once you run it, now we have too many decimal places.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*rLkfeeJDJiE1n5Zq-YifIw.png" /><figcaption>really long trailing decimal places</figcaption></figure><ul><li>Fix this we specify how many decimal places we want to display: “$%<strong>.2</strong>f” (we want 2 decimal places)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QSDeAvpcGTJwENvilE8lHQ.png" /><figcaption>format 2 decimal places “$%.2f”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*6B2lu3CwCOqWsZ947Unk6Q.png" /></figure><p>User story: When user tabs 18%, 20%, 25%; tip amount should reflect corresponding tip.</p><ul><li>ctrl + drag from Tip buttons (segmented tabs) to code. Name: tipControl</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bs4IOQxMvV_qvnYGYUhU_A.png" /><figcaption>tipControl</figcaption></figure><ul><li>Incorporate tipControl’s segmented Index which each tab corresponds to array index 0, 1, 2</li><li>Run to test tip calculating correctly. It is reading the tip val correctly but tab toggling doesn’t trigger new updated value to show up.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EAreEz-A2TRl6wJNQ6kMSA.png" /><figcaption>Select the UISegmentedControl! tipControl variable</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AtjOmuAL4rqrqTscrBjPBg.png" /><figcaption>tipPercentages[tipControl.seletedSegmentIndex] will retrieve assigned value of array</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G0JL7swnlqmrPv0NrfZ75w.png" /><figcaption>tip is calculating for right segment</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*mFu4ZFU-Km-IneOKvGHWvA.png" /><figcaption>Bug found: When toggle to different tip amount tab &gt; amount doesn’t get updated</figcaption></figure><p>User story: As tip tab changes as tip and total value should dynamically update.</p><p>Notice that when toggling to different tip amount tab, the tip and Total is not triggering calculateTip function.</p><ul><li>Go to tip segmented buttons &gt; right click &gt; value changed &gt; Ctrl + Drag value changed on top of calculateTip function.</li><li>Once done right click on tip segmented to see the assignment on value changed.</li><li>Anytime user tabs on any part of tip buttons &gt; calculateTip function will execute to provide newly updated value.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r2yEZtvSJE8hfvnstaD2mQ.png" /><figcaption>Ctrl + Drag Value Changed to calculateTip function</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s_pUPPWD3NdgAKppZKWsaA.png" /><figcaption>Right click on tip button to see the value changed linked to calculateTip function</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M0tDjPs9rAT7lOvgs8S3vw.png" /></figure><ul><li>Hit Play button to run the simulator. Tip and Total values are dynamically calculates corresponding tip amount as user clicks on 18%, 20%, 25% tip buttons.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/1*EMXr4iHwoYQpAKopjEHILw.gif" /></figure><p>Thank you <a href="https://www.codepath.com/iosbootcamp">CodePath</a> and <a href="https://youtu.be/AG2QDwmj64A">SwiftGuy</a> for tutorials to make my tip calculator post possible.</p><ul><li>Resource1: <a href="https://courses.codepath.com/snippets/ios_university/prework?lipi=urn%3Ali%3Apage%3Ad_flagship3_messaging%3BbDExZJTmRL63ONzRxCCKrw%3D%3D">iOS App Documentation of walk thru</a></li><li>Resource2: <a href="https://www.youtube.com/watch?v=lyR8w6zmxVc">CodePath Tipper YouTube Tutorial</a></li><li>Resource3: <a href="https://youtu.be/AG2QDwmj64A">SwiftGuy Calculator YouTube Tutorial</a></li><li>Resource4: <a href="https://developer.apple.com/videos/play/wwdc2014/402/">Intro to Swift by Apple Dev</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce1633b7f5da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First iOS app: Photo  Filters App (iOS app)]]></title>
            <link>https://medium.com/@heggyy/lets-xcode-together-my-first-ios-app-43da6d2e433b?source=rss-b067cff123a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/43da6d2e433b</guid>
            <category><![CDATA[photo-filters]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Heggy Castaneda]]></dc:creator>
            <pubDate>Thu, 08 Mar 2018 10:30:15 GMT</pubDate>
            <atom:updated>2018-09-29T22:07:08.125Z</atom:updated>
            <content:encoded><![CDATA[<p>I am a JavaScript developer who wants to dip my toes in Xcode iOS app development. I built this app overnight 🦉and so can you! For extra fun, I created a <a href="https://youtu.be/BYID2Xo6KQ4"><strong>Youtube video</strong></a>.</p><p>Take away: To build iOS app, we need Mac Book and Xcode. Use Single View App when picking which project. Ctrl + drag is magical ✨</p><p>Goal: Build <a href="https://github.com/heggy231/PhotoFilters/blob/master/README.md"><strong>Photo Filters App</strong></a><strong> 📱</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*eA6V0_vjdgB3Y38Z2HjnoA.gif" /><figcaption>Demo of finished photoFilter app</figcaption></figure><ul><li>Step1) Install <strong>xcode</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*omBc7dhl-lBbOJf9-h45GA.png" /></figure><p>I googled and found this video: <a href="https://youtu.be/g-Lsk7ypjDI">How to install Xcode on a Mac OS X</a>. In process of installing Xcode, I realized I already have Xcode. Kudos to me! :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6fFdO8c9v1k43dmA5CRroQ.png" /></figure><ul><li>Start coding with swift on Xcode IDE using apple’s <a href="https://developer.apple.com/swift/blog/?id=16">First Swift App Video</a>.</li></ul><p>Most of my first go to’s are learn by watching a video of someone showing me step-by-step video.</p><ol><li>Create a new Xcode Project</li><li>Single View App (Xcode’s built-in template)</li><li><strong>Name of Product:</strong> PhotoFilters</li></ol><ul><li><strong>Organization identifier (bundle ID*):</strong> com.google (Make your own ID)</li></ul><p>Note: Guide on how to make your own ID. If you have (or wish to have) a website name google.com make your bundle ID: com.google (this format is called reverse-DNS format) Just as putting the cart before the horse so, com before google)</p><p>For further reading about bundle ID: <a href="https://help.apple.com/xcode/mac/current/#/deve21d0239c">https://help.apple.com/xcode/mac/current/#/deve21d0239c</a></p><ul><li><strong>Language:</strong> Swift</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*A-AOJ0vrXXD_WuOSC-ikzA.png" /><figcaption>Organization identifier (bundleID)</figcaption></figure><ul><li>Click Next. Save your project. I saved mine under document folder.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*VAK1vdtYvNS4kBCo7M-HYA.png" /><figcaption>save my first app</figcaption></figure><ul><li>Now we are inside of setting’s view. Check out left panel.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gs9f1F6H7IgDf-dFVLcLpw.png" /><figcaption>setting’s view</figcaption></figure><ul><li>Left side lists files that make up PhotoFilters app</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*-vVlBTeER6jkea-pqMUIxw.png" /><figcaption>all my files are here</figcaption></figure><ul><li><strong>Add a photo</strong> into <strong>PhotoFilters</strong> folder by drag and drop. <em>Note: Use colorful photo since we will be changing hue of photo by adding random filters. Thank you, </em><a href="https://medium.com/@heatem"><em>Heather</em></a><em> for this tip. I originally had a black and white photo and it didn’t work that well.</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/221/1*7qsFXwGhm9NegKIJs1RYbg.png" /><figcaption>drag your photo</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*JsJ4Lq6KywNronuyTXE1fA.png" /><figcaption>Bright Parrot photo</figcaption></figure><ul><li>Next, Designing the app: Go to <strong>Main.storyboard</strong></li></ul><p>Storyboard is where we can visually edit web’s interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*2OjLzKrL3FhlXIy2-an42w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UDgUz--gdNqxYgZbs8cjEA.png" /><figcaption>storyboard ui</figcaption></figure><ul><li><strong>User story 1</strong>: PhotoFilter app should have a view function to <strong>display the photo.</strong></li></ul><p>iOS, ‘image view’ is object (obj) that draw image on the screen. Go to Object (obj) Library and Search for ‘image view’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*XA8CnXBPjlp9Os0iNhQnJQ.png" /><figcaption>bottom right hand side obj lib &gt; search ‘image view’</figcaption></figure><p>Drag ‘image view’ obj into view controller and center it. Notice the dotted blue guide lines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*8zKGZJ0pe6P5rVVx841Pog.png" /><figcaption>centered image view on view controller</figcaption></figure><p>With <strong>image view</strong> <strong>selected</strong> (you will see <strong>blue outline</strong> with little square in each corner and mid line of the rectangle), click on Attribute inspector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*D-HoK3SPe_K3wDsnoqJtOg.png" /><figcaption>Selected View with blue outline and squares in each corners</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/147/1*gOI7oLva8hUSBn3uSp-tTQ.png" /><figcaption>top right hand side attribute inspector</figcaption></figure><p>Attribute Inspectors: Sets various properties for objects in interface.</p><p>Go to <strong>Image drop down</strong> select the <strong>image</strong> we want to display.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*40JHc7cUu4ulTPRshORoLg.png" /><figcaption>Select our image from earlier. Mine is parrot.jpeg</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*77YckDnPx0kD8EWCTzpI6A.png" /><figcaption>Parrot is showing up on main.storyboard now!</figcaption></figure><p>Select: <strong>View &gt; Content Mode &gt; Aspect Fill </strong><em>(‘Aspect Fill’ makes the photo </em><strong><em>fill in</em></strong><em> the screen.)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/289/1*4urFf9b8sy5ChjA-mRdU8A.png" /><figcaption>Select Aspect Fill</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_BliP43h_KqiLSKLiljJIg.png" /><figcaption>User Story 1 — Done!</figcaption></figure><ul><li><strong>User Story 2:</strong> App UI should display <strong>App title</strong> and user may click a <strong>button to change filters</strong> on photo.</li></ul><p>Use navigation controller to display top navigation bar|bottom tool bar.</p><p>To add a navigation controller, click <strong>view controller icon</strong> on top bar of view controller. Then select <strong>Editor &gt; Embed In &gt; Navigation Controller</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*xm1rSPlKZFURqaOS2xaNOQ.png" /><figcaption>view controller icon is selected</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*ZH3x1BVqMzi4Ol0PJIfGXA.png" /><figcaption>To display Navigation Controller</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*pUID5ygkMR7lJtpSUWEjOQ.png" /><figcaption>Now Navigation Controller is displayed</figcaption></figure><p>Click on your photo to show on top of the Navigation Controller. Notice that View controller now has <strong>top bar </strong>(shown in gray on top of my photo).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*KEWb3wXbKyZ7URmEoZM9fQ.png" /><figcaption>My app with navigational controller</figcaption></figure><p><em>Extra: You can move your app by selecting the view controller bar (bar with three little icons). I moved it to the right so I see Navigation controller on the left and View controller on the right.</em></p><p><strong>Add title</strong>: <strong>Double click middle of top bar </strong>to see blue section appear. Add <strong>Title: Filter</strong>. Press return to save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*GcPb3Sot9jyal6-Wo0VDGQ.png" /><figcaption>Navigation Title</figcaption></figure><p><strong>Add Bottom tool bar</strong>: Navigation Controller &gt; <strong>Attribute Inspector &gt; Shows Tool bar</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xc9wdujSHqAiJdDV6GVzCA.png" /><figcaption>Add bottom tool bar</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*4NQ9JAHP6eNzhyjzp2igfw.png" /><figcaption>Now bottom tool bar is displayed (in grey)</figcaption></figure><p><strong>Add Button: </strong>Search <strong>‘bar button’</strong> in the <strong>object library</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/268/1*C6cCKJXeEwVs73iFIG2D9Q.png" /><figcaption>search ‘bar button’ in obj lib</figcaption></figure><p><strong>Drag ‘Bar Button Item’ </strong>into the <strong>bottom bar </strong>of the View Controller.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*hgHaZx3nI93YhqzQuImJRg.png" /><figcaption>Drag and drop into bottom bar</figcaption></figure><p>Double click the item to change its title to ‘Apply Filter’ &gt; press return to save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*VUzeU_Ma8SJGIi45oLTi5A.png" /><figcaption>Rename Item &gt; Apply Filter</figcaption></figure><p>To<strong> center</strong> my bottom bar title: Drag and drop <strong>Flexible Space Bar</strong> Button item either sides of title.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*mMG28eVnNQeH0SjSJlDbxQ.png" /><figcaption>Adding Flexible Space Bar both sides of title</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*zojdusGAv-bZjKAZG4Q4Lw.png" /><figcaption>Bottom bar title is now centered!</figcaption></figure><p>Let’s preview how the app looks on iPhone. Open the assistant editor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/199/1*auNx9gA4rrRLyUYK493z9w.png" /><figcaption>Show Assistant Editor to preview how it looks on iPhone</figcaption></figure><p>Switch <strong>Assistant Editor &gt; Preview</strong></p><p>Then to give ourselves some room, we click on tool bar collapse icons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*ugjiRc_JACSCufMG1XpXoQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/107/1*lH7jUwcVOUY78JxYwwhNQA.png" /><figcaption>Collapse side tool bars by clicking on blue icons left, right</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*kUwlbTUF6lzqsHn6ir7rsQ.png" /><figcaption>Preview on the Right</figcaption></figure><p>To make <strong>photo is responsive</strong> &gt; Select <strong>image view &gt; Resolve Auto Layout Issues menu &gt; Add Missing Constraints</strong></p><p>Now interface scales responsively for iphone, ipad, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*UL28-OyLNuhezPeb46xXrw.png" /><figcaption>Responsive default setting</figcaption></figure><p>Click ‘+’ on Preview &gt; Select iPad to check for photo responsiveness.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9hpbSolQyreWuglNYcX8yQ.png" /><figcaption>iPad ok!</figcaption></figure><p>Connect user interface to code (swift). Code associated with this is in ViewController.swift file. Therefore, switch<strong> Assistant Editor</strong> from Preview to <strong>Automatic </strong>(ViewController.swift).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*D5OGd4PI0EEw2PA6pVwlNg.png" /><figcaption>To see Code</figcaption></figure><p>Add some function directly from UI to code. While holding down ctrl key drag from our image view into code. This creates Outlet. (‘Insert Outlet or Outlet Collection’) <strong>Outlet</strong> is <strong>variable</strong> in our code that is <strong>linked to an object </strong>in the story board.</p><p>In pop up, Name: photoImageView &gt; return (or click Connect) to create the variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*K0bX5TFjL1MIyr5JIvWG8w.png" /><figcaption>Build Outlet</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*t-NXbYeWqOoKCqCsiyu8HA.png" /><figcaption>UI &lt;&gt; var photoImageView</figcaption></figure><p>Let’s created space to render <em>(process to build an output image)</em> the filtered image before displaying in UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/1*hDVWGns7UNMkEN1o2SqF7g.png" /><figcaption>Place to render</figcaption></figure><p>Give Apply Filter button functionality (when user taps on Filter button &gt; apply filter). While holding down ctrl key, drag Apply filter button to the code.</p><p>Pop up window, Connection: Action, Name: applyFilter</p><p>Press enter to save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*ZdxZZAY7omQPmJ1bzwiwcQ.png" /><figcaption>Drag right below context</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*T2lb5Fh2Sza9vvPhCbvOIg.png" /><figcaption>Give it Action and name: applyFilter</figcaption></figure><p><strong>Apply random hue filter</strong> to image when <strong>applyFilter</strong> method is called. This behavior is in system built-in <strong>core image</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*OBxAuLe1IE9APXeKboKZUA.png" /><figcaption>Final Code</figcaption></figure><p>Build and Run the app using iOS simulator &gt; press play.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*ZrbXzP9ohz2l0_qe-omwkg.png" /><figcaption>Build success!</figcaption></figure><h3>Credit:</h3><ul><li>Thank you, <a href="https://medium.com/@heatem"><strong>Heather</strong></a> for debugging with me. Who knew how hard it is to bring this app live to iPhone? You are a champ!</li><li>Thank you, <strong>Frankie</strong> for tuning in. You are a rock star!</li><li>Thank you, <a href="https://developer.apple.com/swift/blog/?id=16"><strong>Apple Dev</strong></a> for providing tutorial video. You gave me a platform to jump off from!</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43da6d2e433b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Transfer iphone photos and movies to your Macbook at one go using image capture app]]></title>
            <link>https://medium.com/@heggyy/transfer-iphone-photos-and-movies-to-your-macbook-at-one-go-using-image-capture-app-ad35770a35d7?source=rss-b067cff123a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad35770a35d7</guid>
            <category><![CDATA[storage]]></category>
            <category><![CDATA[photos]]></category>
            <category><![CDATA[backup-iphone]]></category>
            <category><![CDATA[image-capture]]></category>
            <category><![CDATA[iphone]]></category>
            <dc:creator><![CDATA[Heggy Castaneda]]></dc:creator>
            <pubDate>Wed, 10 Jan 2018 03:27:22 GMT</pubDate>
            <atom:updated>2018-01-10T03:28:49.579Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Problem: </strong>Your iphone recently told you while filming your video that you have <strong>no storage space left</strong>. Now you are desperate to find move all of your photos in external drive like your mac book or server. What is the best way to <strong>transfer all of your photos</strong> and videos <strong>one simple click</strong> other than air dropping over 2,000 photos and videos from your iphone to macbook?</p><p><strong>Solution:</strong></p><ol><li>iPhone &gt; setting&gt; search<strong> photo stream</strong> &gt; <a href="https://www.imore.com/how-use-my-photo-stream-iphone-and-ipad">turn it <strong>off</strong></a></li><li>Plug your iPhone into Mac using <a href="https://www.target.com/p/apple-174-lightning-to-usb-c-cable-1-m/-/A-50887865?ref=tgt_adv_XS000000&amp;AFID=google_pla_df&amp;CPNG=PLA_Electronics+Shopping_Brand_Competitor&amp;adgroup=SC_Electronics&amp;LID=700000001170770pgs&amp;network=g&amp;device=c&amp;location=9032179&amp;gclid=Cj0KCQiA7dHSBRDEARIsAJhAHwi_q6q9BerK_hyVwwBGLSLOCDOBk6udd-VuUo4i3sRdim1R7qims4UaAuyfEALw_wcB&amp;gclsrc=aw.ds">sync cable</a> and launch <a href="https://www.macworld.com/article/2865831/photography/how-to-bulk-delete-images-from-your-iphone.html"><strong>Image Capture app</strong></a>. Import to your Macbook and click delete from iPhone after importing.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*gII2ZSsTwJsZW6WJst9_ag.jpeg" /></figure><p>That’s it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad35770a35d7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WordPress.org site using Lightsail AWS]]></title>
            <link>https://medium.com/@heggyy/wordpress-org-site-using-lightsail-aws-9bb5091457af?source=rss-b067cff123a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bb5091457af</guid>
            <category><![CDATA[wordpress]]></category>
            <category><![CDATA[lightsail]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Heggy Castaneda]]></dc:creator>
            <pubDate>Sat, 06 Jan 2018 23:47:33 GMT</pubDate>
            <atom:updated>2018-01-06T23:50:29.842Z</atom:updated>
            <content:encoded><![CDATA[<p>Goal: Using Linux/Unix-based instances running WordPress in seconds</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xBL-Z1VYwVmYcmL-JahZIA.png" /></figure><ul><li><a href="https://aws.amazon.com/lightsail/">https://aws.amazon.com/lightsail/</a> to sign up $5/month (they also have free 1st month trial)</li><li>Upon Signing in (Home Page)&gt; Click on <strong>Create an instance</strong> link.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*fQFDvTnX8U4du_BO1DIPKQ.png" /></figure><ul><li>Select Linux &gt; WordPress (Prebuilt app)</li><li>Leave other settings alone (such as availability zone Virginia, Zone A, sbn SSH key pair), Go with $5/month option.</li><li><strong>Name your instance</strong>: rename my virtual private server (vps): “YourName-website”. I re-named my vps: Heggy-website</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*D1AqCDG-6K4pYgE-sKG8Hg.png" /></figure><ul><li>Final step to firing up the server: Click CREATE.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*bn_glIRyAvwmWaXLfzVUgQ.png" /></figure><p>In summary, we have finished firing up a private server without worrying about managing infrastructure.</p><h3>- Next Goal: How to use the Worpress instance in lightsail.</h3><ul><li>To work with WordPress instance, click on its name. Then you will be taken to the first Connect Tab.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*LBl2ahvtaI0lLLbQsQ9lhQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*u7r-NxvK_Kvv0sJxdMIrtA.png" /></figure><ul><li>Public IP is the one you can access using webbrowser such as Chrome or firefox</li></ul><p>Ex) <a href="http://52.27.29.43/">http://52.27.29.23/</a> Note: this example page doesn’t exist but just for your info. Use your own ip address in place of <a href="http://52.27.29.43/bitnami/index.html">52.27.29.23</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*-OVSrXriTR4qR0Q6-nTI3g.png" /></figure><ul><li>scroll down to click on the bitnami documentation</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*KfWzCeiFPqsVcQeGH5-IyA.png" /></figure><p>ex) <a href="http://52.27.29.43/bitnami/index.html">http://52.27.29.23/bitnami/index.html</a> Note: this example page doesn’t exist but just for your info. Use your own ip address in place of <a href="http://52.27.29.43/bitnami/index.html">52.27.29.23</a></p><h3>- Access data for WordPress</h3><ul><li>Username: user</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*bS2Vf0LLjca9cLfQvbS5NA.png" /></figure><ul><li>Password: Log in to the AWS Console &gt; Lightsail service &gt; Click on your Website instance. On the connect tab&gt; click “Connect using SSH” Button.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*ovnISg3UjIlCG0i2J2UZLQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*LBl2ahvtaI0lLLbQsQ9lhQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*C92EQQYDz7aG5J8YyhNjIA.png" /></figure><ul><li>Once click on the orange Connect using SSH button &gt; You are taken to bitnami console window.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*_-8qailnJH1mjbe_d0ixbQ.png" /></figure><ul><li>inside of the bitnami server console type:</li></ul><blockquote><em>cat bitnami_application_password</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*ZGsL-1O1frBNrqjW_ssP0g.png" /></figure><ul><li>Go to <strong>52.27.29.23/wp-login.php</strong> to enter your <strong>Login</strong>: user and <strong>Password</strong>: password you just got from bitnami console. (example photo above)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*NcqNKwpEpr_KjC83Zeo4jw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4XLoGLvGl8VEkxX5LkePRw.png" /></figure><h3>- To create new user to your WordPress site</h3><ul><li>click on Users from Dashboard page from 52.27.29.23/wp-admin/</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Br9I5QvceAV9w_NA69JiqA.png" /></figure><ul><li>click Add New button</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XZp7LeyedEG4JYEQTNJOfA.png" /></figure><ul><li>If you want to give full power to the new user <strong>Role</strong>: Select <strong>Admin</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nQTsXR5nNhCckQ-ln2fnig.png" /></figure><ul><li>Click Add New User. Now you can login under new username and Password.</li></ul><p>Use cases: Quickly want to fire up a virtual private server to host wordpress.org website within 5 minutes. Great for someone with no server networking knowledge to host their website publicly.</p><p><em>Footnote:</em></p><p><em>Resource 1: Linus Chan from StreetCode</em></p><p><em>Resource 2: </em><a href="https://lightsail.aws.amazon.com/ls/docs/getting-started/article/getting-started-with-amazon-lightsail"><em>https://lightsail.aws.amazon.com/ls/docs/getting-started/article/getting-started-with-amazon-lightsail</em></a></p><p><em>Resource 3: </em><a href="https://docs.bitnami.com/aws/faq/starting-bitnami-aws/find_credentials/"><em>https://docs.bitnami.com/aws/faq/starting-bitnami-aws/find_credentials/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bb5091457af" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Add emoji in your email subject line]]></title>
            <link>https://medium.com/@heggyy/add-emoji-in-your-email-subject-line-2d94f79c79bb?source=rss-b067cff123a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d94f79c79bb</guid>
            <category><![CDATA[emoji]]></category>
            <dc:creator><![CDATA[Heggy Castaneda]]></dc:creator>
            <pubDate>Sat, 05 Aug 2017 22:22:51 GMT</pubDate>
            <atom:updated>2017-08-05T22:22:51.161Z</atom:updated>
            <content:encoded><![CDATA[<p>Bring more <strong>fun</strong> to your email subject line</p><p>Following are places to go to when you want to <strong>add emojis</strong> to your subject lines:</p><ul><li><a href="http://emojipedia.org/mountain/">⛰️ Mountain Emoji</a></li><li><a href="http://fsymbols.com/">Facebook Symbols (cool text signs, emoticons &amp; text pictures)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d94f79c79bb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>