iphone

Using a custom UIView from multiple view controllers

I have created a custom UIView that I would like to use on multiple different view controllers in my iPhone application. Currently, I have copied the UIView that contains the controls from the nib file for the first view controller, pasted it into the other view controllers, and then wired up all of the actions to each view controller. T...

Problems with sequential UIImage Animations

I am having a problem trying to animate between 2 UIImage. I did implement the setAnimationDidStopSelector methods so once my first animation is finish I start my second one, but when I tried to flip to my previous image it still flipping to the same image as if the variable didn't take into the account the new value of my image object ...

Which icons/buttons to use for help, about, info?

I use the info button to display a settings page. This page is a modal. I need another button from here to display "About" info, since I've already used "info" for something. I have a search form that is accessed only from the modal. On the search form, I need a help icon. I can use the info button but that seems confusing, since I ...

Building open source library (liblo) for iPhone

I've got an iPhone project using liblo (liblo.sourceforge.net). My project's been working fine in the simulator, but as soon as I went to build for the device, ld fails: ld: library not found for -llo I suspect that this is because I just ran make install when I downloaded liblo. I found a thread that suggested cross compiling by runni...

Why does linker complain about missing symbols?

Why am i getting this weird error? Any Ideas? implementation: #import "VideoView.h" #import <MediaPlayer/MediaPlayer.h> @implementation VideoView @synthesize player; - (void)playVideoWithURL:(NSURL *)url showControls:(BOOL)showControls { if (!player) { player = [[MPMoviePlayerController alloc] initWithContentURL:url]; ...

MySQL C API libraries for iPhone

Hi! Does anybody know where to get a MySQL libraries compiled for the arm iPhone architecture? Or how to cross-compile MySQL for arm? Thanx ...

iPhone app running in simulator won't quit (or be killed)

I have an iPhone app running in the simulator that won't quit. I also cannot kill it, not using Activity Monitor nor kill or kill -9 or killall. cyrus:~ ajbrehm$ ps auxc|grep Vocky ajbrehm 76450 0.0 0.1 153116 5212 ?? UE 12:59pm 0:00.05 Vocky ajbrehm 76437 0.0 0.1 153116 5212 ?? UE 12:58pm 0:00.05 Vocky ajb...

Converting between types in Objective-C

Being a starting Objective-C developer, and not having the patience to actually do some studying, rather than just diving into things, I ran into the following: I have a CGFloat, and I want to divide it by something, and use the result as an NSInteger. Example: CGPoint p = scrollView.contentOffset; //where p is a CGFloat by nature NSI...

Possible to copy CALayer from UIView?

Here's my setup: I have a CALAyer to which I want to add sublayers. I create these sublayers by setting upa UILabel and then adding the UILables layer to my main layer. Of course this leaves the heavy UILabel object hovering around in the background. Is it possible to get the layer with all its content from a UIView and get rid of the UI...

Choose between view controllers

Hi, I have a certain UIViewController (ViewController1), which shows contents of a database. And I want to show another view controller(ViewController2) if the database was not loaded before. So when user enters ViewController1 and the database was not loaded before, I want to take him to ViewController2 instead of ViewController1. So...

UITableViewCell accessoryView not appearing until much later

I've got a UITableView with several entries. Upon selecting one, I need it to do a potentially time-consuming network operation. To give the user some feedback, I tried to place a UIActivityIndicatorView in the UITableViewCell. However, the spinner doesn't appear until much later -- after I've done the expensive operation! What am I doin...

CFNetwork HTTP timeout?

I am looking for a way to add a timeout to a CFHTTP request. It seems like there should be a feature of the CFHTTPMessage or the CFReadStream object, but I can't find it. Do I have to roll my own timer on the run loop or something? (if so, any code for this?) Thanks! ...

Setting each cell in its own group

My UITableViewCells take up the full viewing area. I'd like to use a grouped table so the cells appear to have rounded corners. Right now, if I set the number of sections to something greater than one, I get the number of sections in grouped style but all the cells repeat in each section. How do I setup the table so each cell is in a ...

finished iPhone app: add a new feature. record system sound and then be able to playback

i have just created a drum app. The user taps on the individual buttons which triggers a short sound to play using the systemsound from AudioToolbox. I now would like to add a UIButton which says "record", and upon click, will record all Systemsounds being played, and then when the use presses the stop button; the program should then be...

Capturing EAGLview content WITH alpha channel on iPhone

Hello, have been struggling with this issue for quite some time now and couldn't find an answer so far. Basically, what I want to do, is capturing the content of my EAGLview and then use it to merge it with other images. Anyway, the mainproblem is, that everything transparent in my EAGLview renders opaque when saving it to the photoalbu...

UITableView Index and Scrollers

I have a UITableView with about 400 entries so I'm using sections and an index. I'd also like to see the scroller to indicate position in the table as the sections vary in size considerably. It looks like there is enough room to display the scroller next to the index, but I don't see how to do this. I have the scrollers enabled in IB and...

Best practices for handling user preferences in an iPhone MVC app?

I'm developing my first iPhone app, and while implementing user preferences, I have a few questions on how to best implement this. Assume the basic MVC pattern: MainView displaying data stored in a Model object; MainViewController handling the app logic. For the options, I have an OptionsView and an OptionsViewController. A RootView...

How do I safely populate an array from one thread while reading it in another in Objective-C?

First off I'm not that familiar with using threads and i'm learning on the fly. I have an array that is being used in thread a and being populated in thread b. What I want to do is find the best practice for waiting for the array to be populated from thread b before using it in thread a. ...

iPhone Table View: How to access text field of custom TableViewCell

I've set up a UITableView with several custom UITableViewCell's that have some UITextField's and UISwitch's (based on Settings.app). My question is, when a user clicks the Save button in the navigation bar, what's the beat way to access these text fields and switch controls to save their values? ...

Just change the name of the app executable for an iPhone app

I have an iPhone app where I will be using it as a template for several apps. I want to change the name of the executable for each individual app (Not the app display name on the phone). I see in the target build settings where I can change the key "Product Name" to the new executable name I want. Is there anything else I need to chang...