iphone

nonatomic property in model class when using NSOperationQueue (iPhone)?

I have a custom model class with an NSMutableData ivar that will be accessed by custom NSOperation subclasses (using an NSOperationQueue). I think I can guarantee thread-safe access to the ivar from multiple NSOperations by using dependencies, and I can guarantee that I don't access the ivar from other code (say my main app thread) by ...

Drawing a UIImageView at position of user tap.

Hello, This is the 2nd time I have asked this. How do I draw an image at the location of the user's tap every time the user taps the screen? Could you please leave a sample project or code because I am new to iPhone programming and have a hard time understanding certain methods etc. Thanks, Tate ...

Turning additional strings in this JSON array into a UITableView Detail

I have a NSURL request that brings back an array of "name" and "phone", "etc"... The "name" Key shows up fine on the master table, but I'm having trouble figuring out how to get the rest of the array to show up on the detail table when I select the row. (I have the DetailerTableViewController working to accept the view). Any help would b...

iPhone webkit dialer not working

Hi, I've a simple dialer like this <a class="call" href="tel:18000000000">1 (800) 800-0000</a> It's not doing the call out. Do I need to set anything before that will work? Thanks, Tee ...

How to erase part of an image as the user touches it

My big picture goal is to have a grey field over an image, and then as the user rubs on that grey field, it reveals the image underneath. Basically like a lottery scratcher card. I've done a bunch of searching through the docs, as well as this site, but can't find the solution. The following is just a proof of concept to test "erasing...

Writing an app to stream video to iPhone

I'm interested in creating an iPhone app that can stream video from a central server, YouTube style. I was wondering if anyone has ever tried to do this before, what is the path of least resistant, existing APIs, etc? I really know nothing about how this is generally done. Would I be working with sockets? Just looking for some direction ...

InAppSettingsKit without saving to Settings app

I've seen there is a library called InAppSettingsKit - http://www.inappsettingskit.com/ - which lets your in-app settings mimic your settings within the Settings app. But is there a way to get this to NOT use the Settings app as well? So it just allows you to change settings within the app. Or is there another library which does this...

Practical rules for premature optimization

It seems that the phrase "Premature Optimization" is the buzz-word of the day. For some reason, iphone programmers in particular seem to think of avoiding premature optimization as a pro-active goal, rather than the natural result of simply avoiding distraction. The problem is, the term is beginning to be applied more and more to cases...

A simple way to implement pathfinding using bullet physics - iPhone SDK

Hi, I have bullet physics set up and working on the iPhone but now I want to implement some sort of path finding with it. The problem is I have no idea where to start, the level is pretty simple just a lot of pillars that I want the 'bad guys' to navigate around to get to the player character. Do you have any suggestions or are there ...

noob with unrecognized selector woes

I'm puzzled... I have this function "colorWithHexString"... when I include it in the viewcontroller that's calling it then it works fine. But when I move it to a separate "BSJax" class and call it with the same input parameter it throws an unrecognized selector error. Here's the call: BSjax *bsjax = [BSjax new]; NSString *hexString = ...

UIActionSheet truncates long strings! Alternatives?

I have a UIActionSheet which gives the user a few standard choices. The text on the buttons, however, does not cleverly scale down like a text field though when there's too much-- it just truncates with an ellipsis. I need to say a little more in on of my action sheet buttons than there's room for. I don't see any way of changing the ac...

iPhone SDK NumberPad custom inputView for done button

Currently I have a textfield, which pulls up a NumberPad keyboard for input. I want the NumberPad keyboard layout, but I need a button to resign that responder. Is there a way to code the UITextField so that it has a NumberPad keyboard and the space on the left of the keyboard which is blank is replaced with a 'Done', 'Send' or 'Go' bu...

How to know a movieplayer release finished?

I aims to release a movieplayer (theMovie) and then start another action (so-called playButtonClicked) after it is completely released. I used performSelector to delay the "playButtonClicked" for 1 second and it works well. The code is: [theMovie release]; [self performSelector:@selector(playButtonClicked) withObject:nil afterDelay:1];...

what is Delegate in iPhone?

what is the exact meaning of delegate in iphone?how it is implemented in UIViewController? ...

How can I test how my websites render on Mobile Safari without buying an iPhone?

All the "emulators" I've found via google are simply a skin on top of Safari desktop or use your OS's default browser :( I borrowed my friends iPhone and noticed the CSS for a pure CSS drop-down menu doesn't render properly and you can't click the links, yet it renders properly on Safari desktop and every other browser even Internet Expl...

I'm 532 hours away from GMT????

iPhone, Xcode, Objective-c: NSDateFormatter *df = [[[NSDateFormatter alloc] init] autorelease]; [df setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; NSString *s = @"1902-02-01 01:00:00"; NSDate *aDate = [df dateFromString:s]; NSLog(@"(%@)", aDate); // (1902-02-01 01:00:00 -053211) Wow.. 532 hour timezone offset? ...

Transformation for twisting a UIView on iPhone

Is there a way to use CATransform3D, or similar, to twist a UIView? What I mean is to rotate the top edge of the view, but keep the bottom edge where it is. All the transformations I've looked at keep the view 'flat'. Is this more of an Open GL task? ...

How to create a dynamic page in iPhone

Hi All, I want to use a page in our xib which is change every month,This page contain text,song,and image. Please tell me how i perform this,I think i put my song,image,and text file on the server and change every month song,image and text on the server which is automatically changed in our application. If i am right then suggest me h...

copy array from one class to another class array

hi all, i hv an array ("array A", which contains 3 objects, fox ex, to,from,message) in class "A". and in class "B",i m having another array ("array B"),which fills tableview,of class "B" only. i need to fill tableview,with the values of class A's array (i.e array A,with the object values, to,from,message). how can i do it?? how to...

how to find direction of object in iphone?

I have implemented one application in which i want to implement below funtctionality. Suppose i have open my application then i can find some places which is in the 10km radious. But i want to find direction of every places.is it possble. Please help me for this query. Thanks in advance. ...