Integrating Cocos2d V1 and Storyboards

I have read quite a few tutorials on integrating Cocos2d and UIKit, unfortunately when you rotated the  iPhone they would not display correctly.  I needed to have portrait UIKit views for settings and  landscape Cocos2d views for the “game”. While trying to figure out how to fix this issue I ended up finding my own solution.  You can read about it here.

No comments


CCpickerView Screenshot


I have had a few weeks of being able to work on my Math Explosion App, which is in serious need of an update. It was the first app that wrote way back in 2009 and has not been updated since then.  I always keep expecting it to break when Apple releases a new version of iOS.  I am doing more than an update, I am doing a complete rewrite. The original app was written using UIKit and Core Animation but I have felt for a very long time that the app needs to be more gamey to get the kids more interested in playing. As a result I am doing a complete rewrite using Cocos2d. I have dabbled with Cocos2d in the past but have never been able to spend much time using it until now. One of the first things I missed from UIKit was the UIPickerView. I also noticed quite a few other people out there also looking for a UIPickerView equivalent but with no success. In the end I wrote my own CCPickerView with the desire to make it as similar as UIPickerView, but for Cocos2d.  If you know how to use UIPickerView you will have no problem finding your way around setting up CCPickerView.

I want to mention some of the differences.  Firstly CCPickerView does not create a picker like UIPickerView. It simply creates the components, you have to supply your own “overlay”. I did this deliberately for two reasons. Firstly it was way simpler for me to code and secondly I figured everyone would want to have their own picker image that matched their app.  The CCPickerView can be as big or as small as you like, which is not true for UIPickerView unless you incorporate some tricks.

I also added some extras like continuous components.  With UIPickerView you add your rows, but if you want the last row to appear to be next to the first row as if the component has been rotated through 360 degrees you had to do the extra coding yourself.  I also needed the components to spin.  This was a bit tricky for me as I wanted something that was flexible as I could see many possible uses.  As a result you can configure settings like the speed of the spin, how many times the components spin and if the components ease in and out when starting and stopping.  You also get to control the stop row.  How else are you going to have a winner.

You can find the code on GitHub


Comments (3)

Play Pandora From Your iPhone Through Remote Speakers

I love listening to Pandora but don’t like the way Pandora sucks up the CPU on my laptop especially when I am using Google Chrome. I often use my iPhone to listen even when sitting at my desk, but I also don’t always want to use my headphones. A dock is nice but then I cannot use my iPhone. I want it all! Lucky for me and you there is a simple and relatively inexpensive solution. Buy an AirPort Express for $99. An AirPort Express is a device sold by Apple for playing iTunes through a remote stereo and some other neat features like setting up a remote printer or to extend your wifi network. The setup is pretty easy if you choose the right options. You have to install the AirPort Utility software to connect to the AirPort Express in order to configure it. The software found the AirPort Express without any problem and I answered the questions to extend my wifi. I figured why not extend the wifi, it could help boost the signal in other parts of the house. Unfortunately after the reboot the AirPort Express it did not restart and the AirPort Utility software could not detect it. I tried a reset of the AirPort Express and that did not work. The instructions say to press the reset button for 1 second, but later on on I figured out it was more like 30 seconds to do a reset. I am not sure if a reboot of my laptop was required or if the AirPort Express just took a long time to sort itself out with the bad settings. But the utility software does make temporary changes the AirPort on your laptop to get things going. A reboot of my laptop and the AirPort Express was discoverable again. A second attempt also failed and I was convinced I had a dud device. On the third attempt I decided to do a manual setup to see diagnostic information. When I selected the “extend the wifi network” option it said that my router was not compatible. This was the main issue and why the express setup did not work. It should have given an error during the express setup and told me do a manual install. I did do a manual install and chose “join the network” instead . The manual install does require a few more steps, but soon enough the AirPort Express had a nice green glowing led which indicated all was well. (After the working manual install I did reset the AirPort Express to the default settings and ran the express setup and chose the “join a network” option and had no problems setting the device up in under 5 minutes.) The next step was to test from my laptop. I fired up iTunes and selected the remote speaker. The AirPlay icon for the remote speakers is on the bottom right of the iTunes status bar. Sweet music!

The final test was playing Pandora from the iPhone. You do need to have iOS 4.2.1 for AirPlay from your iPhone or iPad for this to work. Start Pandora and once again on the bottom right of the interface is the same AirPlay icon. Select the remote speaker and away you go. I can now play Pandora through the remote speaker and still have my iPhone in my hand. As an added bonus you can also control the volume from your iPhone.

To play Pandora from your Mac or Windows machine you will need to buy some more software from Rogue Amoeba called AirFoil $25. AirFoil will allow you to play any sounds from you laptop onto the remote speaker. Another option is buy PandoraJam $15 which is a small interface for playing Pandora but also allows you to direct the music through the remote speakers.

When using AirPlay from your laptop you can choose multiple speakers, so you could have multiple devices throughout your home and play music through all of them simultaneously. Unfortunately from iOS devices you can only play through a single device at a time. Maybe this will change later.

No comments

More Interface Builder Woes

Sometimes I find when I am using Interface Builder the view I want to edit disappears.  You open the xib file click on the view you want to modify and nothing happens.  I have tried multiple clicking, clicking really HARD but I always get the same result. The view will not appear.  The issue appears most often when using a second screen, the view you want edit is on the second monitor, but you are semi unplugged at a coffee shop.

The easiest way to fix this is to click (gently) on the view you want to appear.  Now hit Cmd W to close the window.  Now click (normally) on the view and it will magically appear on your screen.

This has happened to me pretty often so I thought I would share the solution.

No comments

Thoughts on iPhone 4

I have now had my iPhone 4 for nearly two weeks and wanted to give my feedback.  At first I thought it was just another iPhone, slightly smaller, with a nicer display.  But I have to admit that I have been using it even more so than I had my old phone.  It took a while to get everything sorted out like getting my SplashID passwords migrated and my complicated setup for email and shared calendering working.

But here is what I love about the new iPhone 4 and that is the multitasking, which I had mentioned in my first post on the iPhone 4.  I love being able to switch between email and browser.  I do not use push email, as I get mail at all times of the day and night, so first thing I do in the morning is start the mail app and then I switch to the browser to read the news while the mail app downloads mail.  I know you could do this in the past, but I switch back and forth between the mail app and the browser frequently as the email often has embedded links, but now the browser loads much faster and does not refresh the page.

I also find that I am taking way more pictures with the camera and short video clips.  The picture quality is great and I always have my cell phone on me.  I look forward to the day when they offer optical zoom on an iPhone camera.

The speed of the phone is also great, so loading reference apps makes it so much quicker to look up things immediately and then because of the multitasking going back to the app is all that much faster.  I still think that the user should be able to choose what apps to run in the background.  Every now and then I do a clean up of apps that I know I will not use for a few days.

I have not used Facetime again, maybe I will if my wife gets an iPhone 4.

The antenna issue is not an issue for me,  I have seen the signal strength bars go down, but I do not seem to hold the phone the “wrong way”.  If I do notice low bars I change my finger positions, but it is never an issue for calls.

Syncing with iTunes is also going much quicker, which is an added bonus as that means my phone will be backed up more often.

All in all a great phone, you should buy one.

No comments

iPhone ordering Woes

I tried to order my phone online as soon as I woke up and had issues like the many other tens of thousands of people.  I tried the Apple website and then tried the AT&T website, which failed too.  I soon realized the issue was with AT&T and after exacerbating the issue by having multiple browsers open I decided to call AT&T.  After all, being the old company they were I figured that they probably had a mainframe that took the orders and that by bypassing the web the line would be shorter.  I was talking to a rep in no time, but had to get transferred  to the dreaded ordering process system that was a mess.  I was told it was a 5 minute wait, but after 40 minutes I gave up and called my local AT&T store.  Once again I was talking an employee quickly and they told me that the system was down, but that they were taking orders at the store manually.  10 minutes later I walked into a nearly empty store and placed my order and they ran my credit card using the old paper process.  10 minutes later and I was done.  Later that morning I was called by the sales rep as he was placing my order and had forgotten the CVV code for my card.  This was a good sign that my order was going it.  Sure enough about 2 hours later I received an email confirm and I verified online that my order had been placed.  Now for the waiting and the hoping that AT&T will ship on time.  I am not sure if AT&T will ship the phone or simply send the order to Apple.  But here is to waiting.

No comments

New AT&T data plans

As of tomorrow there will be two new data plans from AT&T. I have to admit that at first I was disappointed to hear the end of the unlimited data plan. AT&T has been under fire for many years as there service can really be below par in some cities. They have often blamed heavy data users for hogging the bandwidth. Unfortunately the data hogs are not likely to switch from the all you can eat plan to a metered plan. So in the short term I do not for see better experience for most of us.

The new plans start at $15 for 200MB and then $25 for 2GB. After reviewing my data usage I realized that I typically use less that 200MB. So I could save myself $180 over a year. The other nice thing is that when you do go over you simply start a new 30 day cycle, so there are no big penalties that can happen when you go over on your voice minutes. It would be really nice if the family plans would allow you to share your data plan like you can share minutes.

As there is now a much cheaper data plan getting an iPhone is now more of an option for a much wider range of consumers. I wonder though if AT&T will make you buy a more expensive plan to get a new subsidized iPhone.

No comments

Off to WWDC

WWDC is Apples big developer conference held once a year in San Francisco. This is my first time attending and I am looking forward to learning more about development for the various Apple products. The conference is typically focused on the iPhone and now the iPad too. This is also when the new iPhone is announced and we most likely will not be disappointed seeing as Gizmodo has already spilled the beans. I know there are going to be surprises and seeing as Google offered its developers a free phone I wonder if Apple will try to match them. I for one am looking forward to a better integrated camera. Plus the voice dial as I am still on a G3. I would say that I am a heavy user, so multitasking Is going to be a big plus for me. Better battery life is also always a plus. I have downloaded the WWDC app and now need to decide what sessions to attend.

No comments

doddle Update

We have a new version of doddle in the iTunes app store. I added some nice upgrades to the app to allow for faster searching of categories. We originally had category search in our early drafts and then removed it as the thinking was that you could easily browse through the categories to find what you want. But it soon became apparent that was not the case once people started using it. This is a great example of why I like to get the app out and into users hands before you spend a whole lot of time building the wrong thing. We fortunately did not build the wrong thing, but I would have done some under the hood things differently that would improve performance even more.

It is great seeing the listings being added. As we get more data the app will become more useful and we will get the snowball effect as more users sign on. Have you signed on? Have you bought a banner ad. I am sure you can get an early bird special if you buy a banner ad now. See for details.

doddlePro is going well, I have completed a big section of the call sheets, but have quite a bit more to do. But the first alpha testing of the app is just beginning.

No comments

NAB Trade Show

Back from the NAB Show in Las Vegas. It was great to meet the entire Doddle team under one roof. We all have virtual offices and so don’t see each other very often. Plus we live all around the country.

The NAB trade show was a great success. Nearly everyone who saw the app had a “wow that is really cool” moment. We now need to get the data loaded so that the app goes beyond, “that is really cool” to “this is absolutely useful” and “I use it everyday”.

I have the opinion that everyone is in sales, so while I am the iPhone developer it was good to get out there and talk to the end users and hear their questions. Some customers had great ideas on what they would like to see in the app down the road.

We had terrible Internet connectivity which was good in some respects as I feel that some of the data transfers can be changed to give the app a snappier feel. I do have some data caching built in, but want to enhance that to make it more useful.

I am going to add some updates to the current version and then it will be time to work on DoddlePro which will have integrated Call Sheets.

No comments
Powered by WordPress