cocoa

Adding subviews programatically on iPad, hard coding help

I'm adding a custom status bar in my application to monitor upload progress. This works fine in portrait mode, but when I am in landscape and my custom status bar appears, it always appears on the opposite side of the home button. I think it's because I'm hard coding my frame. I have the XIB file set to auto adjust its length. take a...

How do I incorporate WebDAV into my iPhone application?

I would like to add WebDAV to my iPhone application. What is the best way / library to enable this? ...

What is the difference between UITabBar and UITabBarController?

What is the difference between UITabBar and UITabBarController? When is it more beneficial to use one over the other? ...

What does "NSBinarySearchingFirstEqual = (1UL << 8)" mean in an enumeration definition?

I saw this in NSArray.h header file in the framework directory: enum { NSBinarySearchingFirstEqual = (1UL << 8), NSBinarySearchingLastEqual = (1UL << 9), NSBinarySearchingInsertionIndex = (1UL << 10), }; typedef NSUInteger NSBinarySearchingOptions; What's the point of "NSBinarySearchingFirstEqual = (1UL << 8)"?And what's t...

Sending print request from with-in an iPhone application

Is there a way to send a print request to a printer using wifi or some other means? Edit: There must be, because there are some applications which lets you do that. But how do they do it? For example, HP iPrint Photo Air Photo EuroSmartzPrint and maybe others as well. ...

Camera input as Mouse(Motion Tracking)

Dears, I have been developing a project which use web cam as source of input to imitate as mouse event on mac. I'm always handle with opencv for image processing and Qt framework for GUI framework. My problem is, I want to write a program which imitates mouse. I don't know how to control a mouse out of the window form and sent the int...

Are protocols inheritable in Objective-C?

I saw this in some header file in the framework directory: @interface NSCharacterSet : NSObject <NSCopying, NSMutableCopying, NSCoding> @end @interface NSMutableCharacterSet : NSCharacterSet <NSCopying, NSMutableCopying> @end I thought protocols were inheritable.If I am right about that,There is no need to type <NSCopying, NSMutabl...

Cocoafob page doesn't exist

http://github.com/gbd/cocoafob seems to not be working anymore. Anyone has a version of cocoafob available for download somewhere? ...

[NSOperation isCancelled] check first with timestamp?

do i save some time when having a timestamp and only ask the operation isCancelled every 50 msec? ...

[NSOperationQueue vs Runloop] cancelPreviousPerformRequest vs cancelAllOperations

i use now both but i'm not sure which is better. what is exactly the difference? fuzzy question i know. preparing for wwdc ...

Setting a default selection for an NSPopupButton?

Is it possible to set a default selection on an NSPopupButton? I have one that allows the user to select the type of server they want to set up, but since an NSPopupButton always shows the first item, they may ignore it if that's the type they want. However, even though that item is being displayed, calling -selectedItem returns (null). ...

Do I really need always a bidirectional relationship in Core Data?

Example: If I had two entities Person and Car, and each of them should be linked with an Image entity - how would this have to look like? Right now, I would make just three Entities: Person, Car, Image. So persons and cars can link to an Image entity. They have a 1:1 relationship to the Image entity. But now, a Core Data dude said that...

Xcode Linker error: _OBJC_CLASS_$_CIImage ...

When building my Xcode project I am receiving a Linker error that I cannot figure out how to resolve. If I build the following code the compile step completes just fine but I get an error from the Linker saying '"_OBJC_CLASS_$_CIImage", referenced from Objc-class-ref-to-CIImage in AppController.o' followed by a second error that looks i...

Problem copying NSMutableArray

I am trying to copy one array to another: NSMutableArray *itemsCopy = [[NSMutableArray alloc] initWithArray:self.items copyItems:YES]; but I get the error: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Item copyWithZone:]: unrecognized selector sent to instance 0x5a74900' *** Call stack at fir...

Cocoa renaming MyDocument window title

How can I change the title of a window in a document based cocoa application? I get an error when I try the following code in MyDocument.m - (void)awakeFromNib { [self setTitle:@"Document 1"]; } ...

How can I append objects to an NSMutableArray?

I have two arrays and I would like to append one to the end of the other. How can I go about doing this? self.itemsCopy = [self.items mutableCopy]; Will copy the array, but I would like to append self.items. ...

Finding name of inserted CD in Cocoa

I had a bookmark which described the process on how to do this - finding the name of a mounted CD in OS X - but I deleted the bookmark when I reformatted my Mac. :P Reading up on the subject, this is what I think might work. Basically, I need to verify if a particular CD is mounted before continuing in the application Access NSWorksp...

Ad framework for Cocoa (Mac) applications?

Does anyone know any good frameworks that would allow me to integrate some ads into my Cocoa Mac application? ...

Interface Builder + Sprite Strips

Hello, I'm in the midst of porting a win32 app to cocoa. Wherever possible, I'm using IB, since... well its way easier in every way possible, obviously. One thing is the designer and the win32 dev set up all the button assets on a massive "sprite sheet" such you move around the viewport to determine button state. Similar to how yahoo do...

How can I get a list of the available NSFont familes?

How can I get a list of the available NSFont familes, preferably with the fontName: equivalents. ...