iphone

Halting a playing sound sample on iPhone using AudioServices

I am implementing a sound effect that plays while a user is dragging a UISlider. Here is the IBAction: called by the UISlider's Value Changed event -(IBAction)playTone4; { AudioServicesPlaySystemSound(soundID4); } I would like the sound to halt when the user is not dragging the slider but has not released it. Is there a way to ...

Good GUI Design Tool to mock up iPhone & Android applications

I am about to embark on developing a mobile application for both the iPhone and the Android based phone. I have most of my gui mock ups written down on a white board and some in my head. I need to put them down on paper so I can relay my designs to others in my team. I was wondering what the best on-line gui mockup tool I could use? ...

Whate are the basic concepts for implementing anti-shock and anti-shake algorithms?

I have some animations happening upon fine acceleration detections. But when the user sits in a car or is walking it may get annoying. Basically, all that stuff has to be disabled automatically as soon as there is too much vibration or shaking. Conceptually, I think that it's very hard to filter those vibrations out , since the "vibrati...

longer than five seconds iphone sounds

Hey everyone. The following is the code that I am using to play random sounds on the iPhone simulator. Some of the 30 or so sounds won't play and after some investigating I found out that the ones that weren't playing were longer than five seconds. Does anyone know why this is? Thanks in advance for your help! NSString *path = [[NSBund...

get section number and row number on custom cells button click?

i have tableview with custom cell.the table is divided in many section and rows.i have a custom button on cell. now i want to get section number and row number when i click on that button.? any idea regarding this ...

Is there an way to pause an Core Animation and resume it at some time later?

I have several Core Animation's going on at the same time. They all have an context and an animation id, where the context is the object that's beeing animated (UIImageView objects). I would like to pause them, so that the animation just stops temporarily, and then when some things are done, resume it to complete it. These things happen ...

UIDevice Orientation

I have the following code in a method. When I run this in the simulator the debugger skips right over the code?? What am I missing? if (([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeLeft) || ([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeRight)) { } else { } ...

What's the easiest and fastest way of messaging 30 objects at the "same" time?

I have a UIScrollView where a lot of objects appear (UIImageView's) during scrolling. However, when the user is scrolling, I want to fire messages to all these objects, in order to tell them that they shall not do anything stupid. When the UIScrollView decelerates, some animations happen at the visible objects. When the user moves on fas...

AVAudioPlayer sound on iPhone stops looping unexpectedly: How to debug?

I am implementing a sound effect that plays while a user is dragging a UISlider. In a previous question, I used AudioServicesPlaySystemSound() but that type of sound can't be halted. I need the sound to halt when the user is not actively dragging the slider but has not released it. Now I am creating a sound using an AVAudioPlayer objec...

NSUserDefaults vs sqlite3

I have a small iPhone app that stores a list of objects. The user can add and remove objects, but this list will remain fairly small (most users would have 10-30 objects). NSUserDefaults seems much easier to work with, but will sqlite3 be faster? With only 30 "records" will there be any noticeable difference? ...

How to properly display iPhone Address Book in Landscape mode?

I've added an ABPeoplePickerNavigationController but it doesn't display correctly in landscape. I'm using the iPhone SDK 2.2. ABPeoplePickerNavigationController *ab = [[ABPeoplePickerNavigationController alloc] init]; [ab setPeoplePickerDelegate:self]; [self presentModalViewController:ab animated:YES]; It displays like this with ...

mp4 stream to iphone/ipod touch via http

is it possible to stream video to iphone/ipod touch over http without a proper streaming server with .net? may be some sort of progressive download? ...

Send a photo from camera iPhone?

I already know how to access the camera in the iPhone but I do not know how to take a picture then email it. Anyone know how to do that? ...

iPhone dev: UIWebView Youtube crash. Can I surround it with a try catch?

Hi Im integrating a youtube video in my iPhone application. this thread describes how to integrate it (via a UIWebView), the warning message and the crash, but its unanswered. In my case the crash only happens from time to time (I think it could be when the user is too quick clicking on the "play" icon) so I want to wrap the error arou...

"isEqualToString" Cocoa error

Hello. I am getting an error in my console: 2009-05-30 20:17:05.801 ChuckFacts[1029:20b] *** -[Joke isEqualToString:]: unrecognized selector sent to instance 0x52e2f0 Here is my code that I believe the error is coming from: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexP...

iPhone: Requesting cellforrow for rows out of bounds

What did I do wrong? I just modified the Navigation Based application code a bit to read and display a JSON string. It crashes when I scroll up the list with the message Objc_msgSend and points at this as the problem: cell.textLabel.text=[[locations objectAtIndex: storyIndex] objectForKey: @"title"]; #import "RootViewController.h" #im...

HTTP POST to Imageshack

I am currently uploading images to my server via HTTP POST. Everything works fine using the code below. NSString *UDID = md5([UIDevice currentDevice].uniqueIdentifier); NSString *filename = [NSString stringWithFormat:@"%@-%@", UDID, [NSDate date]]; NSString *urlString = @"http://taptation.com/stationary_data/index.php"; request= [[[NSMu...

NSFetchRequest - can it return an array of properties?

Hello, Unless I have missed something in the documentation, I can't see if it is possible to execute an NSFetchRequest so that it returns an array of properties of objects, instead of the objects themselves. For example, I have: @interface SaleDate { NSDate *open; NSDate *close; Sale *sale; } I want to query something like "clos...

linking c++ sources in iPhone project

I have a single cpp file added to my iPhone project with a .cpp extension, but I'm seeing errors when linking like: operator new[](unsigned long)", referenced from: ___gxx_personality_sj0", referenced from: I thought as long as I named the cpp files with .cpp or .mm it would do the right thing, do I need to add some linker fla...

More than 1 rightBarButtonItem on navigation bar

I would like to have two rightBarButtonItems on navigation bar. One for Edit and the other for Add. Obviously I can't make it using Interface Builder. Does anybody know how to do it programmatically? Thanks! ...