objective-c

PVR Texture Compression Tiling (exposing edge context)

I've got PVR texture compression working all happy and good in my iPhone game, but I've got issues when tiling multiple textures together. Basically, I've got a very large background which is split into multiple 512x512 tiles, all PVR compressed. Then they're drawn together to look like one big background image. The way PVR works, becaus...

Accessing Other views on Navigation Stack

Hi, So I have a UINavigationController which, obviously, contains all my ViewControllers. I have three. Root->View2->View3. So I was wondering is the following possible... When I'm 'in' View3 (and an instance of Root and View2 are sat on the navigation stack) is it possible for me to call any of View2 or the Root view's methods / se...

Filtering A Tree Controller.

I have now nearly figured out how to Filter a NSTreeController, to do this I have sub-classed NSManagedObject and added some code to my App Delegate, I have also bound my NSSearchField to the filterPredicate of my App Delegate but I think I need to connect my NSTreeController and NSSearchField in some way to make it work. Below I have po...

What is a design of iChat?

iChat does not allow to change your credentials to your account when List window is open and you are connected to server. I am just wondering how this is implemented. I could imagine that internally iChat has some sort of ICAppDelegate that hold a pointer to ICPreferencesControler and an array of ICListWIndows. And now how preferences a...

Address Book constants evaluating as zero

I have a program where for certain code paths, the address book constants (such as kABPersonEmailProperty, kABPersonAddressProperty) evaluate to their normal non-zero value. However, if I follow a different code path, all these constants evaluate to zero. Furthermore, once I follow the "successful" code path, if I take the problematic ...

Objective-C equivalent of Java Language Specification or C++ Standard?

What is the Objective-C equivalent of the Java Language Specification or the C++ Standard? Is it this: http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html ? (I'm just looking for an (official) authoritative document which will explain the little nitty-gritties of the language. I'll ski...

callbacks inside applicationwillterminate

Hi , I am trying to post some data before my application terminates. Iam doing this by genrateing sockets using CFStreamCreatePairWithSocketToCFHost and later on I have the callbacks for reading and writing. But I am not able to post any data. It goes through all the functions but doesnot enter into callbacks. Does that make sense to a...

Audio equivalent of QTMovieView?

Hi, does anyone know of an audio equivalent of QTMovieView. Something that allows playback and scrubbing of audio files. QTMovieView without the movie... ...

Defined behavior of cast from unsigned char * to char * in Objective-C

I understand the difference between unsigned char * and char * types. I also understand how to use reinterpret_cast to cast an unsigned char * to a char * in C++. I'm using sqlite3 in Objective-C and am trying to get an NSString from a call to sqlite3_column_text(...); To do this, I'm basically doing: char *cParam = (char *)sqlite...

When UIButton content mode is "center," background image is pixelated.

Here's how I'm setting the background image and content mode: [btn setBackgroundImage:[[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"dots_game_horiz_blue" ofType:@"png"]] forState:UIControlStateNormal]; [btn setContentMode:UIViewContentModeCenter]; Is there a reason that the background image would be ...

NSMutableArray containsObject method not detecting object

// Add the button to the NSMutableArray. ... UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; [[self hBtns] addObject:btn]; ... // In another method, try to see if it exists. - (void)didPushBtn:(id)sender { UIButton *btn = (UIButton *)sender; if ([[self hBtns] containsObject:btn]) // Is false every time. ... } Why i...

Adding unique objects to Core Data

I'm working on an iPhone app that gets a number of objects from a database. I'd like to store these using Core Data, but I'm having problems with my relationships. A Detail contains any number of POIs (points of interest). When I fetch a set of POI's from the server, they contain a detail ID. In order to associate the POI with the Detai...

Objective-C equivalent of Java's BlockingQueue?

I'm just getting into iPhone development after many years doing Java development. I'm looking for the Objective-C equivalent to Java's BlockingQueue. Is there something like that? In case I'm going about things the wrong way, here's what I'm trying to achieve: I want to display, one at a time, chunks of data pulled from a network serve...

How to determine what the prior visibleViewController in UINavigationControllers?

I'm switching views in the context of a navigation view heirarchy, and I want to be able to determine at switch time what the prior view was that is being pushed under the new view. I'm trying this in a UINavigationControllerDelegate: (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIVi...

How to cast 'Class A' to its subclass 'Class B' - Objective-C

I'm using a framework which defines and uses 'ClassA', a subclass of NSObject. I would like to add some variables and functionality so naturally I created 'ClassB', a subclass of 'ClassA' Now my problem is this. Many of the methods within this framework return instances of 'ClassA' which I would like to cast to my subclass. For exampl...

How to Get the Display Name with the Display ID in Mac OS X?

Hello! I was wondering if you could help me figure out how to progmatically get the Display Name for a monitor by using its Display ID number in Mac OS X (10.5)? A requirement is if I give a function the Display ID, it'll provide the Display Name in return (or vice versa). Display Name looks something like this: "Color LCD", "SAMSU...

Missing chunks when creating file with AudioQueue

So a .wav file has a few standard chunks. In most of the files I work with, the "RIFF" chunk is first, then a "fmt " chunk, then the "DATA" chunk. When recording using AVAudioRecorder, those chunks are created (although an extra "FLLR" is created before the "DATA" chunk.) When creating a file with AudioQueue, those standard chunks aren'...

Unexpected EXC_BAD_ACCESS in Objective-C

Hi, I have the following method: -(void)testAPIModule { self.requests = [NSMutableArray array]; NSLog(@"making arrays"); /*(A)*/ id array1 = [NSArray arrayWithObjects:[NSNumber numberWithInt:1], [NSNumber numberWithFloat:2], nil]; /*(B)*/ id array2 = [NSArray arrayWithObjects:[NSNumber numberWithInt:4], [NSNumber numberWithInt:5]];...

cell.accessoryType in Simulator 3.0???

i am trying for apply check mark in an application at table view. it is working in Simulator 2.2.1 but not in simulator 3.0. ...

Ways to indicate a BOOL wrapper?

In Objective-C, are there any ways to indicate that an NSNumber* should actually be a BOOL? Right now my code looks like: NSNumber *audio; // BOOL wrapper Without the comment, it is not immediately obvious that *audio is a boolean value. My first thought was to try typedef NSNumber* BOOL; but this gave a compiler error apparently ...