iphone

iPhone Cocoa hyperlink

Hi, is there a way to display a hyperlink in an iPhone native app. Is this done with a label or another UI object? Thanks! Joe ...

How to get callback from UIPickerView when the selectRow animation is done?

I have a UIPickerView and I would like to be notified when the selectRow animation is done. I tried the following approach in my view controller which has a reference to the UIPickerView and it won't work: -(void)viewDidLoad { ... [UIPickerView setAnimationDelegate:self]; [UIPickerView setAnimationDidStopSelector:@selector(animationF...

NSDictionaries vs. custom objects with properties, what's your take?

I'm writing an App that basically uses 5 business entities, A, B C, D and E A has some properties and holds a list of B's B has some other properties and a list of C's and a list of D's C has some other properties and a list of D's and a list of E's D has only a few properties E has only a few properties There is no inheritance betwe...

How can I prevent iPhone NSNumberFormatter from rounding?

Hi, I'm trying to format large currency numbers like this: NSNumber *testVal = [NSDecimalNumber decimalNumberWithString: @"999999999999999993.00"]; NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]; [formatter setNumberStyle:NSNumberFormatterCurrencyStyle]; [formatter setMaximumIntegerDigits:19]; [formatter setMaximumFract...

searchbar + table + programmatical => cannot edit textfield

The situation is when i assign a searchbar on tableview programmatically, my searchbar textfield editing is bugged. The searchBar cannot recall the "magnifier" effect and even the editing ability after few typing. UISearchBar *mySearchBar = [[UISearchBar alloc]initWithFrame: CGRectMake(0.0f, ...

iPhone reverse geolocation help

Hi All, I'm pretty new to iPhone SDK and Coca dev. I'd like to know how to call a web service which will take the lat and long values from my iPhone and feed them to a webservice so I can retrieve the City,State. I already have the phone location stuff squared away. I'm only looking for where I should pass this info to and how I can pars...

Easiest way to concatenate strings and ints for iPhone?

Concatenating strings and ints seems like a real chore in Objective C. I'm new to the language, so can someone help me with a sort of general purpose function that I can plug into my project and simplify this and not require a lot of typing (where other languages could just use a +)? Thanks very much! ...

How to dismiss keyboard for UITextView with return key?

In IB's library, the introduction tells us that when the return key is pressed, the keyboard for UITextView will disappear. But actually the return key can only act as '\n'. I can add a button and use [txtView resignFirstResponder] to hide the keyboard. But is there a way to add the action for the return key in keyboard so that I needn...

How should I recover a TCP Socket connect after the iPhone goes to sleep...

..and my app is still running! There is this question about what happens when it goes to sleep + wakes up. I know it's calling: - (void)AppDidBecomeActive:(NSNotification *)notification { if(jsocket){ [jsocket release]; } jsocket = [[johnsocket alloc] init]; if(![jsocket connectViaSocket:(NSString*)ipaddress port:@"3660"]){ //por...

problem with image rendering

I am working on an iPhone game and I got to get the ripple effect. I have posted this few days back and I got some answers, thanks for that. This is the first time I am working on OpenGL. I have started learning things. Now, the problem is in a sample code if I try to change the image they have used, I am getting nothing. Please be pat...

3D gaming WYSIWYGs for iPhone

I'm not a graphics or game designer but would like to build more interactivity into my iPhone apps and eventually start developing gaming apps. Tools such as Blender seem for out into the future for anything I'll produce useful from them. I need something similar to a FrontPage for game developers. For 300 bucks, Torgue for the iPhone...

Custom UINavigationBar Background

I've been trying to set up a custom background for the whole of my NavigationBar (not just the titleView) but have been struggling. I found this thread http://discussions.apple.com/thread.jspa?threadID=1649012&tstart=0 But am not sure how to implement the code snippet that is given. Is the code implemented as a new class? Also whe...

Uniquely identify IPhone on a web application

I have a website and I would like to open it to some of our corporate IPhone users, but without their intervention : I enter their IPhone "serial #" into our webapp When they connect to the webapp, if their "serial #" is recognised they can pass, otherwise, access denied. Is there such a "serial #" ? I've thought about a SMS with a...

Update via XML or sqllite db file if possible?

I'm developing an app using UITableView driven content. Current testing is done with local XML of size 100kb. This info should update about once every 2 months. The flow is reading pre-sorted XML -> convert to NSDictionary -> UITableView Since parsing XML will take some work during load every time, plus table index, sorting and searchi...

applicationWillTerminate works as long as I don't switch off the iPhone...

Hi, to save some variables of my apps I use: -(void)applicationWillTerminate:(UIApplication *)application { NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; [prefs setFloat: self.viewController.sLabel.contentOffset.y forKey:@"floatKey"]; [prefs setObject:self.viewController.newText forKey:@"stringVal"]; [prefs synchroni...

Chaos with InterfaceBuilder

Hi Friends, Please clear this scenario. I created a viewController named RootViewController,so obiviously we'll get RootViewController.h and RootViewController.m Then i created a nibfile named ViewScreen.xib by selecting a newFile named viewXib, so automatically we'll get a View in the xibfile.And i linked FilesOwner class to RootVi...

Iphone SDk : Problem with ampersand in the URL string

how do we pass a string Mr.X & Mr.Y in the URL. I have tried this but this one does all the chars but ampersand. [urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding] Thanks for the help. ...

iPhone SDK 3.0 Testing

We are planning to build an IPhone application which will use some of the Features of the new 3.0 SDK especially the Peer to Peer Connectivity, Our biggest concern at the moment is how can we test the application and the Peer to Peer Connectivity, Do we have to wait for the Launch of the IPhone 3.0 or we can use the IPhone available now ...

Obtaining localized strings for a particular language

I am trying to obtain localized strings for the English language (in en.lproj/Localizable.strings) for use as default values when the localized string for the user's preferred language is not found. I want to pass in that default value to this method: [[NSBundle mainBundle] localizedStringForKey:key value:defaultValue table:nil] But...

Do I have to check LSRequiresIPhoneOS in Info.plist if my iPhone App may use the Cam but may work on iPod touch, too?

In my XCode project under ressources there is a Info.plist file. It has an attribute like this: LSRequiresIPhoneOS so my question is: Do I have to check that? What I want is that my app finds out itself wheater there is a camera or not. If not, the feature is disabled, and if yes: Cool! It must work on both iPhone and iPod touch! I g...