iphone

iphone NSInteger issues

This seems so basic but for some reason I can't get it to work - the 2 variables are both defined as NSIntegers: if ([AScore == "100"] && [BScore == "100"]) { ... } That doesn't work - nor does it work when I take away the parentheses - nor does it work if I try to implement the 'isEqualToString' command. I'm sure this is a ve...

iPhone / Android: what protocol stacks do apps use for connecting to centralised services?

Hi All, Aplogies for the ignorant question, I have no experience with app development on any mobile platform. Basically what I want to know is what communication protocols do apps typically use for accessing/querying centralised services? E.g if I port a webapp/service to iPhone/Android, typically how would I access/query this web servi...

Stop lazy-loading images?

Here's the issue – I followed along with the Apple lazy-load image sample code to handle my graphical tables. It works great. However, my lazy-load image tables are being stacked within a navigation controller so that you can move in and out of menus. While all this works, I'm getting a persistent crash when I move into a table then move...

strange behavior when changing UINavigationController backItem title

Hi, I'm changing the back button item title in the viewDidAppear of a controller in the following way: self.navigationController.navigationBar.backItem.title = @"Previous"; It changes the tittle properly, but the I'm having a strange behaviour. When I select the "previous" button, it changes the tittle of the controller that is up in ...

iphone zoom to user location on mapkit

I'm using map kit and showing user's location using "showsUserLocation" I"m using following code to zoom to user's location, but not zooming. Its zooming to some location in Africa, though the user location on map is showing correct. MKCoordinateRegion newRegion; MKUserLocation* usrLocation = mapView.userLocation; newRegion.center.lat...

How to programaticly access min and Max values defined in a core-data model designed with XCode ?

I was expecting to find that in the NSAttributeDescription class, but only the default value is there. Behind the scene I tought a validationPredicate was created but trying to reach it using NSDictionary* dico= [[myManagedObject entity] propertiesByName]; NSAttributeDescription* attributeDescription=[dico objectForKey:attributeKe...

how to create swipe through photos functionality in iPhone app

Hi, I want to be able to swipe through a series of images in my iPhone app like in the Photos app. I want to have the pictures reside on the phone in the app itself. I know the facebook three20 api does this but it reads the images from a url. Does anyone know how I can implement this functionality? ...

iphone UIPicker default position

Is there a way to set a default position for a UIPicker? I mean, if the user has the option of selecting any number from 1 to 100 in the UIPicker, can I set it to automatically start at 50? ...

Audio Streaming API's: Wifi vs what?

I've noticed certain radio apps, that some stations required wifi and others did not. What were those other stations possibly using? Are there other methods of streaming audio on iOS? Apparently, I was not clear in my question before. I'm asking in terms of API's. Is there an API to interact directly with say, FM radio, on iOS? Is wif...

Alternatives to weak linking in iPhone SDK?

I'm looking to make my app compatible with older versions of iPhone OS. I did see weak linking mentioned as an option. Can I use OS version detection code to avoid code blocks that the OS can't handle? (Say iAD?) if(OS >= 4.0){ //set up iADs using "NDA code"... } If yes, what goes in place of if(OS >= 4.0)? ...

iPhone Analytics

With the recent changes in the SDK agreement, I am kinda confused if I'm able to put any type of analytics into my app. I don't want to do anything nefarious, just want to see which functionality of my app is getting used the most. I was looking at Google Analytic's mobile sdk to track the different views, just like page views but I have...

Google Maps API V3 and stringByEvaluatingJavaScriptFromString?

Hi, I'm writing up an iPhone app using the Google Maps API V3, and I was wondering if it is still possible the use the stringByEvaluatingJavaScriptFromString function in the (void)webViewDidFinishLoad:(UIWebView *)webView function? A simple example being changing the map type (Assuming basic map setup): - (void)webViewDidFinishLoad:(UIW...

iphone how to localize only particular parts of app

i'm making a korean/english app, so naturally i would need both english and korean displayed on the same tableview cell at the same time. i've considered specifying an element in the plist to be a particular language... but how would i write in korean characters? i have a dreadful feeling there will be much to custom code for this with...

iphone/ipad handwriting recognition library

Hi, I need a simple (preferably open source) handwriting recognition library for the iPhone/iPad. I only need to recognize numbers, which should make this much easier. Any ideas? ...

Using the Cocoa framework, when setting a label, an explicit cast to NSString works but stringValue raises an exception. Why?

I'm setting a UILabel to a value stored in as a NSNumber. If I do this foo.label.text = [bar stringValue]; then I get a NSInvalidArgumentException However if I cast by doing: foo.label.text = (NSString *)bar; then things work ok. Can anyone explain why this could be the case? ...

per build configuration files on iPhone ?

I'm looking for the best way to store per-Build configuration information for an iPhone app. In my iPhone app there are several url's and storage location settings that are specific to a particular build (DEBUG RELEASE etc) Currently i have three recipients for my app, QA/Test, myself and the customer, each has specific settings for th...

[iPhone] Why does dot notation work and not brackets?

Hi, So I'm calling this: [leftSwitch hidden:NO]; but the iPhone Simulator just crashes (no compiler errors) when I click on the Segmented Control that calls the IBAction that this code is from. However, as soon as I change this to: leftSwitch.hidden = NO; it works...I made no other changes. ...

Notifying view controller when subview touch events occur.

I have a UIViewController whose view has a custom subview. This custom subview needs to track touch events and report swipe gestures. Currently I put touchesBegan, touchesMoved, touchesEnded and touchesCancelled in the subview class. With some extra logic I am able to get swipe gestures and call my handleRightSwipe and handleLeftSwi...

How can I detect whether a user has installed a specific iPhone app via JavaScript?

I'd like to build a mobile Web app that: If my iPhone app is already installed, launches it by redirecting to a URL handled by the app If my iPhone app is not installed, displays a web page encouraging users to download it from the App Store The problem is, I don't know how to detect whether the app is installed before redirecting. ...

How to convert an NSString to hex values

I'd like to convert a regular NSString into an NSString with the (what I assume are) ASCII hex values and back. I need to produce the same output that the Java methods below do, but I can't seem to find a way to do it in Objective-C. I've found some examples in C and C++ but I've had a hard time working them into my code. Here are the ...