Search Results

Search found 2 results on 1 pages for 'thrusty'.

Page 1/1 | 1 

  • How can I consolidate deferred/delayed calls in Objective-C ?

    - by thrusty
    I'd like to ensure that certain maintenance tasks are executed "eventually". For example, after I detect that some resources might no longer be used in a cache, I might call: [self performSelector:@selector(cleanupCache) withObject:nil afterDelay:0.5]; However, there might be numerous places where I detect this, and I don't want to be calling cleanupCache continuously. I'd like to consolidate multiple calls to cleanupCache so that we only periodically get ONE call to cleanupCache. Here's what I've come up with do to this-- is this the best way? [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(cleanupCache) object:nil]; [self performSelector:@selector(cleanupCache) withObject:nil afterDelay:0.5];

    Read the article

  • Can you create a "superset" target in Xcode ?

    - by thrusty
    For the purposes of unit testing I'd like to create an iPhone project target in Xcode that includes all of the release application files, plus some additional files containing code useful for UI unit testing. I can do this by duplicating the original application target; however, the problem with this is that every time I add a new source file to the app target, I need to also add it to the UnitTestUI target. It's not a big deal, just inconvenient to always remember to add files to both targets. Is there some way to set up a dependency so that every file added to the original app target is also auto added the unit test target?

    Read the article

1