Showing posts with label static. Show all posts
Showing posts with label static. Show all posts

Friday, April 15, 2011

Initializer Element Is Not Constant


This code might look valid to less experienced iOS developers, but it does give a compiler error "initializer element is not constant":

static NSArray *playState = [NSArray arrayWithObjects:
    @"MPMoviePlaybackStateStopped",
    @"MPMoviePlaybackStatePlaying",
    @"MPMoviePlaybackStatePaused",
    @"MPMoviePlaybackStateInterrupted",
    @"MPMoviePlaybackStateSeekingForward",
    @"MPMoviePlaybackStateSeekingBackward",
    nil];

Wednesday, March 16, 2011

How to Debug Webtrends.framework Linker Problems

You are trying to integrate Webtrends Analytics library as Webtrends.framework into your application and linker fails with lots of undefined symbols:

Wednesday, December 22, 2010

Local Static Variable Lifetime Expectation in Objective-C

Something I learned today, worth remembering for performance reasons. Static variable defined inside a method is actually a global variable, which is visible only inside that method!

What this means is that you can increase your method performance by declaring variable only once and reuse it when needed next time.