<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: nshutinicolas</title>
    <description>The latest articles on DEV Community by nshutinicolas (@nshutinicolas).</description>
    <link>https://dev.to/nshutinicolas</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F818467%2F537c91b2-7b9b-4c8a-9fd1-17b8ec35edce.jpeg</url>
      <title>DEV Community: nshutinicolas</title>
      <link>https://dev.to/nshutinicolas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nshutinicolas"/>
    <language>en</language>
    <item>
      <title>JOYFUL SACRIFICE</title>
      <dc:creator>nshutinicolas</dc:creator>
      <pubDate>Sun, 20 Mar 2022 08:40:07 +0000</pubDate>
      <link>https://dev.to/nshutinicolas/joyful-sacrifice-2e9g</link>
      <guid>https://dev.to/nshutinicolas/joyful-sacrifice-2e9g</guid>
      <description>&lt;p&gt;The wise man looked around one day and said &lt;code&gt;happiness comes within&lt;/code&gt; and he became silent. That is a story I heard, but I can agree to that.&lt;br&gt;
We do what we do just to make us feel happy and since we are all different, what we do to achieve it and how we express it differ.&lt;br&gt;
Well, rest assured I'm not going to lecture you on that but I've a story to tell on how mine has been so far during my time at &lt;code&gt;task force 5.0&lt;/code&gt;.&lt;br&gt;
If you understand the &lt;strong&gt;&lt;code&gt;5.0&lt;/code&gt;&lt;/strong&gt; then you have the joy, but wait on as I tell you the whole story.&lt;br&gt;
Just a recap, hold your ribs and desist from laughter. Oxygen lately is expensive to find.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--65Vhx9d5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z0wimah06v6mlpdrmmwb.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--65Vhx9d5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z0wimah06v6mlpdrmmwb.gif" alt="My story movie recap" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One faithful evening off my usual routine, I decided to check out what others are talking about and then landed on a poster that welcomed developers to take a challenge for the next taskforce. I happily looked for the link with all the information and took on the challenge. I did the interviews and was given the offer.&lt;/p&gt;

&lt;p&gt;Once there, everyone welcomed us for they knew our intention is to master the skills they have to offer, for they had laid down the timetable.&lt;/p&gt;

&lt;p&gt;We introduced each other and I realized I was a grandfather to all which was pretty cool because, if we were to vote for the leader, democracy was not going to apply, as I would have become a dictator.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8D8KBRgD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9rzn3ptf4wyn6wf0ztbo.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8D8KBRgD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9rzn3ptf4wyn6wf0ztbo.gif" alt="smart move gif" width="466" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That was the recap to my story though. Sit tight as you grab a cup of coffee and read on.&lt;/p&gt;

&lt;p&gt;As days went by, we learnt numerous set of skills we really needed to master the art of being good programmers but my happy part is also somewhere else.&lt;/p&gt;

&lt;p&gt;Breakfast and lunch time have always been the best times during the day but guess what, there is even something better than that.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;&lt;code&gt;The valentine code&lt;/code&gt;&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The explanation can only be delivered by &lt;strong&gt;Thirtsa&lt;/strong&gt; who I personally never expected to be so cool among the boys. Her presence is equivalent to finding the line with a missing comma that was crushing your code.&lt;/p&gt;

&lt;p&gt;There is &lt;strong&gt;Manzi&lt;/strong&gt;, the youngest in the room with lots of conspiracy theories in politics, sometimes we wonder why he ain’t a lawyer but we are happy is not as most of us would have fallen short at his hands in court and what is even better is when is in a conversation with &lt;strong&gt;Ibrahim&lt;/strong&gt; aka the FIFA guy over things that are so strange to some, but they understand each other and &lt;strong&gt;Janvier&lt;/strong&gt; comes in with his happy mood, all smiling just to interrupt the conversation with his geeky move while &lt;strong&gt;Christopher&lt;/strong&gt; is preparing for the next joke that somehow makes everyone laugh to their knees.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DmYJUMWN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7acilfwvvjchks84ovzd.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DmYJUMWN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7acilfwvvjchks84ovzd.gif" alt="Laughing" width="245" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can’t imagine how I always enjoy those moments when &lt;strong&gt;Samuel&lt;/strong&gt; aka the law-abiding argues with &lt;strong&gt;Sam&lt;/strong&gt; aka the python guy and &lt;strong&gt;Elvis&lt;/strong&gt; aka the react master pours in his ideas to confuse everyone just to create peace and &lt;strong&gt;Maniple&lt;/strong&gt; has to support whoever is winning just so he can pull the legendary move.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qJymJCs9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qndzxx734jncq9id6o24.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qJymJCs9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qndzxx734jncq9id6o24.gif" alt="Eating popcorn" width="420" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Friday is the day we are always looking out for as it holds the most secrets to our happiness at task force and this time, food is off the table which is shocking right!&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1I1zT2_2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wcqtlnmdn22xxjr6pbz1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1I1zT2_2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wcqtlnmdn22xxjr6pbz1.gif" alt="shocking to hear" width="435" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Presentations
&lt;/h4&gt;

&lt;p&gt;Every Friday, we have to team up and create a presentation on things we did learn throughout the week and present it to the elite class, I mean the guys who already have knowledge on of timetable. It is worth giving them the title right!&lt;/p&gt;

&lt;p&gt;And you will start asking yourself how this is the moment we all are always excited about, well that is just a cover story or an icing to the cake as the cake is what follows.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K8bWlJSB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fagzpht6zcuu5vxvki1m.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K8bWlJSB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fagzpht6zcuu5vxvki1m.gif" alt="friday party" width="500" height="281"&gt;&lt;/a&gt;&lt;br&gt;
Just like a french from England would say &lt;strong&gt;Partee&lt;/strong&gt; is the real cake.&lt;br&gt;
It is one of those moments when we get to interact with the elite, share a drink and hear their advice as they are more relaxed than other days.&lt;/p&gt;

&lt;p&gt;For the task force team, it is just another icing level to the cake. Throughout the week, we plan for this day just to prove who is better in our usual games.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pingpong&lt;/strong&gt;&lt;br&gt;
Our beloved pingpong, the only game that we all can’t resist from regardless and the best part is how the rules are never constant. Everyone has to bend the rules in their favor just to beat others and trust me, the competition is super tight.&lt;br&gt;
The competition was short lived as we lost the ball and we had to find another source of dominance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Need for speed&lt;/strong&gt;&lt;br&gt;
It is a four player racing competition where everyone has to connect on one of the machines with the game.&lt;br&gt;
The thrive to dominance is what makes the game more interesting. No one is a winner here. When you try to dominate, the rest of the team goes against you and trust me you are on a loosing truck.&lt;br&gt;
The interesting part here is the bending of rules, again!&lt;/p&gt;

&lt;p&gt;Well rest assured, this is very much inevitable as the desire for dominance is at its peak.&lt;br&gt;
The funniest part is when there are four other players awaiting to join, the first is also considered a looser which has never been anywhere else in the world of competitions.&lt;/p&gt;

&lt;p&gt;When I look back and think of my initial idea of being a dictator in the group, I thank God I never did as I would have not lasted a minute with them.&lt;/p&gt;

&lt;p&gt;If you followed well, then you will start asking yourself about my role in the whole story, well rest assured as it is so simple. &lt;code&gt;"I’m the one writing it for you to read"&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You rejoice in suffering when you love what you gain through suffering more than what you are giving up in suffering.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And you will ask for my sacrifice and I'll think about the response.&lt;/p&gt;

&lt;p&gt;And now my mind has the giggly feeling after a recap on my joyful days with the team and can’t resist from laughing.&lt;/p&gt;

</description>
      <category>taskforce</category>
      <category>codeofafrica</category>
      <category>awesomitylab</category>
      <category>storyrecap</category>
    </item>
    <item>
      <title>Now I Know</title>
      <dc:creator>nshutinicolas</dc:creator>
      <pubDate>Sun, 13 Mar 2022 09:54:05 +0000</pubDate>
      <link>https://dev.to/nshutinicolas/now-i-know-4i5l</link>
      <guid>https://dev.to/nshutinicolas/now-i-know-4i5l</guid>
      <description>&lt;p&gt;Often we think that we know a concept until we hit a hard rock and realize that all we thought we knew was just the basics. If you are open minded, then you will create a room for learning which will help expand your knowledge base and be called megamind who becomes a hero from his evil deeds.&lt;br&gt;
That is just ideal and an opinion to some people while others believe in constant knowledge as the best way to keep up.&lt;/p&gt;

&lt;p&gt;Does pilling up knowledge help you understand a concept or the deeper you go the more you get lost in search for knowledge. Well who thought knowledge can be an addiction!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you can’t explain it to a six year old, then you don't understand it yourself - &lt;strong&gt;Albert Einstein&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sometimes you feel saturated with knowledge and you feel like adding more is a burden and impossible but again, how do you know that you know what you know?&lt;/p&gt;

&lt;p&gt;Teaching others is one of the many ways you can assess what you know. While explaining a concept to others, you often get unexpected questions that will help you think clearly on the concept. A teacher is no different from a presenter as they all lay down the concept for others to learn.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--USiKCJ9H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zf0wr4389f5at7spdi0r.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--USiKCJ9H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zf0wr4389f5at7spdi0r.gif" alt="let's do the presentation" width="480" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Often we present what we have learnt and mostly it is a hard gamble between words and the concept. Sometimes the audience is listening and other times, it is not and as a presenter, you have to master the audience and keep them alive and this in return, builds your confidence.&lt;/p&gt;

&lt;p&gt;There are concepts considered rocket science to an ordinary man but were derived from our ways of life and the people who come up with those concepts are considered geniuses because they invested their time in understanding the concept and be able to explain it to a layman.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qr4oJCSg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7tr4x07b2leafs5lqtxz.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qr4oJCSg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7tr4x07b2leafs5lqtxz.jpeg" alt="Critical thinking" width="880" height="528"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You may ask what I now know and I would respond with a series of knowledge I acquired including but not limited to valuing my time, leading the conversation in the presentation, understanding the concept and explaining it to others your way but still be open to understanding other people’s view.&lt;/p&gt;

</description>
      <category>taskforce</category>
      <category>awesomity</category>
      <category>codeofafrica</category>
      <category>weeklyjournal</category>
    </item>
    <item>
      <title>Get Started With JSConstraints - Programmatic Swift Constraints for Beginners</title>
      <dc:creator>nshutinicolas</dc:creator>
      <pubDate>Thu, 10 Mar 2022 11:06:15 +0000</pubDate>
      <link>https://dev.to/nshutinicolas/jsconstraints-library-12ba</link>
      <guid>https://dev.to/nshutinicolas/jsconstraints-library-12ba</guid>
      <description>&lt;p&gt;Storyboards in Xcode have always been the first must learn way of building UIs and whoever came with this idea is a genius💪🏿. As you develop more apps, you get to learn pros and cons of storyboards.&lt;br&gt;
Today we are going to put storyboards aside and concentrate on writing everything programmatically.&lt;br&gt;
&lt;strong&gt;Auto layout constraints&lt;/strong&gt; is a statement you can’t avoid where &lt;strong&gt;Constraints&lt;/strong&gt; basically define the relationship between our views in the user interface.&lt;/p&gt;

&lt;p&gt;If you have used Xcode to create an app and wrote views programmatically, there is a 99% chance that you have come across something similar to this.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EtXCT1b9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s28z4tehp5rtcjxk59ln.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EtXCT1b9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s28z4tehp5rtcjxk59ln.png" alt="Autolayout constraints with NSLayoutConstraints" width="880" height="580"&gt;&lt;/a&gt;&lt;br&gt;
That looks fine until the project gets bigger.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;What if I tell you that the six lines you see (from 24 to 30) can be reduced to a single line.&lt;/code&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Wl9l2f31--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y6qeekcf75ywrlndkuzn.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wl9l2f31--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y6qeekcf75ywrlndkuzn.jpeg" alt="shocking JSConstraints move" width="880" height="660"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well well, let me introduce you to &lt;strong&gt;&lt;a href="https://github.com/jaysack/JSConstraints"&gt;JSConstraints&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It is a tiny Swift library written with only one thing in mind: Blazin' Fast Programmatic Constraints-Typing.&lt;br&gt;
JSConstraints is a really small library extending UIView and UIStackView functionalities.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Xcode installed on your machine&lt;/li&gt;
&lt;li&gt;Zeal to learn&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Getting started&lt;/strong&gt;&lt;br&gt;
Create an Xcode project, let's say &lt;code&gt;JSConstraintsTutorial&lt;/code&gt; and don’t forget to choose Storyboard as your interface.&lt;/p&gt;

&lt;p&gt;Initiate pods for your newly created project&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;pod&lt;/span&gt; &lt;span class="kd"&gt;init&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;br&gt;
It can be installed using &lt;a href="https://cocoapods.org/"&gt;cocoapods&lt;/a&gt; (which we are going to use) or &lt;a href="https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app"&gt;swift package manager&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Using cocoapods&lt;/strong&gt;&lt;br&gt;
Open &lt;code&gt;Podfile&lt;/code&gt; and add&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;pod&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="kt"&gt;JSConstraints&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save your file and install pods with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;pod&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open your project’s &lt;strong&gt;JSContraintsTutorial.xcworkspace&lt;/strong&gt; and start getting your hands dirty.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating UIViews programmatically&lt;/strong&gt;&lt;br&gt;
There are many tutorial that can help you get started and here, we shall do the basics.&lt;br&gt;
Creating a UIView is pretty simple and straightforward.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;firstView&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;UIView&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---R4Ma30E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kr7e717dt7q96ohvgsuq.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---R4Ma30E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kr7e717dt7q96ohvgsuq.jpeg" alt="It's that simple to use JSConstraints" width="500" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Import library&lt;/strong&gt;&lt;br&gt;
To use the library, you will have to import it. You can copy and paste the line of code at the top of your file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;import&lt;/span&gt; &lt;span class="kt"&gt;JSConstraints&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If that is done, then we can now start exploiting its methods.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Positioning your view&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Views in Xcode are positioned relative to other views. Take an example of you trying to paint something, there has to be a material to paint on and that material is the parent view while the image you are painting is a child view.&lt;br&gt;
To position the image, you have to define the distance from top, left, bottom, right or width and height.&lt;br&gt;
For the web gulus, you are probably well oriented with the concept of &lt;strong&gt;padding&lt;/strong&gt; and for others it is a way of creating space around an element.&lt;br&gt;
Look at it in a sense of you seated on a chair, the distance between you and the edge of the chair is the padding.&lt;br&gt;
For now we are talking about the distance of a child view from the edges of it’s parent view.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/jaysack/JSConstraints"&gt;JSConstraints&lt;/a&gt;&lt;/strong&gt; provides us with methods that are easy to use to achieve this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PinTo&lt;/strong&gt;&lt;br&gt;
It is a method that is applied to a child view to position it in it's parent view just like you pin a poster on your wall.&lt;/p&gt;
&lt;h4&gt;
  
  
  Pin to superview with padding
&lt;/h4&gt;

&lt;p&gt;In your viewDidLoad function, create your first view and give it a background color&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;// 1. Create UIView&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;firstView&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;UIView&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;// 2. Give it a background color&lt;/span&gt;
&lt;span class="n"&gt;firstView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;backgroundColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;blue&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using &lt;code&gt;pinTo&lt;/code&gt; method, let's add our view to the parent view with a padding of 20.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;// 3. Pin it to its parent view&lt;/span&gt;
&lt;span class="n"&gt;firstView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pinTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;superview&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Build and run (cmd+r) your project and see the magic happen😉.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9hqmqZ5I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/spbtl5jab0oz6pm6hiqq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9hqmqZ5I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/spbtl5jab0oz6pm6hiqq.png" alt="first uiview in xcode with JSConstraints pin to method" width="880" height="446"&gt;&lt;/a&gt;&lt;br&gt;
We have just pinned our child view to our parent view.&lt;br&gt;
You can still customize the padding sizes for each side using &lt;code&gt;pinTo&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Method 1: padding applies to both x and y sides&lt;/span&gt;
&lt;span class="n"&gt;firstView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pinTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;superview&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// Method 2: you specify the padding for each side individually&lt;/span&gt;
&lt;span class="n"&gt;firstView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pinTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;superview&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;xPadding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;yPadding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I know you are probably feeling like an expert which you are right now.&lt;br&gt;
Huhh! Wait until you get the next concept that will build a spaceship  equivalent of the best app layout you can think about.&lt;/p&gt;
&lt;h3&gt;
  
  
  SetConstraints
&lt;/h3&gt;

&lt;p&gt;This is a game changing method that let's you resize your views, position them relative to each other with one principal of keeping the code easy to read.&lt;br&gt;
It takes in an array of constraints and returns an activated array of constraints.&lt;br&gt;
&lt;strong&gt;Constraints&lt;/strong&gt; allow us to create views that dynamically adjust to different size classes and positions.&lt;br&gt;
The most commonly used are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setConstraints&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;top&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;NSLayoutAnchor&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;NSLayoutYAxisAnchor&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;leading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;NSLayoutAnchor&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;NSLayoutXAxisAnchor&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trailing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;NSLayoutAnchor&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;NSLayoutXAxisAnchor&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;NSLayoutAnchor&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;NSLayoutYAxisAnchor&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;height&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;CGFloat&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;width&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;CGFloat&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;xCenter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;NSLayoutAnchor&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;NSLayoutXAxisAnchor&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;yCenter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;NSLayoutAnchor&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;NSLayoutYAxisAnchor&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;squared&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;CGFloat&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's start with the positioning of the view like we did earlier.&lt;br&gt;
Here I'm assuming you already have basic knowledge about &lt;a href="https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/index.html"&gt;Auto layout&lt;/a&gt; and if you don't, worry not and keep reading and you will eventually understand the concept.&lt;br&gt;
From our previous code, we are replacing our pinTo method with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;// 3. Add child view to parent view as a subview&lt;/span&gt;
&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addSubview&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;firstView&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// 4. apply setConstraints to our view&lt;/span&gt;
&lt;span class="n"&gt;firstView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setConstraints&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
   &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;top&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;topAnchor&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
   &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;leading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;leadingAnchor&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
   &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bottomAnchor&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
   &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trailing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;trailingAnchor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Build and run (cmd+r) your project&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ParUaI78--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lxk0y1l3lzg4lty0ea1a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ParUaI78--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lxk0y1l3lzg4lty0ea1a.png" alt="JSConstraints auto layout" width="880" height="501"&gt;&lt;/a&gt;&lt;br&gt;
What we have just done is to wrap the whole child view over the parent view and that is why you can't see the white parent view.&lt;br&gt;
What if we want our padding back!&lt;br&gt;
Well rest your worries as JSConstraints has &lt;em&gt;.constant()&lt;/em&gt; that takes in a &lt;code&gt;CGFloat&lt;/code&gt; &lt;em&gt;(fancy way of defining a float value in swift)&lt;/em&gt; value and is appended to some of the elements above.&lt;br&gt;
If I wanted to add padding to the top, left, bottom and the right side, update your code to have,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;firstView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setConstraints&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
   &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;top&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;topAnchor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;constant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
   &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;leading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;leadingAnchor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;constant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
   &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bottomAnchor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;constant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
   &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trailing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;trailingAnchor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;constant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wrPRmfib--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5knsiqatnt6i2ea9bicn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wrPRmfib--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5knsiqatnt6i2ea9bicn.png" alt="JSConstraints autolayout padding" width="880" height="501"&gt;&lt;/a&gt;&lt;br&gt;
Now our parent view is visible in white👏🏿.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--if9Bbf7t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/feiht3ar94b8opyfpfgt.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--if9Bbf7t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/feiht3ar94b8opyfpfgt.gif" alt="A lot JSConstraints auto layout" width="480" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's talk more about &lt;strong&gt;&lt;em&gt;.squared()&lt;/em&gt;&lt;/strong&gt; that combines &lt;code&gt;.height()&lt;/code&gt; and &lt;code&gt;.width()&lt;/code&gt;.&lt;br&gt;
As we have done before, we are going to instantiate our square view, with a yellow background and add it to our parent view&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;// 1. Instantiate your view&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;squareVIew&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;UIView&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="c1"&gt;// 2. Give it a background color&lt;/span&gt;
&lt;span class="n"&gt;squareVIew&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;backgroundColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;systemYellow&lt;/span&gt;

&lt;span class="c1"&gt;// 3. Add it to the parent view&lt;/span&gt;
&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addSubview&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;squareVIew&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After adding our square view to the parent view, then we give it a frame using our &lt;code&gt;setConstraints&lt;/code&gt; method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;// 4. apply constraints to our view&lt;/span&gt;
&lt;span class="n"&gt;squareVIew&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setConstraints&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
     &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;top&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;topAnchor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;constant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
     &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;leading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;leadingAnchor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;constant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
     &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;squared&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;// &amp;lt;---- Our focus&lt;/span&gt;
&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Build and run your project.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4bxuRu1W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/erk7cxf8k7gf0spwzhfc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4bxuRu1W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/erk7cxf8k7gf0spwzhfc.png" alt="JSConstraints squared enum" width="880" height="438"&gt;&lt;/a&gt;&lt;br&gt;
In this case &lt;code&gt;.squared(200)&lt;/code&gt; is equivalent to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;squareVIew&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setConstraints&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;height&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;width&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What if we want to position our squareView at the center of the parent view!&lt;/p&gt;

&lt;h3&gt;
  
  
  CenterIn
&lt;/h3&gt;

&lt;p&gt;It is another method that positions a view at the center of it's parent view.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Positioning squareView at the center of our parent view&lt;/span&gt;
&lt;span class="n"&gt;squareView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;centerIn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;superview&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's the result of our method&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CiWljZaS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cz5mwo94zhnm4g0k8drz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CiWljZaS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cz5mwo94zhnm4g0k8drz.png" alt="Centering a uiview with JSConstraint CenterIn" width="880" height="438"&gt;&lt;/a&gt;&lt;br&gt;
What if you want to offset the center position!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;// CenterIn with offset parameters&lt;/span&gt;
&lt;span class="n"&gt;squareView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;centerIn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;superview&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;xOffset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;CGFloat&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;yOffset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;CGFloat&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you have managed to reach here, then grab a cup of coffee and appreciate what you’ve learnt as you prepare to read on for the next mind blowing concept.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ilJkT8Ro--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hdwe1lu3pt9zzbnwfail.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ilJkT8Ro--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hdwe1lu3pt9zzbnwfail.gif" alt="Mind blowing JSConstraits swift" width="200" height="200"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  UIStackView
&lt;/h3&gt;

&lt;p&gt;This is a very powerful component that stacks views together either vertically or horizontally.&lt;br&gt;
It is the most preferred way of building UI since it creates most of the constraints automatically.&lt;br&gt;
Creating a UIStackView can’t get any simpler with the JSConstraint library.&lt;/p&gt;

&lt;p&gt;JSConstraints comes with two powerful methods&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;setDefaultConfig: Helps to configure stack view subviews layout. It takes in &lt;em&gt;spacing&lt;/em&gt; between view, &lt;em&gt;axis&lt;/em&gt; which can be either horizontal or vertical, &lt;em&gt;alignment&lt;/em&gt; and &lt;em&gt;distribution&lt;/em&gt;.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Initialising setDefaultConfig&lt;/span&gt;
&lt;span class="n"&gt;stackView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setDefaultConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;spacing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;CGFloat&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;axis&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;NSLayoutConstraint&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;Axis&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;alignment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;UIStackView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;Alignment&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;distribution&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;UIStackView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;Distribution&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;setEdgeInsets: adds padding to stack view and its child views. You can specify the padding that applies to sides or x and y side or each side be given it’s value.
Example of how it can be used.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;// 1. Padding applies to all sides&lt;/span&gt;
&lt;span class="n"&gt;stackView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setEdgeInsets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// 2. Specify the x and y values&lt;/span&gt;
&lt;span class="n"&gt;stackView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setEdgeInsets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// 3. Specify the value for each side&lt;/span&gt;
&lt;span class="n"&gt;stackView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setEdgeInsets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;leading&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;trailing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;We learn by example. Let's stack two views together in a stackView and explain how it was done.&lt;/p&gt;

&lt;p&gt;Instantiate the stackView and two UIViews namely redView and blueView.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;redView&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;UIView&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;blueView&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;UIView&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;stackView&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;UIStackView&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Give the views background colors to differentiate them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;redView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;backgroundColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;systemRed&lt;/span&gt;
&lt;span class="n"&gt;blueView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;backgroundColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;systemBlue&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Attach the stackView to parent view.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addSubview&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;stackView&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add redView and blueView to stackView using &lt;code&gt;addArrangedView&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;stackView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addArrangedSubview&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;redView&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;stackView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addArrangedSubview&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blueView&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we are applying the knowledge we have acquired about setDefaultConfig to arrange redView and blueView horizontally with spacing of 40 and allow them to fill equally.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;stackView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setDefaultConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;spacing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;axis&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;horizontal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;alignment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;distribution&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fillEqually&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add padding to stack view child views by using &lt;code&gt;setEdgeInsets&lt;/code&gt;. You can take different approaches as discussed. Let's use the first one.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;stackView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setEdgeInsets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After configuring the child views, now let's pin our stack view to the main view.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;stackView&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setConstraints&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;top&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;topAnchor&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;leading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;leadingAnchor&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trailing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;trailingAnchor&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;height&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's see the results&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VD1VeyCW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/84z10okmvqr4mfyzfxq9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VD1VeyCW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/84z10okmvqr4mfyzfxq9.png" alt="JSConstraints stackview" width="880" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pmlR7LAH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xp8330hnjhaxfqgvhd5g.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pmlR7LAH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xp8330hnjhaxfqgvhd5g.gif" alt="easy peasy JSConstraints" width="880" height="880"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;JSConstaints&lt;/strong&gt; not only works with blocks, it can also be applied to &lt;strong&gt;UITextField&lt;/strong&gt;, &lt;strong&gt;UITextView&lt;/strong&gt;, &lt;strong&gt;ImageView&lt;/strong&gt; and basically every element that inherits from UIView in Xcode.&lt;/p&gt;

</description>
      <category>swift</category>
      <category>autolayout</category>
      <category>xcode</category>
    </item>
    <item>
      <title>Who Am I?</title>
      <dc:creator>nshutinicolas</dc:creator>
      <pubDate>Sun, 06 Mar 2022 07:57:18 +0000</pubDate>
      <link>https://dev.to/nshutinicolas/who-am-i-13h7</link>
      <guid>https://dev.to/nshutinicolas/who-am-i-13h7</guid>
      <description>&lt;p&gt;What a week to get thoughts highbrown!&lt;br&gt;
We have always known that first impression is key to convincing others your motive and that has been around since the old days. Hardly you find people taking a second thought about it’s impact on society.&lt;/p&gt;

&lt;p&gt;Just like everything else, it has it’s pros and cons that can be viewed differently depending on which point you are standing on. Since this is my mind speaking, there are no judgments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0sZXlgjz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9c6uua6uqkw0f3xxhrdz.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0sZXlgjz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9c6uua6uqkw0f3xxhrdz.jpeg" alt="fix my computer, who am I" width="584" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;Can you fix my computer?&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As an engineer, it is a statement we hear often from our friends and family. Mostly when people hear that you are an engineer, they expect you to have magical powers of fixing every broken appliance that exists on earth, regardless if you know it or not and failure to fix it comes with it’s judgments and imposter syndrome manifests.&lt;/p&gt;

&lt;p&gt;Since I’m aware of their expectations from me, I get to know how to respond and empathize with them. One of the superpowers an engineer must have.&lt;br&gt;
To get it out of my head, it is not cool to call me an imposter engineer because I can not fix your printer, laptop, phone and your shaver🤦🏿‍♂️! Please understand that I’m so cool not to fix broken hardware, but program them to serve you.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;What if I tell you that I can build a mobile application that will always fix your devices every time! Will you finally understand what I do?&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's react to this statement natively&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are two major mobile platforms in the world and that is Android that uses Java and Kotlin and iOS known in iPhones that uses Swift.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qYTQMhj_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/um4oanobjkj33n69midi.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qYTQMhj_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/um4oanobjkj33n69midi.jpeg" alt="language barrier" width="880" height="489"&gt;&lt;/a&gt;&lt;br&gt;
As a developer, to build an app for any of the platforms, you needed to know their respective language and this spurk a cold war among developers and they reacted to it natively to solve the language barrier hence React native.&lt;br&gt;
How cool is this! Not only can we not fix your computer, but we can also solve the language barrier in our communities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Take away for the week&lt;/strong&gt;&lt;br&gt;
Every society has it’s norms and way of life that has to be appreciated and not be a judgment point. Before you can judge, first understand the other person’s reasoning and in exchange, you will improve your communication skills, efficiency, reduce inappropriate judgment and be considered cool.&lt;/p&gt;

</description>
      <category>awesomity</category>
      <category>codeofafrica</category>
      <category>taskforce</category>
      <category>weeklyjournal</category>
    </item>
    <item>
      <title>Can you hear me?</title>
      <dc:creator>nshutinicolas</dc:creator>
      <pubDate>Sun, 27 Feb 2022 09:54:30 +0000</pubDate>
      <link>https://dev.to/nshutinicolas/can-you-hear-me-1lpb</link>
      <guid>https://dev.to/nshutinicolas/can-you-hear-me-1lpb</guid>
      <description>&lt;p&gt;Can you hear me? As I tell my story, what do you get from it? Did you hear my grieve or was it just another show to you? Did my actions tell you anything or stand up comedy is what I can do best?&lt;/p&gt;

&lt;p&gt;&lt;code&gt;If you want something best done, do it yourself - Napoleon Bonaparte&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I feel not heard and it breaks me down but then why not listen to others and ask questions as the person who asks is the person who leads the conversation. Is that the best way to communicate or is it one of the many ways?&lt;/p&gt;

&lt;p&gt;Well, effective communication is about both parties understanding each other. It may sound simple but it requires a lot to be a good listener. When you are listening, your brain makes up a lot of ideas and mostly they are empathizing with what you are hearing, seeing and or reading to try help you understand the point like you are trying to understand my point.&lt;/p&gt;

&lt;p&gt;Well, to make my point simpler, all I'm trying to say is that Git is a tool used by developers to communicate collaboratively.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NiJ1KOnk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8hmknie6y8tuw97cvflk.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NiJ1KOnk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8hmknie6y8tuw97cvflk.jpeg" alt="What is Git" width="880" height="495"&gt;&lt;/a&gt; Well now can I have your attention?&lt;/p&gt;

&lt;p&gt;As programmers, our communication is not that fancy as it involves a lot of code and documentations that help to understand the codes.&lt;br&gt;
You might think that &lt;code&gt;Git&lt;/code&gt; is one of the best innovations done by developers for developers. Well it is and it is not.&lt;/p&gt;

&lt;p&gt;It actually uses the same old principles of human communication. As we talk, I pay attention to the message and give feedback, if there is something I don’t understand, then I trace back to what I heard earlier and refer to it. Git bases on this principle to help developers bring their codes together.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gql9RoMU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rds1e018hh113rgxr9h4.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gql9RoMU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rds1e018hh113rgxr9h4.jpeg" alt="i understand now" width="500" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the end of the week, as everyone was focused on the technical aspect, Yannick had an idea of bring the teams together on the last minute to do a presentation. After announcing the news, chaos and panic exploded. Every member of the team had a different understanding of the subject but the definition was the same.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VCReqBYU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wzv217lrkcmb2wejxlq4.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VCReqBYU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wzv217lrkcmb2wejxlq4.jpeg" alt="teamwork brainstorming" width="500" height="584"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a team, the task was to come up with the same definition to present to others in away that you understand and is simpler for everyone else to understand.&lt;br&gt;
To reach our goal of a unified definition, it required a lot of discussions and listening outside Git.&lt;/p&gt;

&lt;p&gt;At the end of the week, I learnt that the best communicator is the best listener as through listening, you communicate.&lt;/p&gt;

&lt;p&gt;Can't wait for more codewars and repairing the leaking CI/CD pipeline the broke halfway the road.&lt;/p&gt;

</description>
      <category>codeofafrica</category>
      <category>awesomity</category>
      <category>taskforce5</category>
    </item>
    <item>
      <title>CONFLICT OF INTEREST</title>
      <dc:creator>nshutinicolas</dc:creator>
      <pubDate>Sun, 20 Feb 2022 07:02:00 +0000</pubDate>
      <link>https://dev.to/nshutinicolas/conflict-of-interest-5905</link>
      <guid>https://dev.to/nshutinicolas/conflict-of-interest-5905</guid>
      <description>&lt;p&gt;Life has its ups and downs and in every one of these scenarios, there is an opportunity underneath if you are prepared just enough to receive it. I had a share of mine when I got admitted into the task force 5.0 which prompted me to request for a leave from my other workplace in order to pursue my goals. &lt;/p&gt;

&lt;p&gt;I work as a network engineer where I monitor institution servers to ensure they are always on and accessible all the time. My passion lies in software development and I’ve been doing it as a hobby for a while and I was not ready to let this opportunity slip by.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--q4XajlLO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3sm25dv4nosup2m02lrk.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q4XajlLO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3sm25dv4nosup2m02lrk.jpeg" alt="stressed out" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Courage is resistance to fear, mastery of fear, not absence of fear - Mark Twain&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the first days, it was really hard to cope up as I had to be available for the program during the day and work at night and the stress was mounting which degraded my performance in everything I participated in except eating.&lt;/p&gt;

&lt;p&gt;I kept on questioning my choice whether it was worth it or not. While I continued to question what I was doing, I realized that there were two options, to continue doing things the same way which would limit my learning progress or to man up and change the course of my learning curve to improve my skills in what I consider my passion.&lt;br&gt;
Later on I realized if I kept on stressing in the first week, I was never going to be able to finish the program, so I started taking everything simple and one at a time.&lt;/p&gt;

&lt;p&gt;As days went by, I started settling in with others, enjoyed the environment and their company which kept me motivated to be available everyday regardless.&lt;/p&gt;

&lt;p&gt;I was introduced to different concepts like Miro, an online collaboration whiteboard, agile approach in project management, online meeting ethics and the egg challenge was the first teamwork test that made everything fun.&lt;br&gt;
The whole experience was awesome and can't wait for the upcoming weeks.&lt;/p&gt;

</description>
      <category>taskforce</category>
      <category>codeofafrica</category>
      <category>awesomitylab</category>
    </item>
  </channel>
</rss>
