objective-c

Draw a transparent box on the iPhone

How do you make a transparent box like the one for the PDF viewer that shows the page number? ...

Custom UITableViewCellEditingStyle.

Is it possible to create a custom UITableViewCellEditingStyle, say to change the the image/icon that appears next to each row and maybe what action it takes. Is it possible and if so how? ...

About the fate of malloc()ed arrays of arrays.

Hello everyone - my first question on Stackoverflow. Let me start with a bit of code. It's a bit repetitive so I'm going to cut out the parts I repeat for different arrays (feel free to ask for the others). However, please ignore the code in preference to answering the Qs at the bottom. Firstly: thank you to answerers in advance. Se...

Releasing object in dealloc

In my Objective-C class I alloc and release an object multiple times. I also have to release it in dealloc. But if it has been already released previously I might get crash. Is it legal to set object to nil after releasing it? In what cases this would be wrong and cause even more problems? ...

CALayer is not drawing its content while CABasicAnimation is used

I have an application with a custom CALayer subclass. In this layer subclass i have overwritten the - (void) drawInContext:(CGContextRef)ctx method. This works fine and all my custom content is drawn. Now I wanted to add a custom property which gets animated when it's content is changed. And I need to redraw while the animation is runni...

Does objective C support the caldav?

Hi, everyone, I want to ask a question about the objective C. Do the objective C and iOS 4 support the caldav? Thank you very much. ...

(iPhone)URL formatting question

Hi, I am trying to format a URL but am getting a bug out of it. My code is below. NSString *twitterURL = [NSString stringWithFormat:@"http://twitter.com/?status=My%20score%20is:%i%20and%20CharsPerMin%20is:%@", currentScore, charPerMin.text]; When calling the method it doesn't do a thing. I think the issue is with %20. %20 is being u...

accessoryType in the left side

Hi, Is there any way to set the accessoryType of the cell to be in the left side? the code i use: cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton; in this condition the accessoryType button is on the right side and i want it in the left side. I tried also to build a custom cell be in the IB when i chose accessory...

Using oauth for creating twitter application in iphone

I am creating a twitter application in iphone using oauth. But my application request for: oauth_consumer_key, oauth_signature_method, oauth_signature, oauth_timestamp, oauth_nonce, oauth_version, oauth_callback, Please anyone help me how to create all these keys for my application. In my twitter account xauth is disabled by default. ...

What do we mean by an Object "sending messages" and how do protocols help an object advertise the messages it supports?

What do we mean by an Object "sending messages" and how do protocols help an object to advertise the messages it supports? Does anyone have an example? ...

What is the difference between @class and #import

When I compile with the following code there are no errors: @class RootViewController; //#import "RootViewController.h" When I compile with the following code I get an error: //@class RootViewController; #import "RootViewController.h" "error: expected specifier-qualifier-list before 'RootViewController'" I don't understand what th...

UIDeviceOrientationDidChangeNotification won't stop

Hey, I've got a little problem using UIDeviceOrientationDidChangeNotification. After I leave a certain ViewController (the viewWillDisappear: method is called), the device won't stop to send notifications. This means, after I pushed another ViewController on top of the stack and I rotate the device, the receivedRotate: method of the Vi...

SOAP action in iphone

I am using thid code in android,I need the same code in iPhone..with appropriate syntex NSString *soap = soapStart + "<" + soapAction + " xmlns:m='http://www.aras-corp.com/'&gt;" + body + "</"+ soapAction + ">" + soapEnd; error appers on screen "invalid operands in binary +(have struct 'Struct NSString*' ans 'char *' I am first time...

Adding a UIImage from the UIImagePickerController to a UIButton

Hi there, I have a UIButton which the user clicks on to bring up a UIImagePickerController. Once this has processed it returns an edited UIImage to a delegate handler, which then is supposed to populate the UIButton with the new image. In practise, however, what happens is if the user selects an image from their library, it works fine....

NSDictionary losing its contents (exc bad access)

Hi So i have a uiviewcontroller. It has a property of an NSMutableArray with a nonatomic, retain property synthesized. In the viewDidLoad I init it with the following, and also add a button to the nav bar. test = [NSDictionary dictionaryWithObjectsAndKeys: [[SearchField alloc] initWithName:@"Subject" :Text], kSubjectKey, ...

Extract image path from HTML in Objective C

Help!!! I am fairly new to iPhone App development and I am caught up with parsing! I am trying to read the feeds from a URL which ends in .cms I was able to get the text from the source and remove the HTML using the flattenHTML code but I am having trouble with extracting the path for the image. The path for the image is in something lik...

When should uiviewcontrollers be declared as properties

Well this has been bugging me for quite a while so now i'll ask When should uiviewcontrollers be declared as properties? I noticed that in many examples uiviewcontrollers that are being pushed and popped on a uinavigation controller are not declared as properties. I took that forward and now every uiviewcontroller i use inside my code ...

UIImagePickerController iPad problems

I have the following code: UIImagePickerController *imagePicker = [[UIImagePickerController alloc] initWithRootViewController:self]; imagePicker.delegate = self; popover = [[UIPopoverController alloc] initWithContentViewController:imagePicker]; [imagePicker release]; [popover presentPopoverFromRect:CGRectMake(100, 100.0, 0.0, 0.0) ...

How to spin the component picker very fastly in Iphone sdk?

Hi guys, I need a help from ur side.As I ama making the spin action for the component picker it was spinning when I tapped the spin button but it was slow,I need to make the spin fast for 5 seconds and slowly it rests to it position.can anyone help to get this one. My code for spin action is: -(void)SpinAction { BOOL win = NO; int num...

Button to populate image from array

Hey guys i have an image view, with a popover controller. There is an array called detailitem which loads images into the image view. All i want is a button to load next image in array into the image view how would i write this? Here is my attempt it doesn't work? -(IBAction) nextitem { NSString * imageName = [NSString stringWithF...