iphone

How do I adjust a Quartz 2D context to account for a Retina display?

I have a Quartz 2D game which draws directly onto a context. For this reason I am having to adapt the code so that it scales if appropriate for a Retina display. I am doing this using the following code: - (CGFloat) displayScale { if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) { return [[UIScreen mainScreen]scale]...

iPhone SMS chat bubbles approved in App Sotre?

I want to integrate the iPhone sms like chat bubbles in my application. But when I read more about it I found that this will not be approved by the app store. Is this true? Cant we use chat bubbles in the application? Here are some links which describes this. http://www.iphonestalk.com/iphone-app-store-submission-rejectedbecause-of-cha...

Adding NSDecimalNumbers not quite working

I have this code: NSLog(@"Count of items we will loop through is: %d",[self.defaultBudgetItemsArray count]); id object; while (object = [e nextObject]) { if ([object objectForKey:@"actualCost"]) { currentTotal = [currentTotal decimalNumberByAdding: [object objectForKey:@"actualCost"]]; NSLog(@"decimalNumberByAdding g...

Web server that handles HTTP post json request

I'm creating an iPhone app and I want the app to be able to send some information in the form of JSON string over a web server/app (I really don't know) and display it in a web page or save it to a file. I know how to send the request from the iPhone, the problem is I don't have a clue on how to implement the server side and integrate it...

iPhone - Core Data Questions ???

Above is my data model diagram. Everytime i create a Car whcih contains a model and make, it adds a car object to core data. The problem is that it also adds 1 make and 1 model to the core data, so i get duplicates. for example, in the following code, it saves 1 car object 2 models, and 2 makes, so I get a duplicate Make in my table (...

Difference between [UIView beginAnimations:context:] and [UIView animateWithDuration:animations:]

It appears to me these two class methods are not interchangeable. I have a subview of UIView with the following code in the touchesBegan method: if (!highlightView) { UIImageView *tempImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Highlight"]]; self.highlightView = tempImageView; [tempImageView release]...

NSDecimalNumber and popping digits off of the end.

I'm not quite sure what to call it, but I have a text field to hold a currency value, so I'm storing that as a NSDecimalNumber. I don't want to use the numbers & symbols keyboard so I'm using a number pad, and inferring the location of a decimal place like ATMs do. It works fine for entering numbers. Type 1234 and it displays $12.34 but ...

Forcing a view to unload when another tabButton is hit. (iPhone)

My iPhone app has a tabBar at the bottom. The 5th tab is rarely used... but pretty memory-intensive... so I want to make it UNLOAD each time it is exited (by the user clicking on a different tab). But how? I thought I just needed to call "[self viewDidUnload]" but that doesn't seem to do it. Where is the "forceThisViewToUnloa...

"used struct type value where scalar is required" at .layer.position

I want to make a selection before apply one of two animations, what I thought is: make a Piont "one", if my "myImageView" is at the Point "one", then apply animationNo1, else apply animationNo2, but I got this:"used struct type value where scalar is required", at line "if (myImageView.layer.position = one) " What I do? how can I fix thi...

Load PDF on iPhone

Hi all, I am using the 'Leaves' framework to add a page turn effect to my app. It displays PDF's using quartz and this works fine if you are loading a PDF from the main bundle. Here is the working code: CFURLRef pdfURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("SampleIssue.pdf"), NULL, NULL); pdf = CGPDFDocumentCreateWi...

Use two different cell identifier on same table view

I'm trying to get rid of a cached UITableView cell. I have two sections. The first cell of the second section has the same "appearance" as the first cell of the first section. With appearance I mean the cell height (multiline cells). I tried to use different identifiers, but that didn't worked. Here is the code: NSString *identifier; i...

Iphone and Youtube api

Hi, I want to retrive uploaded videos from a certain youtube channel and I want to display the list in a UItableview. Then when user clicks on a row the video will play. Is this possible to do with youtube api? Im new to Iphone app development and I need to get this done asap. Can some one provide some code samples or point me in the rig...

iPhone UIImagePickerController Pushes Content Down

Hi, I'm working on a pretty simple iPhone app at the moment. I have a UIWebView with a UIToolBar at the bottom of it with a button on it. I've built it all through code, although I did create an empty NIB as I am hoping to get Facebook Connect working with it eventually and have had problems when I don't set it up with this empty NIB in...

Find web resource files in bundle

I have several html files which will be located in the documents directory at locations only known at runtime (may be within a varying tree hierarchy). The resource files (javascript and css) however will be located within the application bundle. What path do I need to use in the html files in order for them to find the resource files? ...

iPhone Core Animation not Running Smoothly ?

Hi all, I have the following core animation code in my app : -(void)startCoreAnimation [UIView beginAnimations:@"IconFade" context:Icon]; [UIView setAnimationCurve:UIViewAnimationCurveLinear]; [UIView setAnimationDuration:1]; [UIView setAnimationRepeatAutoreverses:YES]; [UIView setAnimationDelegate:self]; [UIView ...

Memory Leaks in Irregularly Shaped UIButtons

I know this is a long-shot, but since I need this code to work, maybe someone here can help. I'm using the Irregularly Shaped Buttons code from CodeProject.com in one of my iPhone apps. Works great, but Instruments is reporting two memory leaks. I'm using the code in a standard UIViewController, but that is inside a UINavigationContro...

willSelectRowAtIndexPath/didSelectRowAtIndexPath confusion

This should be easy: When calling a didSelectRowAtIndexPath, I run a complex method, that downloads the contents of a URL, parses it, and put the result in the various properties. In the Simulator, and on a device in a WiFi situation, everything is just fine. However, on a device on a slower network, it just takes some time to process th...

Slow app launch

Hi! My iphone app is launching very slowly, and I have no idea why. My application:didFinishLaunchingWithOptions: isn't really heavy, I'm just setting the managedObjectContext for each of my five view controllers of my tab bar controller. Does anybody have an idea what causes the slow launch? Thanks. - (BOOL)application:(UIApplication ...

Relationship between Bundle Identifier in Info.plist and App ID and iTunes Connect

Hey, I'm having a lot of trouble trying to get my app on iTunes connect with the app loader. I think the problem is the connections between the ID's, and how they all need to match up. Could someone please explain this too me? My situation - Bundle Identifier in Info.plist com.<domain>.<appname> Distribution Provisioning Profiles App...

Delay between play button and movie showing

Hi there, I have a simple view that creates a MPMoviePlayerViewController when the user presses a button, using the presentMoviePlayerViewControllerAnimated: method. The new view controller slides in and shows the movie player, so far so good. However, when the button is pushed, the current view controller slides out the bottom, showin...