I am looking to have an image next to a text cell for only the parent rows in my Outline View.
Like what they have in Xcode:
. How would you do this or would you need a Custom Cell?
...
Objective-c, Webview
Hello,
I'm trying to change the innerHTML of an DOM elemnent in a DOMDocument:
DOMDocument *myDOM = [[storyDisplay mainFrame] DOMDocument];
DOMElement *heading = [myDOM getElementById:@"heading"];
[heading setNodeValue:@"hejsa"];
Nothing seems to change when the above lines are executed, is this the right w...
I have two classes, ClassA that will instantiate ClassB and pass off a method as a delegate. ClassB will eventually invoke ClassA's delegate. Do I need to add a retain on ClassA when ClassB stores it?
I'm following the "Implementing a Delegate for a Custom Class" from the "Cocoa Fundamentals Guide: Communicating with Objects" but the sa...
I can understand defining the functions in the @interface of the header file, but why the instance variables? Shouldn't the instance variables be private, only accessible through messages?
...
I'm trying to find out how to draw a path, and then fill it with content from an image, e.g. a .png. I have tiles of various shapes (square, triangle, etc., each defined by an NSBezierPath. I can fill them with solid color, but I also want to be able to fill them with some kind of bitmap image instead of solid color.
...
Is it possible to have alert view buttons above each other instead of next to each other?
...
Is it possible to add a text URL Link in an Alert View message?
...
Could someone please help me figure out how to check if some date is of the same day as today. I guess it would require creating a calender day at 0 hour of the same day in the same timezone and checking against that, but so far my attempts have confused me more then anything.
...
I was using this in my iPhone app
if (title == nil) {
// do something
}
but it throws some exception, and the console shows that the title is "(null)".
So I'm using this now:
if (title == nil || [title isKindOfClass:[NSNull class]]) {
//do something
}
What is the difference, and what is the best way to determine whether a ...
I would like to try some iPhone development but am not a Mac user. I'm not keen to spend a load of cash on a new mac, so if I were to buy an old Mac on ebay, what system should I look at as a minimum for an acceptable iphone dev machine. Cheaper the better obviously.
Note: Not keen on running mac os on a pc so really looking for an appl...
Hi all,
I am creating a sample application for Mac OSX. I created a window which contains a login button and I added a new custom view. Now I need to load the custom view to the window when the user clicks the login button. Please anyone help me...
...
Hi,
I'm doing a presentation on debugging in Xcode and would like to get more information on using NSLog efficiently. I'd like to know if there are any tips and tricks to using NSLog which you guys have picked up.
For example,
is there a way to easily NSLog the current method's name / line number?
is there a way to "disable" all NSLo...
Hello,
I'm sorry to make my first question here a bit of a simple one -- I've spent a day reading the NSLocale and NSCalendar class descriptions but I couldn't see if this was possible.
I have a UIDatePicker in the UIDatePickerModeDateAndTime mode. It is currently displaying date and time according to the user's locale, which is the d...
Hi,
I am working on a iphone app but found that I have now require another view / window to get the user to input and save data / information there.
how do I add another view? do I add it in interface builder and then link it in the main app delegate or will it have its own .h and .m files.
I selected a window view app to start with,...
I am working my way through some Objective-C code that I did not write and have found a variable declaration style that I am unfamiliar with. Can anyone tell me the scope of the variable 'myVar' in the class implementation below? Note that this appears in the '.m' file and not the interface declaration.
@implementation MyClass
@synthesi...
For a game I'm developing, I have several model classes that trigger notifications when their state changes. Then, the view subscribes to those notifications and can react on them.
I'm doing my unit tests for the model with OCUnit, and want to assert that the expected notifications were posted. For that, I'm doing something like this:
...
In the application that I am writing I am trying to write a list of fortunes for a fortune cookie out to a property list. In the simulator this works as expected and everything is great. On the iPod Touch I have it reads from said list fine but it never updates the list.
Are there any differences between updating property lists using th...
I'd like to check the color set for a background on a UIImageView. I've tried:
if(myimage.backgroundColor == [UIColor greenColor]){
...}
else{
...}
but that doesn't work, even when I know the color is green, it always falls into the else part.
Also, is there a way to output the current color in the debug console.
p [myimage backgro...
Still a little confused about Objective-C memory management. I think my confusion stems from what exactly the autorelease means.
NSString *theBackendResponse = [[NSString alloc] initWithData:receivedData encoding:NSASCIIStringEncoding];
NSDictionary *accountDictionary = [theBackendResponse propertyList];
[viewController setAccountDictio...
Hello
I'm programming an application in Objective-C and I'm getting this error:
MyApp(2121,0xb0185000) malloc: *** error for object 0x1068310: double free
*** set a breakpoint in malloc_error_break to debug
It is happening when I release an NSAutoreleasePool and I can't figure out what object I'm releasing twice.
How do I set his br...