objective-c

comapare version numbers in objective c

hi, i am writing an application that receives data with items and version numbers. The numbers are formatted like 1.0.1 or 1.2.5. How can i compare these version numbers. I think they have to be formatted as a string first, no? If so, what option do i have to having objective C understand the 1.2.5 is newer than 1.0.1? ...

NSOperation and NSOperationQueue callback

I have a class. Inside this class I pass an NSOperation into the NSOperationQueue that lives in my global variables. Now my NSOperation is finished. I just want to know that it is finished in my class and to have the operation pass data to that class. How is this typically done? ...

Is there any UIViewController as same as MobileApp's "Info" view controller?

Hi All, Is there any predefined UIViewController/NavigationController in the IPhone API as same as "Info" in "Phone/Mobile" application? For example, suppose I received a call or dialed a number, which is not stored in address book. Then later I wanna see the details of that number, IPhone navigates me to the "Info" view when I click ...

how to record the user voice in objective-c for iphone.

i wan to record the user voice and then play back after some time in objective-c for iphone is there any way to do this. ...

UIControl - changing assigned selectors: addTarget & removeTarget

I'm using 10 buttons in my interface and need, from time to time, to change the button's selector. Am I required to use: -(void)removeTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents before I change the selector or can I just use: -(void)addTarget:(id)target action:(SEL)action forControlEvents:(...

Some IPhone address book related questions.

Hi All, Hi I've some questions related to address book. 1) How Can I design some UIButtons, which are as same as in the address book buttons? If you observe all the "Phone numbers" buttons in the Contact's info view, the upper and below buttons only has the curved edges not all the buttons. 2) How can I show the default image (if a ...

Core Data and UITabBar Controller - help?!

So I have a Project with a UITabBarController and a few Navigation Controllers, and I am trying to implement Core Data. Its just not working. I have a bit of a weird setup: UITabBarController -> Navigation Controller -> Table View Controller I have copied all of the Core Data code and added an entity with an attribute ('Event' and 'nam...

how to play the audio after given period of time

i want to play the audio file after the given period of time set by user. ...

Applying background gradient to a Grouple table cell

Hi, I am using the following piece of code to create a gradient background for a UITableViewCell. While this works perfectly for a plain table cell, the gradient only appears at the left and right corners of the grouped table cell. It is as if the gradient is applied then, the cell is drawn on top of it. Can someone suggest a modific...

how to send the keypad back after typing in textfield in objective-c

i want to send the keypad back after writing in textfield. ...

Inexplicable EXC_BAD_ACCESS in the iPhone simulator

I'm trying to build a class for handling all sqlite3 work and I've encountered an EXC_BAD_ACCESS which I just can't explain. I am new to Objective-C development and memory management in general so I apologize if this is a stupid question. When initializing the class I get the path to the database file and keep it around: NSArray * docu...

How to start playing a music playlist on the iphone?

Right now now I'm thinking about getting a playlist through MPMediaQuery and then add the items inside my MPMediaPlaylist to the MPMusicPlayerController using setQueueWithItemCollection. Is there a way to pass the MPMediaPlaylist directly to the player? ...

Section headerview in UITableView Duplicated.

I am creating an application and I have a customized header of tableview. But sometimes the header gets duplicated. It takes the place of a row in tableview. How do I solve this strange problem? BTW, my tableviewstyle is plain, Header height is 44.0 and the footer height is 0.0. Here is an image how it displays. The header "comments" is...

when i am adding folder from other app to my app am getting error like no such file or directory

i am adding folder from other app folder and then put that folder in my app and i import folder files to my app file but i am getting error like no such file or directory while running. ...

Change iPhone volume without user interaction, is it possible?

I've seen this thread but this is only useful if I wanted the user to pick the volume himself. I wanted my application to change the volume gradually. Thanks. ...

Question on retain attribute with @property and @synthesize

I'm still pretty new to Objective-C coding (as evidenced by this question) and I think I'm not completely understanding how using the retain attribute in a @property declaration works. Here is an example class: @interface Foo : NSObject { NSMutableArray *myArray; } @property (retain) NSMutableArray *myArray; My understanding wa...

draw In Seperate layers-objective c core graphics

Hi All, Im developing a charting application for the iphone using core graphics. My requirement is as follows. I've implemented my all the drawing functions inside the drawRect method. when some update happen in the chart, i need to call [self setNeedsDisplay:true] and it invokes the drawRect method from the begining.(means it executes a...

What does class_getClassVariable() do?

If instance variables belong to an instance of a class, class variables would belong to an instance of a metaclass, I should think. But my experience with the Objective-C metaclass tells me that this is unlikely. I'm wondering what class_getClassVariable does as opposed to class_getInstanceVariable, and why there is not a class_setClass...

UIView and -setBounds issue

Hi guys. I'm using a UINavigationController to manage my UIViewControllers hierarchy. For one of these UIViewController, i need to change its view bounds programmatically (depending on specific conditions) so i used setBounds and it's working fine. My issue is this : when i change this view bounds, then push another UIViewController to...

URLWithString: returns nil

Hi, it may be very easy, but I don't seems to find out why is URLWithString: returning nil here. //localisationName is a arbitrary string here NSString* webName = [localisationName stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSString* stringURL = [NSString stringWithFormat:@"http://maps.google.com/maps/geo?q=%@,Mon...