iphone

How to convert to unicode from a char array with an intermediate null charaters

i used + (id)stringWithCString:mycharaters encoding:NSUnicodeStringEncoding mycharaters is a char array with an intermediate null charaters and end with two null charaters. char mycharaters[20]; it contains a unicode string and i want to show it. but "The array must end with a NULL character; intermediate NULL characters are not allo...

iPhone/iPad URL Custom Scheme to open a file

Hi I'm trying to intercept some kind of files while using iPad's Safari browser. As you probably know, Safari can't download files, so it would be useful Safari to send my app those files links. As I've read in the iPhone/iPad developer documentation, you can add an URL Custom Scheme to handle some special protocols (like youtube: or t...

How to pause and resume UIView Animation?

hi all, I have a UIView with several UILabels that is animating from top to bottom and vice versa. A sort of Autoque let's say :) I use 2 functions: -(void)goUp -(void)goDown Those functions start a UIView animation to the required position.They both have an AnimationDidStopSelector defined that calls the other function at the end....

How to access the "isPreparedToPlay"-property within a "MPMoviePlayerController"-instance?

HI, i´ve created a new MPMoviePlayerController instance and init that with a contentURL like this: player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:url]]; player.view.frame = rect; [myView addSubview:player.view]; [player play]; Although "play" is a instance variable of the "MPMediapl...

How to set the opacity of random pixels to 0 of a UIImage?

Hi, I'm working on an iPhone app which needs to have the function to reveal an image after some actions. For example: I have 2 UIImages on top of each other. The UIImage on the back is the image to reveal. The UIImage on top needs to cover this image. I need a method that I can tell to reveal the image. So if I call the method, and le...

How do I move shortcut buttons into the GUI

Is there anyway of moving common tasks like uncommenting code (I see I can only do it for a limited selection of things like refactoring etc) onto the main GUI as a button - much like visual studio's buttons? ...

reseting CGContextRef after drawing pdf page using CGContextDrawPDFPage

I am trying to create thumb images for every pdf page in PDF document and place it in a UISCrollVIew. I have succeeded in this, but scrolling is not so smooth as I want when it's too fast. And I want to optimize thumb images creating for Pdf page. I want to create one CGContextRef and reset its content after CGContextDrawPDFPage, as a co...

How do I create a stick bending effect in cocos2d?

I would like to bend sticks in an animated fashion in my cocos2d application in response to user touches. A good example of this is a diving board in a swimming pool when a person jumps from the board into the pool. How would you create the animation of the diving board bending up and down? ...

Does a in-house iphone app have to go through the app store approval process each time it's updated?

Hi, Given that: my app is distributed only in-house with an enterprise-level membership my app is not sold publicly on the app store my app, after the initial distribution, will be updated frequently Will it be required that someone from apple's app store reviews and approves the app each time I update? Or can i just go ahead and r...

split iphone objective-c code in to multiple files

I have written a few apps for the iphone now, but they are all written in what I consider to be a lazy, unstructured way. I have started a new project and have created several Objective-C classes (subclass of NSObject). the problem I have is getting the logic correct in my head. My structure is as follows viewController.h viewControll...

storing an jpg image from internet to disk / db

Hi, I don't know which is the most efficient way of organizing images downloaded from server. I will be downloading around 200 images on to my iPhone on request for download. Which is the most efficient way of organizing ? just dropping it as a file on the phone's memory or having it in sqlite (via coredata) after download ? which one i...

Error when importing ad-hoc distribution of iPhone app into iTunes

I'm trying to make a ad-hoc beta distribution of my app, but get this error whenever I try and import it into iTunes: 'A provisioning profile named "embedded.mobileprovision" already exists on this computer. Do you want to replace it?' If I click Replace, the profile named embedded.mobileprovision appears in the iTunes profiles folder,...

Adding UIViewControllers to a UIScrollView

Right, this may not be possible but maybe it it... I have 3 UIViewControllers, each with their own XIB files which contain the layout for each slide of a presentation (each slide will contain video, images, other interactive elements). I have hooked them all up to a UIScrollView by adding them one by one, see below: page1 *vc = [[page1...

Moving the background image of iPhone upon event

I have a navigation based app where a certain pushed view has a nice background image. Now this view contains a UITextView which is transparent so my background shows all over the whole view except the top which holds the navigation bar. Now when I start editing the textview I would like the for the textview and the background image to "...

don't allow subviews to scale vwith view?

hi all i am scaling UIView using [UIView setTransform:CGAffineTransformMakeScale(2.0*scale.value, 2.0*scale.value)]; its works fine for me but all subviews are also scale with the UIView, but i don't want to scale all subviews of that UIView. i tried following this to stop scale subviews. [UIView setAutoresizesSubviews:NO]; UIVi...

UIButton passes touches to superview when disabled - how can I avoid this?

I have a UIButton that I disable for a few seconds after the user clicks it (using button.enabled = NO). The button disables, but touching it whilst disabled causes the view behind to receive the touch - something I don't want. I've tried button.userInteractionEnabled = NO as well but this has the same problem. Can I have the button co...

iphone uitableview to another view

Hi all! in my program I need a tableview and, when you click onto a row, the view scroll left and show the details (like the mail for example...) how can I do this?? I explain... it's an automatic thing or I need to manage by hand the animation of the view?? thanks in advance ...

Objective-C: Is there any event when a Table Cell goes away?

Hello, Is there any message I can override called when a Table Cell goes away (on scrolling the table)? I think it should be something like dealoc. I'm asking this because I have below situation: I have a table with many cells (100+) and each of this cell contains a ImageView. For loading the image (from a URL) I'm using NSOperationQu...

Can you do a Ping or traceroute command on iPhone?

Odd question, I know I can do this in OS X Objective C, but can you run a ping against an IP or URL on the iPhone? Is the framework there to support it? Same with doing a traceroute. ...

activity indicator and CLLocation Distance

In my application i load at startup the distance between user location and a known point; I want to show at startup an activity indicator with a label "Loading" that then disappears to show the distance. How can I do? ...