Posts Tagged "Cocoa"

iPhone Tab Bar and Navigation

Joe Strout —

We've had a lot of rather philosophical blog posts lately (mostly related to the BOSS text searching system). It seems time to put that aside a moment and get back to some nice, solid iOS coding.

A common pattern for iPhone apps is a tab bar on the bottom, with a navigation stack on each tab. Today, we'll look at how to set up such a structure in code.  (And we'll do it in pure, unsweetened Cocoa for that nostalgic old-school feel.)

read full post

Video Player Refinements

Joe Strout —

Last week, we presented a method for playing videos that supports external monitors (like the Apple VGA Adapter). But we left out a few finishing touches.

read full post

Playing a video with external display support

Joe Strout —

We have a client project that, at several points in the iPad app, displays videos that were embedded into the app. This is an older app, originally written before there were such things as iPad VGA adapters. One might hope that, in the absence of any programming directives telling it otherwise, the iPad would simply mirror its entire display to the video port. Failing that (as Apple in fact has done), you might hope that the MPMoviePlayerController would automatically support the external display. But that fails too.

read full post

Sweetened Cocoa: The Number Class

Joe Strout —

Last week, we presented the String class, which gifts the standard Cocoa NSString class with such modern conveniences as operator overloading, allowing the developer to focus more on clearly expressing the intent of the code, and less on arcane 1980s syntax. Today, we're going to look at another Cocoa class in dire need of some help: NSNumber.

read full post

Sweetened Cocoa: The String Class

Joe Strout —

We've spent the last month or so considering all the interesting ways that one can use Apple's Objective-C++ compiler to improve Cocoa code. But so far, we've ignored perhaps the most interesting way: using C++ wrappers to improve the standard Cocoa classes.

read full post

C++ with a pinch of Objective-C

Joe Strout —

For the last several weeks, we've been going over how C++ can be mixed with the traditional Objective-C to make your Cocoa even sweeter. But today we're going to cover a somewhat different recipe: mostly C++, with just enough Objective-C to make it work on iOS.

read full post

Objective C++: A History

Joe Strout —

Last week, we gave an overview of how a little sprinkling of C++ could make your Cocoa programming a lot sweeter.  At the end we promised to delve more into details in future blog posts.  So, here we go!  We're going to begin with a little bit of relevant history.

read full post

Sweeten your Cocoa with C++

Joe Strout —

In 2002, Apple quietly introduced the Objective-C++ compiler. Almost nobody noticed. This is a shame, because adding a little bit of C++ to your Objective-C programming can make your code shorter, clearer, more type-safe, faster, and easier to read and write. It is nothing short of revolutionary.

read full post
 

All blog posts