objective-c

How to find undocumented iPhone API calls?

In the early days of the iPhone development apps are often kicked out of the AppStore for using undocumented API calls. I always asked myself how people found out about these methods and what they do. I know a little about Objective-C and I know you can send any message to any object or you can even check if an object will answer to a me...

Check the Node kind in an XML Tree

I have constructed an XML tree from an XML file. While constructing I do initWithKnd: or initWithKind: options: method. How can I check if a node is of Element or CDATA or ay other kind while tracing the XML tree. ...

Capture Touch Event on UITableViewCell and after enter didSelectRowAdTindePath method

Hi I want to personalize my UITableView changing background when user tap on a specific cell. I've a dedicated ViewController for each cell and if I implement touchesBegan method in this viewController i can change my cell background without any problem. The problem is that the method "didSelectRowAtIndexPath" of the UITableView is no l...

UIViewController with custom UIView

Is there a way to make e.g. UIViewController use a custom UIVIew class? ...

selecting next row of table view by shaking the iPhone.

Hello every one, I want to change the row selection by shaking my iphone. i.e. as soon as I shake my iphone, the next row should be selected of tableview. And according to that another operation should be perform. can any one tell??? ...

Objective-C how to check if a string is null

SO I wish to check to see if the item in my array [clientDataArray objectForKey:@"ClientCompany"] is nil. temp = [clientDataArray objectForKey:@"ClientCompany"]; if (temp != [NSNull null]) infofieldCompany.text = temp; So far I have been able to achieve this through the above code, but it does give me the warnings warning: '...

UINavigation/TabBar transition animation

How can I use UIViewAnimationTransition type in one of UINavigation/TabBar transitions? thanks ...

MVC Model Implementation?

I am creating a simple application using the MVC design pattern where my model accesses data off the web and makes it available to my controllers for subsequent display. After a little research I have decided that one method would be to implement my model as a singleton so that I can access it as a shared instance from any of my contr...

What is the different between using separate view and include all view in a xib.

Maybe I clarify my question this way. I want the Window load a view. After I click the MainWindow.xib, I can drag and drop a View in it. The View can make relationship between itself and window. It loads successful. The second way is create a new view Xib. What is different between these two ways? Thz ...

Calculation Conundrum - how do I influence another textfield?

Hey! Basically I have a problem in that when certain parameters are used in my calculator app - it makes the result incorrect. The issue is that I have separate text fields for hours and minutes and say for example I have as the start time "13" in one text field and "30" in the other with the finish time "24" and "00" in their respectiv...

OBJ-C: Call an instance of core-plot graph from separate view controller

I'm using a view controller i.e. ViewController:UIViewController and have another class GraphViewController:UIViewController . How do I call an instance of GraphViewController and place it into my ViewController? I am currently trying to call the plot within my ViewController directly, but I want to make the graph modular so I don't hav...

Network reachability on iPhone

Hello guys! Maybe is there a good way to determine if I have an internet connection or not? (3G or wifi) Thanks! ...

issues make a persistent object in Objective C

Attempting to make a NSObject called 'Person' that will hold the login details for my application (nothing to fancy). The app is made of a navigation controller with multiple table views but I am having issues sharing the Person object around. Attempted to create a static object like this: + (Person *)sharedInstance { static Person...

Objective C: Do I need to release the NSString in this example?

debugTestLabel.text = [[NSString alloc] initWithFormat:@"%g, %g", @"Testing String", @"I am another"]; I alloc the String and immediately assign to the text, but I don't know whether the string can auto release or not. ...

which is faster ? NSXMLParser or KissXML

HI, i need a XML parser. i want to know that which one is faster? NSXMLParser or KissXML ? looking forward for replies... ...

Do I need to use decimal places when using floats? Is the "f" suffix necessary?

I've seen several examples in books and around the web where they sometimes use decimal places when declaring float values even if they are whole numbers, and sometimes using an "f" suffix. Is this necessary? For example: [UIColor colorWithRed:0.8 green:0.914 blue:0.9 alpha:1.00]; How is this different from: [UIColor colorWithRed:0....

What's wrong with this method?

I'm getting a warning: "Return makes pointer from integer without a cast" for this method... +(BOOL *)getBoolFromString:(NSString *)boolStr { if(boolStr == @"true" || boolStr == @"1"){ return YES; } return NO; } ...

Can a user install iphone application developed using 3.1.3 in his iphone 3.0?

Hi Everybody, Can a user install my application from iTunesStore if he is having iPhone OS 3.0 or having lower version of iPhone OS and I have developed my application using iPhone SDK 3.1.3... Can anyone help me with this... Thanx in advance... ...

Allowing user to select a UIPickerView row by tapping.

Hi. I'm trying to use a UIPicker View with a behavior somehow different of what's usually seen in iPhone code examples. What I want to do is to allow users to scroll through the picker contents, but not to select a picker's row automatically (using the "didSelectRow" method from picker's delegate). Instead, I want to allow the user to ...

Check to see if NSDate holds a date or is empty

Hi, What would be the best way to see if an NSDate is actually set to a date or is empty? Returning its description or changing it to string returns "(null)"...? Thanks. ...