Posts Tagged ‘objective-c’

Phonegap And iWebKit Demo (Video and Source)

Randy McMillan sent me information on an example that he has posted this time illustrating the usage of Phonegap and iWebKit.

I have created a short video demoing the example in action:
Watch Video On Youtube

No knowledge of Objective-C is necessary to create an app using these technologies, and as you can see the look and feel is just like a native application.  In the demo the app is running in the simulator as a native app, not in Safari.  While action games will suffer a noticeable performance lag, apps that are non-graphically intensive have pretty good performance.

Custom Behavior On Return For A UITextView

The default behavior for a UITextField on pressing the return key is to execute the textFieldShouldReturn: method of the UITextFieldDelegate.

What if we wanted to create similar behavior with a a UITextView which does not have an equivalent method and by default just creates a new line?

Nick Dalton has come up with a snippet of code that uses the:

textView:shouldChangeTextInRange:replacementText:

method of the UITextViewDelegate to do just that.

Getting Subclasses in Objective-C

One of the things that makes the Objective-C language “different” from most other object oriented programming languages is that there is no simple command that allows you to print the subclasses of a class.  I noticed this early on when using the language, and had to work around this.  I don’t know why Objective-C doesn’t have a simple command for doing this (to be honest I never thought about it until this moment), but recently I saw an article on exactly this, and found a few ways to print out those subclasses.

Incredible iPhone Game Programming Tutorials With Video

 Just like to turn you guys on to what are the best video iPhone game programming tutorials on the web so far in case you haven’t seen them.

– Update Jan. 2nd 2010 – Tutorial 11 has been added, and I have upgrade this list to reflect that.

These tutorials are from 71 squared.  They run through the steps to creating a game on the iPhone in tremendous detail, and include source code.  Included are in-depth videos.

Amazing Xcode Tips Leave Developer In A State Of Shock

Amazing Xcode Tips Leave Developer In A State Of Shock
OMG… that’s Xcode?!

Xcode, the IDE provided by Apple for iPhone and Mac development is widely purported by beginning iPhone developers in online forums to be terrible.   For awhile I believed the forum trolls, and I accepted that Xcode was a subpar IDE.  In months of usage I didn’t think much of it only making a few preference changes enabling little more than code completion.  Recently however, I came across a great set of tips that opened my eyes to the possibility that Xcode wasn’t as bad as these newbies (interestingly enough.. mainly Java developers) said.