cocoa-touch

Why does UIWebView keep detecting phone numbers?

I have a UIWebView with detect phone numbers unchecked. However, it keeps underlining the numbers in this text: Version: 2.1 3.19.2009 The text isn't in an anchor or anything. Is there a way to force the UIWebView to not detect phone numbers? ...

Throwing webview request to another webview

I have a UIViewController with a UIWebView (webview1) in it. The webview is only a few lines of text but does have a link in it. Rather than open the link, which goes to an external website, in this tiny space, I'd like to send it on to webview2, which will be a full screen. The goal is to keep the web requests within my app rather th...

UIToolBar - disable buttons

Hi, in my app I have a toolbar and at a certain point I want to disable or enable some buttons. What is the easiest way to do so? How can I access items property of UIToolbar? Here is my code: -(void)addToolbar { NSMutableArray *buttons = [[NSMutableArray alloc] init]; //Define space UIBarButtonItem *flexibleSpaceItem; ...

UITableView - how to recognize a deselection?

Hi, In my app I want to have certain buttons that are inactive when there is no row selected in my table view. There is a method didSelectRowAtIndexPath, that tells me when a row was selected. Is there a way to know if a row was deselected? Thank you in advance. ...

Is there a good charting library for iPhone?

I have a need to render and display charts (bar charts for now, but more types may be needed later) in an iPhone app I'm working on. I've done some looking around and it doesn't look like there are any really good, mature charting libraries for iPhone yet. I've also looked for something written for Cocoa on the Mac that can be adapted, b...

iPhone SDK mem management issues - EXC_BAD_ACCESS

I've been staring at this same issue for a long time now, and would really appreciate any help or suggestions. I'm sure its something simple, but I can't seem to find it. In my app delegate I'm loading up a bunch of accessory objects (an object I created, which supports NSCopying) with the following code: NSString *path = [[NSBundl...

Simple assignment not working with UIImage* / imageNamed

UIImage* test = [UIImage imageNamed:@"test.png"]; self.image_in_controller = test; Later in the code when image_in_controller is used, I get EXC_BAD_ACCESS. I set a break point around the time of the assignment. The variable test is getting set just fine.. after the assignment to selfimage_in_controller, test is still okay, but image_...

ABPeoplePickerNavigationController

This is probably a really basic question, but when I make my ABPeoplePickerNavigationController instance (addBookViewer)visible by running, [self presentModalViewController:addBookViewer animated:YES] the contact view pops up, but is cut off by the top most bar of the display (the bar showing the AT&T signal strength, clock and battery...

Objective-C: How to get class and runtime information?

Hi all, For debugging purposes, I'd like to display as much class information as I can, and possibly runtime information (which thread does the class/function run in, etc) into the console. Is there an easy way to do this with a function, variable or even (external) framework? P.S: I'm using Cocoa Touch. ...

Passing variables through classes in Objective-C

In my scenario I have 2 view controllers, one tied to the main view and one that is connected to the first one as a subview. Now let's say that my App Delegate class wants to pass a string to the subview controller. What is the best practice to achieve this? If I wanted to pass it to the 1st controller i could just say something like [...

Validate iPhone device Ids?

Is there a way to validate an iPhone device ID? I want to be able to accept device IDs submitted from iPhone users via HTTP request and validate that they are tied to a legitimate device. ...

XML Parsing in Cocoa Touch/iPhone

Okay i have seen TouchXML, parseXML, NSXMLDocument, NSXMLParser but i am really confused with what to to do. I have an iphone app which connects to a servers, requests data and gets XML response. Sample xml response to different set of queries is give at http://pastebin.com/f681c4b04 I have another classes which acts as Controller (As ...

UITableView - delete button

Hi, in my app when user swipes a certain row I want to display a delete button. And when the button appears it obscures IndexTitles and another label in my cell (it has subviews). How can I customize my table when the button appears? Thank you. ...

Problem with touchesMoved and drawRect.

I have a sticky bug that I can't seem to figure out, and I think it has something to do with the way touchesMoved is implemented. in touchesMoved, I check to see where the touch is (if statement) and then accordingly, call setNeedsDisplayWithRect on a 40 by 40 area near the touchpoint. What happens in DrawRect is that a black image ...

iPhone - Difference between a Library UINavigationController and my subclassing UINavigationController

I'm trying to understand the difference between using a UINavigationController inside a Nib (via the library window) and subclassing the UINavigationController. (For the purposes of this question, I'm not just specifically referring to a Navigation Controller; I'm referring to any Controller that is contained in the Library window in Int...

Scrolling TextView's Code?

I have a textview but it does not scroll can anyone tell me the code that i have to write to get my textview to scroll. All i am using it for is to explain what is going on below so i do not want it to be editable but to save space it has to scroll Can it all be done in IF Builder or no? ...

How to return to the main page of the app after a phonenumber is dialled and hence the call is ended?

Hi Guys I am developing a local search app in iPhone...after dialing a phone number from a set of phone number searches i am able to make a call to the selected number..Now what i need is a code or a way to check if the call has ended and the app should return to the page from where i selected the number rather than exiting the app whic...

How to perform a cell deselection when a user returns to a table view?

I am using a UITableView to display a list of cells, when the user selects a cell then a new view appears by using the following code: - (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [self.navigationController pushViewController: detailsViewController animated: TRUE]; } By using the ...

How can I stretch or jar an image inside an UIImageView?

Apple says, that all I have to do is to modify the bounds rectangle. Then the content inside the bounds rectangle would be stretched or jard into the frame rectangle. But when I assign another CGRect with a smaller width to my bounds rectangle, nothing happens. The UIImageView keeps looking exactly the same. No compile errors. I guess t...

Application Design Question: AppDelegate?

Hey friends, I am developing an iPhone app for some sweet undergrad research I've been working on. Sadly, my school doesn't offer software engineering / design classes so when it comes to questions of best practices in OO Design, I do a lot of reading. My Dilemma: My application loads a view (v1) where, upon user's button click, v1's ...