iphone

UITextView textView:shouldChangeTextInRange:replacementText: doesn't fire when deleting large portions of text?

I am trying to implement a character counter for a UITextView, but have found the counter to be inaccurate in the following situation: Enter a few characters of text, such as "The" Tap return 25 times Hold down the delete button to delete the text (and hold it down until the cursor gets to the top) When the cursor reaches the top (and ...

iPhone Max Permitted Cellular Transfer Rate

In another question regarding our “transferring excessive volumes of data” rejection letter I asked your advise about what could be done to limit our bandwidth usage. Thanks for your replies, we found a solution: we've hobbled the application when its on 3G/Edge and by putting the download on a different thread then halting the thread...

Rotate MapView using Compass orientation

Is it possible to have an embedded MKMapView rotate to always face the direction the iPhone is facing? Basically I want to mimic the Map app rotation feature on my own app. I see that the iPhone SDK does not expose the functionality. However, I wonder if it would work to rotate the entire view using CGAffineTransformMakeRotate. Would...

iPhone Document Directory comes back null in distribution configuration

Hi, I'm trying to persist a value with a plist in the documents directory. I use the following code to get the document directories path: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; I'm ready to release this app so I am ...

Facebook iphone connection

I have the next problem with the connection: I can't connect to one app in facebook, but when I create a new app in facebook and I change the API and secret all is going good. The problem is that I need to connect to the first one app in facebook, the other was only to test the connection. What could be the solution? Thanks ...

Undo Management with Core Data

I'm trying to implement undo support using Core Data on the iPhone and I ran into a few problems. I currently have a couple of managed objects set up but when I make changes to their properties, these changes don't get recorded by the undo manager. From my understanding, Core Data is supposed to have this automatically set up and I shou...

Is anyone testing Mono-Touch?

Is anyone on the site in the beta for MonoTouch? What issues have you been seeing with it? I personally have found it a very nice little system and have just made a small test app with it. The test app seems to startup slowly, but it works on my device so I am happy to be using C# on the iPhone. ...

Creating a localized iPhone app but allowing the user to change language for the application.

I'm working on a localized app and everything is working fine. The problem is I want to allow the user to specifically select the lenguage for the specific app, in the app settings folder. This should users that their phone is set to one language (e.g. french) to set the app to work in English. I'm currently using NSLocalizedString to g...

IPhone SDK: Using Interface Builder to link arrays

Hi everyone, I´m trying to use Interface Builder (IB) to gain time in my app development. So I´m trying to do new things, for example, connecting objects between File´s Owners and Controllers. The situation is: 1 - I have a ViewController with a Nib. This view controller have an array set as a IBOutlet. 2 - I put a custom TableViewCo...

Show iPhone cut copy paste menu on UILabel

Can we enable the cut copy paste menu for a UILabel as it is for a UITextField? If not, and I need to convert my UILabel to UITextField, how can I enable the cut copy paste menu and not allow the content to be modified? ...

objective-c if statement

So this is probably really simple but for some reason I can't figure it out. When I run the below code I can't get it to go into the if statement even though when I go into the debugger console in xcode and I execute po [resultObject valueForKey:@"type"] it returns 0. What am I doing wrong? Thanks for your help! NSManagedObject *resu...

Need content in UIWebView to display quickly

Part of my app caches web pages for offline viewing. To do that, I am saving the HTML fetched from a site and rewriting img urls to point to a file on the local store. When I load the html into a UIWebView, it loads the images as expected and everything's fine. I am also caching stylesheets in this fashion. The problem is that when I pu...

Access iPhone Mail inbox using native app. Possible?

I was asked to write a native iPhone to provide a filtered view of items in the Mail InBox. For instance, I may want to list out only the emails with text "Mac Tablet Gossip" inside the mail content. However, I don't need (or want) to access the inbox of the mail account, but instead I hope that I can just access the inbox on the device....

UITextField for Phone Number

Hello everyone, I was wondering how I can format the textField that I'm using for a phone number (ie like the "Add New Contact" page on the iPhone. When I enter in a new mobile phone, ex. 1236890987 it formats it as (123) 689-0987.) I already have the keyboard set as the number pad. Thanks! ...

error: expected specifier-qualifier-list before...in Objective C ?

Hi guys. Whenever I build the following code, I get the error above. //Controller.h #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #import "PolygonShape.h" #import "PolygonView.h"; @interface Controller : NSObject { IBOutlet UIButton *decreaseButton; IBOutlet UIButton *increaseButton; IBOutlet UILabel *numberOfSi...

I put a button on a table view cell that play sound when they are pressed but...

I put a button on a table view cell that play sound when they are pressed, when I press the button it stop the sound. But pressing another button on another cell it doesn't plays another sound while the other still playing. I hope that when another button is pressed in another table cell it will stop the playing sound. Here is my code ...

iPhone: get duration of an audio file

Hi, What is the easiest way to get a duration of an audio file? I could create an object of AVAudioPlayer, initialize it with URL and than get the duration, but this way is too long. Is there an easier way? Thanks. ...

How to intercept text from the keyboard and format it before it show in the cell?

Part of the program I'm developing stores user-entered phone numbers, so I'd like to format them as they are entered. I've got the NSFormatter working when text is displayed in the cell from stored data, but I don't know how to format a phone number as it's being entered on the keyboard, as in Apple's contacts app. How can I accomplish ...

iPhone Keyboard Covers Text Field

I have an app where, in Interface Builder, I set up a UIView that has a text field near the bottom of the view. When I run the app and try to enter text into that field, the keyboard slides up overtop of the field so I can't see what I'm typing until I hide the keyboard again. Has anyone else run into this problem and found a good way...

Getting an iPhone app's product name at runtime?

How can this be achieved? I would like to get the name so i can display it within an app, without having to change it in code each time i change a name, of course. ...