If I add a category method to a class, such as NSXMLNode:
@interface NXSMLNode (mycat)
- (void)myFunc;
@end
Will this category method also be available in subclasses of NSXMLNode, such as NSXMLElement and NSXMLDocument? Or do I have to define and implement the method as a category in each class, leading to code duplication?
...
I'm getting this error when trying to see the contents of a NSMutableArray:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000021
0x94d5a688 in objc_msgSend ()
ViewController.h:
@interface PeopleViewController : UITableViewController {
NSMutableArray *people;
}
@p...
Hi there.
On selecting a cell in a UITableView (which itself is placed on the rootView of a UINavigationController) I push a new SubviewController (which has another TableView as its view) onto the NavigationController.
It all works fine, but when it gets displayed it has a transparent Border around it (the same width on all the sides)....
I've seen how to define the __MyCompanyName__ macro value that displays in all header comments in XCode by defining it globally via a terminal command:
defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{"ORGANIZATIONNAME" = "My Company";}'
However, I do work under multiple company names and would like an easy way to sw...
I'm working with xcode and I have classes associated with other projects that I want to be included in new projects. I realize that the #import will do the job technically (although what should i do if it's out of the project root folder). But what do I do if I want to include the class "properly" --basically so i can double click and ed...
When adding objects to an NSMutableArray in a loop, what are some best practices as to reuse memory allocated for objects that are to be added to the array?
For example:
for (int i = 0; i < 5; i++)
{
SampleObject *sampleObject = [[SampleObject alloc] init];
sampleObject.someProperty = ...
[sampleObjectArray addObject:sampl...
Hi,
I'm working on my first app now and it's going quite well, but I'm wondering if i'm using the correct app design.
I'm building an app which makes use of a navigationController to display a couple viewcontrollers.
In the first viewController a CustomObject is created and in the consecutive viewControllers properties for this custom...
Greetings!
I am working on a kernel extension driver for OSX. It is a simple keyboard filter. I have preferences that are set through a preference pane regarding how this filter will act. I need to take the preferences from this preference pane and load them in to the kernel extension.
I have googled all over and haven't found anything...
how do i check if a BOOL is set in objective-c (iphone)?
i know that it can be done with an int or float this way:
NSNumber *Num = [prefs floatForKey:@"key"];
for example
...
How do I convert the text inside of a TextField to a float in Objective-C?
...
I have added an NSOpenGLView to my MainMenu.xib file, and have implemented drawRect to draw to it, this works great, so far so good.
How do I detect touches on the screen? I imagine I could perhaps dump some transparent buttons or something over the NSOpenGLView area in Interface Builder?
The application is simple, i just need to know ...
I am currently working on a software to control aMule status of my server through the iPhone,
i created a socket that spits out xml which should be parsed out, but because NSXMLParser is event-drive, i'm having problems in understanding how this could work...
I thought of this type of XML structure, if you have ideas of a better way to s...
I have a requirement to create some NSDecimalNumber objects objects as part of my application (as I require the precision of calculation they offer) but I note that in calculations they return NSDecimalNumber objects which are, presumably, autoreleased.
My question is really whether this is potentially problematic in an iPhone applicat...
through terminal you can make it with a command - "SetFile -a B filename"
programmatically i think i should set one of the attributes through
[[NSFileManager defaultManager] createDirectoryAtPath:dirPath withIntermediateDirectories:NO attributes:attributes error:nil];
but i can't find witch one.
thanks)
...
I was wondering if someone can explain what is informal protocols in Objective C? I try to understand it on apple documentation and some other books but my head is still spinning so i will really appreciate that if someone can explain with example.
Thanks.
...
I've implemented Facebook Connect in my app just like the sample app that Facebook provides and it works well. After a user chooses to share data via Facebook they are taken to a new view and presented with the FB login dialog. When the user is done they exit the FB sharing view and return to my app's previous view. The user stays logged...
This has me stumped. I'm trying to figure out how to save the state of a UIScrollView. For example, I have several images in a UIScrollView that are loaded like so:
NSUInteger i;
for (i = 1; i <= kNumImages; i++)
{
NSString *imageName = [NSString stringWithFormat:@"image%d.jpg", i];
UIImage *image = [UIImage imageNamed:image...
I have designed an iris shutter animation for a camera view in an iPhone app.
Unfortunately, it seems impossible to hide Apple's shutter when the view appears, even if I hide the camera controls and create a custom cameraOverlayView.
I have gotten around this by animating my shutter on top of the normal shutter when the view appears, u...
Hello folks,
I was looking for some YouTube API implementation on iPhone but couldnt find and good resources.
I just want to know how to initialize the connection and call the function to display the list of youtube videos.
Can anyone help me out...
Any code will be very helpful...
Thanx in advance...
...
If I've created these two variables:
NSDecimalNumber *myNum;
NSString *myString;
how do I later test whether an object has been assigned to them yet or not?
Thanks
...