iphone

Problem with setNeedsDisplayInRect (quartz2d, iPhone)

Hi everyone. I have written a function that draws x number of squares in a random position every 2 seconds. A square cannot be drawn in the same position twice. Once the app has completed a cycle the grid will be filled in. Now, this works fine when the number of squares drawn is <=8, however when this is higher a square is randomly draw...

How do I reduce Image quality/size in iPhone objective-c?

I have an app that lets the user take a picture with his/her iPhone and use it as a background image for the app. I use UIImagePickerController to let the user take a picture and set the background UIImageView image to the returned UIImage object. IBOutlet UIImageView *backgroundView; -(void)imagePickerController:(UIImagePickerContro...

Showing/hiding navigation bar with smooth animation

I have a navigation based app. The first view (rootcontroller) starts with three large buttons only. No navigationbar. From there, everything else is tableviews and have navigation bars. I'm doing this to show/hide the navigation bar: MyAppAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; appDelegate.navigatio...

How to flip a UIButton horizontal with another UIButton on the backside?

Hello, I want a button that has a another button on the backside. When you press the button it should flip horizontal and show the other button. Apple did this in the ipod-App. When you hear a song you can press the button on the right site of the navigationbar and then the view flips and you can see all the songs from the album. But the...

Xcode iPhone binaries

I got curious what my binary iphone files contained, so I opened some in a text editor. To my surprise, there are a lot of methods and stuff being mentioned, even in the binaries that are code signed (I thought they got encrypted?). Not that it is a problem, I'm just curios. Why are there so many things in plain text? ...

iPhone - How to play a sound on button touch?

I'm trying to make a button play a sound upon touching the button. I can get the sound to play with the Touch Up Inside option but that's not what I'm looking for because the sound only plays after the button is released. I've tried to use touchesBegan to play the sound upon touching the button but it doesn't seem to work. Any ideas wh...

What is the delegate method that is called when an MKPinAnnotationView is touched?

I have been searching for this all night and I have just so frustrated. When a MKPinAnnotationView is clicked, the name and the subtitle comes up. I also want to center that point on the view. I figured there was some method I had to override because the information that pops up happened without me having to code it. Hopefully this was c...

Accelerometer detecting side to side movements - instant detection of change in direction.

Id have an app that does one thing if you shake it one way, and another if you shake it the other. atm my code is. if (acceleration.x > 1.5) { //arm to the right when facing you float duration = ([imageArray count]*0.04); //HUMAN EYE KEEPS IMAGES IN EYE For 40 MILLISECONDS// //NSLog(@"duration:%f", duration); [theF...

iphone: relative paths to local file?

Using MontoTouch for .NET C# iPhone development. (though should not matter) In the iPhoneSimulator, I use UIImage.FromFile (@"images/Bahai.png"); to get the Bahai.png from the images folder. However, when I run it in debug mode on my iTouch, the function returns a null. Only if I put the image file in the root does it work in the iTou...

iPhone Binary for the App Store

After reading another thread about creating the binary for App Store submission (http://stackoverflow.com/questions/1497547/how-to-create-binary-of-iphone-application) I'm still a bit confused. Do I just compress the app in the build/Release-iphoneos directory? Has anyone submitted a binary recently that can let me know how to do this?...

tintcolor for navigationBar

When I set the tintcolor using following code it works self.navigationController.navigationBar.tintColor = [UIColor brownColor]; But When I try to set the tint color like - ` UIImage *navigationBarCol = [UIImage imageNamed:@"navigatorBar_color.png"]; self.navigationController.navigationBar.tintColor = [UIColor colorWithPatternImage:...

how to detect iphones loss of velocity.

How can you use the accelerometer to detect if the phone has come to a halt. In my case iw want to use it for, i'd like to detect whether its changed direction on the same axis ( a u-turn) which would involve the device stopping. Any ideas appreciated. Thanks, Sam. ...

iPhone keyboard with 0-9 and decimal point?

I'm writing an iPhone app that has a textField for the user to enter a "dollar amount" like 12.34 None of the SDK keyboards seem to have a decimal point. (OR do they?) So I decided to just let the user type in "1234" and I would add the decimal point for him... as he types.... by using EDITING CHANGED. But each time my code adds the d...

Listening for events from a tableviewcell

I have a custom uitableviewcell. It has a uitextfield. I'd like the parent tableview controller to take action when the uitextfield keyboard return key is pressed. How do I get the notification to the parent tableview without creating an app wide event notification? Or, is that the best way? ...

How to optimize callbacks from a NSOperationQueue-started thread

Consider this: @interface SomeViewController : UIViewController { SomeChildObject *child; } @end @implementation SomeViewController - (void) viewDidLoad { ... child.delegate = self; } - (void) somethingHappened { NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:child sel...

How to send email from iPhone app without user interface

I want my app to be able to send an email with attachment to a hard-coded recipient with no user input required, unlike the MessageUI framework. Is there any way to do this? Any example code would be appreciated. Thanks in advance. ...

Display picture in UIWebView store locally (Iphone)

Hi, In My Iphone app I display a local HTML file into a UIWebView. Inside the html code I try to display a local picture who is store in the repertory 'Ressource'. I want to know what is the path, I can't point to my picture. Thanks, ...

programmatically make iphone vibrate.

How can you programmatically make iphone vibrate? Any ideas, or tutorial links appreciated. Thanks, Sam. ...

Save video of last 30 second

Hello, I want to develop a program in with user can capture and save only last 30 sec of video after stop button pressed. 1) Do we have control over video recording? 2) how can we get only last 30 sec of video? ...

Is there anything faster than UIView Animations?

Is there anything faster than UIView Animations? Mine are not keeping up, I want to play a series of images, very fast. (i.e 10 in 80 milliseconds) Any ideas? As usual, greatly appreciated. Sam ...