Project 7 – White House Petitions: Part 3

by | March 16, 2019

Project 7 – White House Petitions: Part 3

Jeff Summers

March 16, 2019

Today was the conclusion of Project 7. We started off creating the project in Xcode and establishing a table view controller. We connected a navigation controller to the table view controller. We finally added a view controller for the individual petitions. In Part 2 we created a viewport to display the individual petitions and added a tab bar controller to allow users to select the type of petitions they wanted to see.

Today we are concluding the project. In this section we began extending our knowledge by manipulating the JSON file making additional calls to WeThePeople to pull various data. This gave us more experience understanding how JSON worked and the power it provided.

The wrap up challenge was to add additional searches. In my case I created links in the tab bar for “Most Recent”, “Top Rated”, “Closed”, and “Open” to allow the user to get different views of the petitions being created.

The second part of the challenge was to add a button to the navigation bar that when clicked will create a dialog box telling the user that the data came from “We the People”. This was relatively straight forward. We have been doing alert boxes in many of the recent projects so this simply meant placing a button in the navigation controller that when clicked would call the UIAlertController displaying the message.

The final challenge was to allow the users to filter the petitions with some sort of text string. For this I created another UI Bar Button called Filter that when clicked would display an alert with a text field. When the user entered text, it would then create an array of petitions that contained the filter criteria and show only those in the table view controller. That was a little more involved but was really fun to work on.

Overall this was a great project that really stretched our skills. We learned to parse JSON, display web content in a view controller, create a tab bar controller and populate it, and adjust contents displayed based upon a user supplied filter. Each of these projects are becoming more difficult. Although they can be challenging and sometimes overwhelming, they are not impossible. Whenever I start to get stressed that this might be more than what I am capable of doing I remind myself of the first rule of scuba diving: “1. Don’t forget to breathe.” Anything beyond that will take care of itself.

Share this Article

Posted by Jeff Summers

Author, technologist, and baseball aficionado specializing in information technology and developing new and creative ways to interact with the world around us. My goal is to extend the boundaries of what is possible and find ways to make the world a better place while having fun.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Stay Connected

Search

More Articles

Pace Layered Architecture Categorization

Change is inevitable. Today’s computing environments are constantly in flux from internal and external forces that put demands on the systems and necessitate changes to maintain its value stream. Technology currency is a constant struggle that organizations must...

TBM, Another Holy Grail?

Technology Business Management or TBM as a term was coined around 2012 although many of the concepts making up this framework have been around for almost as long as there has been IT. In its simplest form, TBM represents the integration of business, technology, and...

Visionary or Dreamer?

Thinking back over your life you’ve met and worked with countless personality types. You have been a part of teams that struggled to complete simple tasks and the work felt meaningless. Perhaps your goal in these times was to just trudge through the mud hoping the...

Archives