iphone

How to program smooth movement with the accelerometer like a labyrinth game on iPhone OS?

I want to be able to make image move realistically with the accelerometer controlling it, like any labyrinth game. Below shows what I have so far but it seems very jittery and isnt realistic at all. The ball images seems to never be able to stop and does lots of jittery movements around everywhere. - (void)accelerometer:(UIAccelerometer...

iphone sdk/mac - Yet another problem with sockets

Hi guys, My program consists of 2 parts - A server socket (sits on port 3490) running on a different thread, and a client to test the server. Now the server has a pdf file, and I want the client to display it in a UIWebView. To achieve this I used the folllowing: NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWit...

What is the best way to change my UIViewController to a UINavigationController

Hi, I just realised that my 'root' viewController should have been a UINavigationController. Now I want to change this to be a UINavigationController instead and just curious what my best option would be. I built this view and all other views using IB if that makes a different. I'm mostly worried that I would have to do a lot of copy/p...

NSArray - check if objects are in an array?

I have 2 arrays. One is a large static group of 600 objects, the other is a small varying group of 10 objects. I want to take any common objects between the two groups and put them in a new array. So lets say the large group contains 600 objects named 1 to 600. The smaller group contains 9 objects: 1, 2, 3, 4, 5, 6, a, b, c. I want to ...

iPhone fluid simulation (like in Liquid app, using gravity etc)

How can i achieve Liquid app style fluid simulation? An I need LBM or SPH? I think SPH is too heavy for use on iPhone. But water in Liquid looks like SPH. Thank you! ...

Problem with transitions in rotated view.(iphone)

i have an opengl app with a view over it. This view has a flip transition, which works fine on portrait mode. Now if i want to rotate it doing: view.frame = CGRectMake(0, 432, 320, 48); CGAffineTransform makeLandscape = CGAffineTransformMakeRotation(M_PI * 0.5f); makeLandscape = CGAffineTransformTranslate(makeLandscape, -216, 13...

How to add a footer to a view?

I am new to iphone development.I am creating a map application.I want to display a footer in a view below the mapview in the view.On clicking a button map leads me to the map view where i have to display the footer.Please guide me.Thanks ...

UIAlertView Pops Up Three Times per Call Instead of Just Once

I am getting odd behavior from an NSAlert in two different parts of my program. The behavior is: Alert appears and then spontaneously disappears. Alert reappears and then remains until dismissed by user i.e. normal behavior. Alert reappears again. This behavior only occurs the first time the method that displays the alert is called....

CoverFlow like Slideshow

Hello! I stuck again at a Problem. I want to make a little Slideshow (functionality like CoverFlow -> Thumbnails can scroll horizontally). I have 10 Pictures that should be as Thumbnails in this show. when i "press" a pic, this pic should go fullscreen. Can anyone give me a little help or even a tutorial to do such a thing? Thank You ...

How to open the keyboard automatically on UITextField ?

Hi I have a very simple table and when tocuh a cell it opens a new view with one UITextfield. All I want is that the keyboard will automatically opens, without the user have to touch the UITextfield. Its all done in Interface Builder, so I am not sure how I do this. I guess I need to set the focus at some point ? Thanks ...

NSArray question - \n\t\t being added to the end of strings?

My strings are fine, but when they get added to an array a weird grouping of "\n\t\t" gets added to the end. So the string "Apple", becomes "Apple\n\t\t" when I look at the array description. Whats the deal with that? and how do I fix it? Addition: Its XML code. It seemed like [currentPlace appendString:string]; would get the right pa...

iPhone create/register/add new custom smiley keyboard

Hi, i need a custom keyboard like Emoji application does in my application. Any ideas how to create/register/add a new custom smiley keyboard? ...

iPhone UIPickerView Gestures

How would I go about adding gesture events to uipickerview to change tabs? I have to create a custom class, however, I don't know how to handle the uipickerview. I current have gestures present in uiviews to do this, but I'm having trouble with the uipickerview. My code for the views: #define HORIZ_SWIPE_DRAG_MIN 100 CGPoint mystartTou...

Lock-screen iPhone

Hi, My question is quite simple (I think and hope). I would like to know what happens when I lock my phone. I made a little clock-like app which should play and loop a sound at a given moment (lets say 18:00). But when I press the power button, and the phone locks, nothing happens at 18:00. When I press the power button again 18:05 and ...

iphone/mac - how to send video file with a socket?

Hi My program (iphone app) consists of 2 parts - A server socket (sits on port 3490) running on a different thread, and a client to test the server. The server has a video file, and I want to send it to the client upon request. This I do like this: int fileDesc = open([viewController.filePath UTF8String], O_RDONLY); if (fi...

Problem Playing Audio Iphone

Hi, I'm just trying to get a simple mp3 player working. I'm getting an error that I don't really understand. I have an instance of AVAudioPlayer declared in my h file and I synthesize it in my .m file.... Undefined symbols: ".objc_class_name_AVAudioPlayer", referenced from: literal-pointer@__OBJC@__cls_refs@AVAudioPlayer in P...

OpenGL ES 1.1 or 2.0 on iPhone

I understand that an upgrade to the iPhone OS upgraded the OpenGL ES version support from 1.1 to 2.0. What I haven't been able to find is whether effort should be made to use 1.1 for backwards compatibility with older devices. Xcode seems to suggest I using 2.0, since it only seems to include that version. Should I use 2.0 and not loo...

Convert NSString to Chunks of NSString that has a date format

This might be simple. I have searched, not found yet. How do I convert the NSString @"20100216190205" to an NSString of format @"yyyy-MM-dd HH:mm:ss". ie: @"2010-02-16 19:02:05" EDIT: I wanted to avoid using the NSDateFormatter to be more generic, for other situations. ...

Rendering overlapping translucent objects without darkening overlap

I'm not sure if there's a name for this, but essentially what I need to do is take two opaque sprites, draw them both at 50% opacity, and where they overlap, don't have it look darker. The image on the left is how it's rendered originally. Then, I want to decrease the alpha of the rendering, and by default, I get the image in the mid...

Button on tool bar shoud call location manager method

I am new to iphone development.I have created a map application.I have created a tool bar below the mapview.When i click the button on the tool bar it should display an alert view asking to set the current location .How can i achieve it.please guide me .Where should i give method for the button click event.I have created the toolbar in i...