UITableViewCell – Remove the border

Filed in iOS

In order to remove the border of a UITableViewCell, set it’s background view to the following:

UITableCiewCell *topCell = [self.tableView cellForRowAtIndexPath: [NSIndexPath indexPathForItem:0 inSection:0]];
topcell.backgroundView = [[UIView alloc] initWithFrame:CGRectZero];

It took me a little while to find this answer, so I thought I’d post it just in case anybody else needed it.

UITableView – Clear Background

Filed in iOS

The other day I wanted to embed a UITableViewController into a UIViewController. The UIViewController had a background image on it, and I wanted the UITableViewController’s view to have a clear background. I tried setting the background color to [UIColor clearColor] and it worked in the storyboard, but at runtime, the background went to it’s default color. I then changed the background color to [UIColor redColor] just to see if it had something to do with clearColor. I ran that and it had the same effect.

Turns out that if you want to set the background color of a UITableView, you must remove the background view in order to see the background color that was set in Interface Builder. Here’s how I did it.

((UITableView*)view).backgroundView = nil;

Rainbow Drill Bit

Filed in Uncategorized

I was about to write a post about the evil spinning rainbow cursor that I’ve come to know and hate over the past few months, when I stumbled upon a post referencing this site:The Marble of Doom Apparently I’m not alone in my hate of this guy. I use Xcode 4.6 on a daily basis and see this time waster at least once per day. Why does it take so long to destroy your app and let you know? Does the camera activate so the Apple guys can watch you cringe? I wish there was a website out there that would show that footage.

Anyhow, I’ll be sure to add my time there from now on. Just like the national debt, it just keeps going up. However, there isn’t a ceiling on this value.

Add your time when you get some time.

Protobuf-objc Installation on Mac OSX Mountain Lion

Filed in iOS

I’ve been doing some research lately into using Google Protocol Buffers on an iOS device. In my initial search for a library and compiler for Objective-C files I found this site. As of this writing, it hadn’t been touched in about 2 years, but I thought I’d give it a try anyhow. After several hours of trying and failing to get the compiler working, I asked Google for another suggestion. That’s when I found this project on Git link

It was still a little dated, almost 6 months since the last edit, but not nearly as bad as the other project. Apparently this project and the other are related since the same installation and usage instructions found on metasyntactic seem to apply to the Booyah Inc. project. It took me awhile to get the compiler up and running, so I thought I’d share the steps I took. Here are the installation instructions that I had to follow to get it working on a MacBook Pro. When I started the process I already had installed Xcode, so the steps begin from there.

Install Xcode Command Line Tools

  1. In Xcode click Xcode > Preferences… > Downloads tab > Command Line Tools Install button

Install Homebrew

  1. Install HomeBrew if you haven’t already by typing the following into a terminal window and following the steps: ruby -e “$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)”
  2. Type brew doctor into the terminal to be sure that HomeBrew will operate correctly. This should be done before installing anything through Homebrew.

Install missing tools needed to install protocol buffers

  1. Open a terminal and type brew install automake
  2. Once that has completed,type brew install libtool

Install Google Protocol Buffers

  1. Download Google Protocol Buffers
    1. NOTE: The current version of protobuf-objc isn’t compatible with Google Protocol Buffers 2.5.0, so you must install 2.4.1.
  2. Unzip the directory and move it to any directory you’d like. I use a directory called /!ThirdParty
  3. Open a Terminal
  4. Navigate to the protocol buffers directory (protobuf-2.5.0)
  5. Type ./configure and press return
  6. Type make and press return
  7. Type make check to see if it installed correctly
  8. Type make install to install the programs

Install Objective C Protocol Buffers compiler (protobuf-objc)

  1. Check out the git project git://github.com/booyah/protobuf-objc.git into your third party code area
  2. In order to configure ProtocolBuffers you need to download and install Google Protocol Buffers
  3. In a Terminal window, navigate to the ProtocolBuffers directory and type ./autogen.sh
  4. Type ./configure and press return
  5. Type make and press return
  6. Type make install and press return

Again, these are just the steps that I took. If you already have the files/programs that I installed using HomeBrew, then you can obviously skip those steps.

I only had to use Homebrew for a few installs, but from that experience I can tell you that it really saved me a lot of time and effort in getting that stuff installed otherwise. I’m coming from a newer Mac user stance on that.

Let me know if I left anything out or if the steps don’t work for you.

Thanks! Matt

WordPress database error Table '27178_beckerswebsite.wp_formbuilder_pages' doesn't exist for query SELECT * FROM wp_formbuilder_pages made by require('E:\inetpub\vhosts\beckerwebsite.com\httpdocs\wp-blog-header.php'), require_once('E:\inetpub\vhosts\beckerwebsite.com\httpdocs\wp-includes\template-loader.php'), do_action('template_redirect'), call_user_func_array, formbuilder_init, fb_is_active