iphone

iPhone Development - Setting up a view in a view controller

Hi, I'm learning to develop for iPhone without Interface Builder (a personal preference), and I'm not sure which function of a view controller I should be setting up the view in: init, viewDidLoad, or loadView. I read somewhere to only use init for the view controller, if anything, and not setting up the view as it could cause problems. ...

Is there a way to remove the separator line from a single cell in UITableView?

I know I can change the UITableView property separatorStyle to UITableViewCellSeparatorStyleNone or UITableViewCellSeparatorStyleSingleLine to change all the cells in the TableView one way or the other. I'm interested having some cells with a SingleLine Separator and some cells without. Is this possible? ...

Can I make my iphone app created in xcode into a web application?

I made an application for the iphone in Xcode, but as a result of recent developments, I now need to make it into a web application. I know that Dashcode creates web applications suitable for the iphone. Can I somehow import my Xcode project into Dashcode? Or can I use Xcode to make it into web app without completely re-writing the ...

How to make the search bar staying always on top using UISearchDisplayController in iPhone SDK 3.0

The iPhone SDK 3.0 has this handy new class "UISearchDisplayController" which makes it easy to create a search bar, handling all the user input and displaying the search results. I am using it for my new app, but there is one thing i would like to change: As a default, the search bar should be put at the top of the UITableView that dis...

How to get a color image in iPhone sdk.

Hello all, I want something as follows UIImage *solid = [UIImage imageWithColor:[UIColor darkGrayColor]]; to create an image with respect to some color. how to do it in iPhone sdk. ...

How can I show a custom image in navigation bar back button instead of default buttons which are shown by nav bar itself

On navigating to any view in an app which has navigation controller implemented, it shows a back button to go to the previous view. Is there a way I can use custom image instead of the default one? ...

When it comes to developing for the IPhone, should I use Git or Subversion?

It sounds to me like subversion's centralized model works better for web application development where you have a team of engineers working currently on the same code base and releasing constantly. On the other hand Git's distributed model is appealing for an IPhone app because 1) I dont' need a connection to browse the repository 2) it...

Complying with the MIT license in an iPhone application

Hi, I'd like to use some MIT-licensed xml-parsing code in my iPhone game. This seems to require that I package the MIT license with the application. However, my iPhone app does not include extensive documentation and my demographic will not want legal notices shoved in their faces. My boss is afraid of using this code because our compa...

Read large file into sqlite table in objective-C on iPhone

I have a 2 MB file, not too large, that I'd like to put into an sqlite database so that I can search it. There are about 30K entries that are in CSV format, with six fields per line. My understanding is that sqlite on the iPhone can handle a database of this size. I have taken a few approaches but they have all been slow > 30 s. I've...

iphone developer program: does it require a business license?

Sorry, this is not programming related but I still think its important. I know that for a company of 2 people or more the program requires a business license. Is it the same requirement for an individual developer releasing an application? ...

UISearchDisplayController with no results tableView?

Usually, a UISearchDisplayController, when activated, dims the tableView and focuses the searchBar. As soon as you enter text into the searchBar, it creates a searchResultsTableView that displays between the searchBar and the keyboard. The searchDisplayController's delegate gets called when this second UITableView is loaded/shown/hidden/...

becomeFirstResponder Doesn't respect Keyboard settings.

I'm working on a fairly simple iPhone app to solve the quadratic equation, mostly because it's so easy-at least the concepts and math! I've created an interface in Interface Builder that has a couple Labels, 3 text fields (varAfield, etc) and a Solve button. The 3 text fields which are set as UITextFieldDelegate have been set so that th...

How do I call an array value and use it to play a sound file?

I have an array that creates several different sound file names in a specific order. I have successfully created the array but I am not sure how to call the value I got from the array as the file URL or how I implement it into AudioServicesPlaySystemSoundID. This is the code I have so far: - (void)viewDidLoad { NSArr...

iPhone Navigation Problem

I have a tab bar app but the first tab is an image with a button on it. Touching the button is supposed to push a web view. The other tabs are plain web views. Those work fine but every time I push to a new view, it's blank (except for the back button at the top.) Questions: Do I need an xib for the pushed web view? Where does the ...

How to have a property for an array in iPhone

Hello all, I have a UIButton array. UIButton *btn[12]; I want to set property for this btn. How to do this. I tried @property(nonatomic, retain) UIButton *btn; with @synthesize btn; but it doesn works. ...

How do you get an iphone MPMoviePlayer video's total time?

I just want to figure out how to get a video's total time in seconds. Is there video metadata that loads or something? ...

Setting action for back button in navigation controller

I'm trying to overwrite the default action of the back button in a navigation controller. I've provided a target an action on the custom button. The odd thing is when assigning it though the backbutton attribute it doesn't pay attention to them and it just pops the current view and goes back to the root: UIBarButtonItem *backButton = [...

Does keeping a file handle open on an iPhone drain an apprecible amount of battery power?

I am taking a stream of readings from the GPS controller and storing them in an array, and occasionally writing the readings in the array to a file. Should I keep the file handle to the file open, or open and close the file each write? And how much does this matter in the scheme of power consumption? ...

Why initialize objects that will be properties in a roundabout way?

What reasons are there for doing in three lines what could be done in one? Here is some code from developer.apple.com: UINavigationController *aNavigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController]; self.navigationController = aNavigationController; [aNavigationController release]; .....

iPhone- Multiple pages

I have a view based app going here with 3 different pages, I can't for the life of me get all the pages linked together correctly or completely. Its just a home page with 2 buttons linking to the first and send page.... then back to the home page. I have a mock up of what I am working with if someone could look at it and tell me what...