Tag: Code

  • (Swift) Add Target for Click Handle

    (Swift) Add Target for Click Handle

    This entry will show how you’d add a click handler to a UIButton. It’s very easy. The first thing you want to do it make a button. In this scenario, I’m just slapping it in my viewDidLoad function. You can also see that I’ve set the title and set it for the .normal state. Then, I specified the frame’s CGRect and backgroundColor. And…

  • (Swift) Custom Segue

    (Swift) Custom Segue

    This tutorial will demonstrate how to add a custom segue to your Swift app. There are a few generic segues that are available to use in Xcode, however, you might be in a situation where you need specific transitions that might be better suited for gestures. In this case, the animation in play will be…

  • Unable to run gem install XYZ on OS X El Capitan

    Unable to run gem install XYZ on OS X El Capitan

    If you’ve upgraded your computer to El Capitan and you’re getting errors while trying to install some gems, this is due to El Capitan’s introduction of SIP (System Integrity Protection). Read more about SIP here: https://support.apple.com/en-us/HT204899 The other day I was trying to run gem install bundler and got a permissions error. Not cool. Try installing to your…

  • (Swift) Sliding UIView

    (Swift) Sliding UIView

    Today we’re going to make a sliding UIView. Similar to the previous post, this tutorial is also very similar to my previous post about rotating UIViews, but this is how to do a sliding animation. You might need this type of animation for opening a menu or showing an alert. Tools: Step 1 to 4: Create…

  • (Swift) Pulsating UIView

    (Swift) Pulsating UIView

    This tutorial is very similar to my previous post about rotating UIViews, but this is how to do pulsating animations. You might need this type of animation for a loader, an onTap of a button, or whatever. Tools: Step 1 to 4: Create swift project, set up your storyboard, add constraints, and connect your outlets The steps…

  • (Swift) Specifiying By Tags

    (Swift) Specifiying By Tags

    In Swift, you can add items to your storyboard and refer to it in your code. For example, you can add a UIButton and then create an IBOutlet in your code to ‘connect’ to it. Another way to do this is by giving it a tag number. Although this way might not be the best…

  • (Swift) Rotating UIView

    (Swift) Rotating UIView

    This tutorial is about spinning UIViews. Why spinning things you might ask? Animations can be (for a lack of better terminology because I hate this word) delightful for users. Anywho, you might just need to animate a loading spinner thing or something for you app. In this case, I’ve just created a few UIViews and…

  • (Swift) Create Navigation with Multiple Pages with only Storyboard

    (Swift) Create Navigation with Multiple Pages with only Storyboard

    After one week of playing around with Swift I have some opinions on using the storyboard. It’s weird. But, it definitely makes creating an app real easy. For example, if I want to make an application that has multiple pages, I can do that all via the storyboard. Styling the pages on storyboard, is another…

  • (React-Native) Nesting Navigator inside TabBarIOS for ultimate history stack

    (React-Native) Nesting Navigator inside TabBarIOS for ultimate history stack

    A few weeks ago I started working on react-native and I wanted to build an app that had a navigation bar and tabs. Each tab was supposed have it’s own history stack and have a unique navigation bar. In order for me to do that I nested <Navigator/> inside of <TabBarIOS/> such that every time I switch to a…