iphone

iPhone: How do I convert a string with a currency symbol to a negative number ?

Say I have a string which is £23.56 or $23.56 how can I convert it into -23.56 ? I have this part NSMutableString *strAmount = [NSMutableString stringWithString:txtAmount.text]; [strAmount replaceCharactersInRange: [strAmount rangeOfString: strCurrencySymbol] withString:@""]; ...

iphone memory management strange issue

This is a piece of code I had written in xcode Foo * myFoo = [[Foo alloc] init] ; [myFoo release] ; [myFoo printMessage] ; If I am right, it should give a runtime error when printmessage function is called as myFoo gets deallocated by that time. But in xcode , the code is working and print message is getting called, is it a problem d...

Unable to highlight/copy text in iPhone Safari on mobile site

I have a mobile site which I'm testing on the iPhone, and unlike most other sites, I'm not able to hold my finger on the screen to get the 'copy' menu to appear (with the draggable handles to select an area to copy). Nothing happens at all on my site. I've tried adding the following to my style sheet but it hasn't made any difference: ...

iPhone streaming debugging information

Hi there, I'm looking for a way (doesn't need to be app-store save!!) to get ahold of video-streaming-relevant debugging information. What I'm trying to do, is to write an application that opens a video stream and displays information like: framerate bitrate audio / video etc etc. codec information basically i want to display as mu...

How to let a view rotate forever?

Is there a way to let a view rotate forever, with an specified speed? I need that for an indicator kind of thing. I know there is this weird Lxxxxx00ff constant (don't remember it exactly) that stands for "forever". ...

Mobile Substrate: editing time/carrier strings in the status bar

One of the features I plan to have in the extension I'm writing is that the current time populates the carrier field instead of the actual carrier, and the time in the middle is hidden. In other words, I want the phone to set a fake carrier to the current time whenever the time changes. I took a look at Ryan Petrich's code for his extens...

How can I calibrate the accelerometer?

I'm using the accelerometer to move an object on my screen. It's only working when the iphone is flat. If I use the iPhone in another position, the object is not moving like I want (the Y axis is not well managed). So, I've to calibrate the position of the accelerometer, I guess. But I've no idea how to do this. Please help me. Thank...

intializing viewcontroller to viewcontroller problem?

i am doing the following to initialize the viewcontroller(piechartController) to the viewcontroller's(covVC) variable like following …is it right to change the view controller variable ? self.pie = [[ChatController alloc] initWithNibName:@"Chat" bundle:nil]; self.covVC = [[coverAssetController alloc] init]; self.covVC.pieObj = self.pi...

getting network response when application is in background

I am uploading an image to the web and want it to keep upload even if the app goes into the background. So by using the beginBackgroundTaskWithExpirationHandler, I start uploading the image and then send my app to the background by pressing the home button. The image gets uploaded on the website and I can see it but none of the delegate ...

Perfomance Tuning in Geo API

I am using GEO API in a iPhone app, sometimes the app takes a long time to load the data, so I need a way to make the response fast, any ideas??? My App calls Geo API services in Asynchronous mode. ...

Xcode 'CodeSign error: code signing is required'

I've been working on an iPhone project with iOS 4.0. I just downloaded Xcode 3.2.4 with iOS SDK 4.1 so that I can work with the updated iOS. Upon opening the project in the udpated Xcode, I found that the target read 'Base SDK Missing'. I fixed that by following the instructions here. Now when I try building targeting any version of iOS...

getDistanceFrom Vs distanceFromLocation

Hello, I'm having a problem with getDistanceFrom and distanceFromLocation. getDistanceFrom is deprecated iOS 4.1 and distanceFromLocation is not available in 3.1.3, how do I get around this problem. Has anyone else come across this problem ? My code at the moment is: CLLocationDistance kilometers; if ([currentLocation respon...

uibutton property to avoid highlights

hi... At the time of click a button it's highlighted. While click the button i want to avoid the highlighting of button. In my Application background image for the button is square shape if i'm click the button it shows square outline of the button.but my button is customtype only.... Please help me out to solve this.... Thank you R...

iPhone - How to make a circle path for a CAKeyframeAnimation?

I'm trying to make an key frame animation that lets a image view fly around a circle. I'm using CGPathAddCurveToPoint to make the key frame points. The problem is that the image view always uses the shortest (linear) route. I would like to have some kind of function that builds a circle path for a given radius. Thanks a lot for any hel...

Add different image as background in each section in grouped table view in iphone applications...

I want to create an Iphone application using Grouped Table View. I created the Grouped Table View. My Grouped Table View having the three section. I want to add different images as background for each section in grouped table view. If i use the following code in each section, the total view displayed in same image. NSString *backg...

Back button on UINavigationController

I know that it could seem strange but i need to add a back button on the navigation Bar of the first navigationController's view. I tried like this: UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Foo" style:UIBarButtonItemStyleBordered target:self action:@s...

How to set thumbnail for the video we are loading in the UIWebview in iphone sdk?

Hi guy's I had a thumbnail Image for the video I am playing in the Webview and my code is: -(void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { printf("\n Inside didSelect method....!!"); masterAisleItemListIndexArray = (NSMutableArray*)[ [masterAisleItemListDictionary allKeys] ...

How to refresh or reload a App in Multitasking

Hi, When my Iphone-App was already running and I try to go back to it then it cannot refresh or reload the news or tables automatically. How could i set an automatic refresh on the quickstart of the App? Thx ...

How to convert HEX RGB color codes to UIColor?

I have an RGB hex code like #ffffff as NSString and want to convert that into an UIColor. Is there a simple way to do that? ...

Custom UIView rotation issues

I have a UIView that I wish to alter the size and position of when the view rotates. However, I need to be able to do this programmatically, not using layout settings and autosizing. To this end I have tried changing the frame and bounds of the view when the device rotates and calling for a redraw, but no matter what combination of varia...