iphone

Using real location services in simulator

Is there a way to use real location services in the simulator only (no device involved)? It always goes to Cupertino. ...

How to connect to a SQLite database in iphone

I am attempting converting an application from VB6 to an iphone app. In the VB version, the database is in Access. But, I have read that I need to convert it to SQLite. How I amend the following code to switch from Access to SQLite? cnList = new ADODB.Connection(); rsList = new ADODB.Recordset(); cnList.Provider = "Microsoft.Jet.OLEDB...

Can I load a UIImage from a URL?

I have a URL for an image (got it from UIImagePickerController) but I no longer have the image in memory (the URL was saved from a previous run of the app). Can I reload the UIImage from the URL again? I see that UIImage has a imageWithContentsOfFile: but I have a URL. Can I use NSData's dataWithContentsOfURL: to read the URL? ----...

iPhone SDK: Adding Input Field Group

I cannot find how to a text field group, similar to what is in the Address Book app: Can someone tell me what I am doing wrong? I can't find an option to make them look this way. Also, does anyone know the font, font size and color? ...

Unable to forward UITouch events to my view controller

I have a UISplitViewController setup with a custom view added as a subview of the view (UILayoutContainerView) of split view controller. I am trying to forward touch events from my custom view controller to the master and detail views, but the following (which was suggested here on another thread) seems to have no effect: - (void)touche...

Deleting from 2 arrays of dictionaries

I have an array of dictionaries loaded from a plist (below) called arrayHistory. <plist version="1.0"> <array> <dict> <key>item</key> <string>1</string> <key>result</key> <string>8.1</string> <key>date</key> <date>2009-12-15T19:36:59Z</date> </dict> ... </array> </plist> I filte...

How import Special Characters from Excel to SQLIte

I try to import an Excel table with German special characters (ä, ö, ü, ß, Ä, Ö, Ü). These don't import properly into the SQLite database (using the firefox SQLite Manager). Any clues how to properly import the CSV file? ...

How do I create an NSArray with string literals?

I'm attempting to create an NSArray with a grouping of string literals, however I get the compile error "Initializer element is not constant". NSArray *currencies = [NSArray arrayWithObjects:@"Dollar", @"Euro", @"Pound", nil]; Could someone point out what I'm doing wrong, and possibly explain the error message? ...

iPhone: Leak with UIWebView loading Office documents. Any ideas how to avoid it?

While there are already quite a few posts about leaks around UIWebView, mine is a bit more special, I believe, and thus deserves its own post here. I see a reproducible large leak every time I load a Office document such as a Word or Excel file. For instance, every time I display a 180KB .doc file, I get a 100KB leak. And that happens ...

Check if iPhone is muted, and call a method if it gets muted in runtime

Hey! I want to check wether or not the iPhone is muted when the app starts, and I want some code to be run every time the mute-switch switches. Is this possible? Thanks :) EDIT: I use an AVAudioPlayer to play sounds. What I am trying to do is to set the text of a label, if the phone is muted, in viewDidLoad:, and edit the text again...

iPhone: Does it ever make sense for an object to retain its delegate?

According to the rules of memory management in a non garbage collected world, one is not supposed to retain a the calling object in a delegate. Scenario goes like this: I have a class that inherits from UITableViewController and contains a search bar. I run expensive search operations in a secondary thread. This is all done with an NSOp...

Use a proxy to connect iPhone to server?

I'm researching how to code an iPhone app that needs to connect to an online service to get data. The online service only provides access to specified IP addresses or ranges, so iPhones won't be able to connect directly, and the request will have to go through a server. I looked into setting up my own forward proxy server (which the ser...

Getting exposure values from iPhone camera

Exposure values from camera can be acquired when you take picture (without saving it to SavedPhotos). A light meter application on iPhone does this. What is the appropriate way to get these values? The aforementioned application does this on iPhone 3GS only, so I guess it may be somehow related to EXIF data which is populated with this...

iPhone:How to add "Degree" symbol in UILabel string text?

Hi, I want to include "degree" symbol for weather report as 45 degree C. How to add degree symbol in string to include that UILabel? If anybody knows it, please share to me. Thank you. ...

Appropriate control for page like swiping

I currently have a UIScrollView which has a content size equal to about 50 pages, each one the size of the application view. I have implemented scrolling by using paging and at all time keep current, previous and next page in memory, while the rest are created when required, e.g. when one swipes forward, the old 'previous' view is releas...

shouldAutorotateToInterfaceOrientation & UINavigationController

I'm trying to implement auto-rotation in my application that is basically UINavigationController with lots of UIViewControllers that get pushed onto it. I've copy-pasted this in my first UIViewController (that gets pushed into UINavigationController): - (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOri...

How can i put UITextfiled inputs into UITableView every time i add an input in the UITextField?

How can i show the input text from UITextFiled into UITableView and the UITable Updated automatically once the UITextFiled get field by another user? like, one the user get online he should be shown in the UITableView so the other users be able to see who's online i did that already for the room list but!!! this is the the welcome...

Starting a new Xcode project from a template vs. a blank project

I sometimes find it's easier to create a new project from scratch in other IDEs simply because its often more difficult to understand and tweak the generated template code than it is to write the code you need from scratch. Do seasoned iPhone developers still use templates when creating new projects? How difficult is it to add functi...

iPhone: Grouped tables and navigation controller issues

Hi there, I've set up a grouped table on my app, and pushing to new views works fine. Except for one thing. The titles and stack layout are all weird. Here's the breakdown: I have two sections in my table. When I tap on the first row in the first section, it takes me to the correct view, but the title of the new view is the name of th...

How to get friends' status updates from facebook with FB Connect for iPhone?

Hello! This is my first question in here, but I've gotten loads of help from other posts in here, so thanks for a great community! Ok, I've got my Facebook session set up and I'm able to log in and get my UID. But when I run this query, I get a blank result: - (void)getUserName { NSString *fql = [NSString stringWithFormat:@"select ...