iphone

How to swap negative rotation values over to positive rotation values?

Example: I have a circle which is split up into two halfs. One half goes from 0 to -179,99999999999 while the other goes from 0 to 179,99999999999. Typical example: transform.rotation.z of an CALayer. Instead of reaching from 0 to 360 it is slip up like that. So when I want to develop a gauge for example (in theory), I want to read val...

Multiple cells per row in UITableView

Is there any way to have multiple cells per row in a uitableview using the uitableviewstylegrouped style? It exists in several of the official applications such as contacts but it could easily be a private API. If it is private has anybody found a good workaround? ...

Background music for iPhone web application ?

Is it possible to play background music on my iPhone web application? When somebody took my web application on their iPhone safari browser, I wanted to play some background music on their iPhone. ...

Can't build a new project with xcode on my MacPro

Hi every1! I've installed on my MacPro (intel) Xcode 3.2.1 (iPhone SDK 3.1.2) and Snow Leopard I made a new project (called Untitled) for iPhone OS, when I try to build, it returns an error: *file not found: */Users/user/Documents/Untitled/build/Untitled.build/Debug-iphonesimulator/Untitled.build/Objects-normal/i386/main.o */Users/us...

IPHONE: memory still allocated after releasing object???

Hi, I have a method for drawing an object offscreen to a file, using quartz. The last lines of this method are: CGRect LayerRect = CGRectMake(mX,mY, wLayer, hLayer); CGContextDrawImage(objectContext, LayerRect, objectProxy.image.CGImage); // 1 CGRect superRect = CGRectMake(vX, vY, w,h); CGContextDrawLayerInRect(context, superRect, ob...

How to properly multi-thread with Core Data?

Hi there, I'm having a lot of issues with trying to perform some core data operations in a threaded NSOperation. Currently, I have created a managed object context in my app delegate that is purely used on my threaded NSOperations. I setup a NSOperationQueue with a max concurrency of 1 so each action is performed serially. For each ope...

Play youtube videos with MPMoviePlayerController

Hello I'm trying to stream some youTube videos using the MPMoviePlayerController but I'm having some problems. The code i'm using is pretty simple and I can play .m4v videos by passing a URL to initWithContentURL. When I launch the movie player the player comes up but just goes away after about 20 seconds. When I try it in the simulat...

Game platform/engine for inexperienced/solo developer?

There are a number of discussions on stackoverflow.com about what is the best iPhone game platform/engine. My question is not necessarily what is the best, but what is the best for an experienced iPhone developer but not not experienced in game design. This will also be a solo project plus a graphics designer. Consider I will be worki...

problem loading url in view

i'm confused about an error while i'm trying an url in a view. while compiling i get the following 2 errors (in h-file an in m-file): Expected identifier before '*' token maybe anybody can help me out of my trouble? thanks in advance! my code: File "RssWebViewController.h": #import "RssWebViewController.h" - (void)NavigateToUrl:(...

iphone firmware downgrade

I'm trying to downgrade my firmware to 3.0 so that I can test compatibility of my app. I tried doing an Option+Restore in itunes and selected iPhone1,2_3.0_7A341_Restore.ipsw I found on the web, but it errors out about half way through. When I tried downgrading from xcode organizer I got an "Error: Updating baseband: The baseband canno...

How do I release this CGPath when I need to return it

I have a method that returns a CGMutablePathRef, something like this: - (CGMutablePathRef)somePath; { CGMutablePathRef theLine = CGPathCreateMutable(); CGPathMoveToPoint(theLine, NULL, 50, 50); CGPathAddLineToPoint(theLine, NULL, 160, 480); CGPathAddLineToPoint(theLine, NULL, 270, 50); return theLine; } The Xcode/Cla...

How can I use a bit type in my iPhone app?

I'm writing an iPhone app that's a mixture of Objective-C and C. I have 32-bit integer flags throughout my code that take on only two distinct values: 0 and 1. I'd like to use a data type that's smaller than 32 bits. Is there a type that's only one bit? What is the size of "BOOL" in Objective-C? One solution I've considered is usi...

embed mail compose in an iPhone app

I want my app to send mail. I can use the mailto: URL scheme, but it terminates my app when launching iPhone mail. The newsreader from The Independent (British paper) seems to bring up a mail compose view within the app. When you send or cancel, the app reappears immediately. Does anyone know how to do this? thanks, ...

How to get a copy of the image from UIImagePicker

Hi, I've got a very simple app where the user selects a UIImageView and presses a button to take a photo with the camera. The image is then returned and displayed in the UIImageView. However, since the UIImageViews are sharing the same delegate, when there's already an image in one of the UIImageViews, and I go to take a photo to be pl...

Crash At Splash Screen, iPhone

Hi there, I have an app which when opened, displays a splash/loading screen. I had this set at 2.5 seconds before the app moved on. - (void)applicationDidFinishLaunching:(UIApplication *)application { sleep(2.5); [window addSubview:viewController.view]; [window makeKeyAndVisible]; } I now want the app to pause at the splash scre...

Change Download File Name in Cocoahttpserver

I'm using cocoahttpserver in an iphone app, but when I try to download it (by clicking a link in the standard demo app), my sqlite file (myDatabase.sqlite) arrives on my Mac Desktop as "Unknown" with no suffix at all. However, when I "Save As..." it provides the name fine. I would prefer it to save the file with the sqlite suffix. So, i...

I cannot get in app purchase test to work

I have had zero success with in app purchase. I have submitted the free app binary, and then rejected the binary. I have added the test product. I have approved the test product TAP001. I have followed the code examples to no avail. I do a SKProducts request using both "com.companyname.appid.TAP001" and just "TAP001" Regardless, I get ...

How to detect double touch in UIButton inside of a UIScrollView

Hi, In my exercise app, i have a 10 x 10 grid of large UIButtons. and then I added that UIButtons in a UIView, then I added that UIView in a UIScrollView so that I can scroll or pinch or expand. Now my problem is when every time I pinch or expand gesture in the UIScrollView sometimes I tap two UIButtons and execute at the same time. How...

Game engines for iPhone vs. native iPhone sdk development

What are people's opinions and/or experiences with game engines such as Unity or Torque Engine? If one were new to iPhone game dev is it worth it to learn one of the engines? What is the performance difference between apps generated by those engines vs a natively built App using the sdk? ...

UITableViewCell custom delete buttons

I want to put my own custom delete buttons on the uitableview cell when it goes into edit mode, similiar to the "+" add button for inserting, just a red "x" in the same position as the "+" button is. how would i do this? ...