iphone

What is the best way to start Cocos2d Animation of Multiple Sprites?

I have an array randomAlphabets which contains CCSprite objects. I need to start animation on these objects. The randomAlphabets array (NSMutable) can contain max of 4 elements. I am running a loop and then starting the animation. Is this the correct way? -(void) startAnimation:(CCSprite *) sprite { [self generateRandomCoordinates...

objective c http query

Hey, Iam new to objective c and really dont know much about it. I have been given a query that is gonna I need to send data in to the server.Query is like this http://abc.com/insertipademail.php?name=name&email=email I need to enter the name and email I have constructed the string But I dont know how to send it to the server. Can som...

Minimum eCPM on iAds

My app has been on the app store starting September 1. Every day, I monitor the eCPM which has been around $10-$15. Today, however, the eCPM shows to be $1.5. I am surprised that this was even possible with iAd. Considering that apple gets $10 per 1000 impressions, I assume the minimum number a developer makes is $6 per 1000 impression...

COREDATA NSPREDICATE BOOL

Hello all, I am currently having an issue pulling all data from db whereby i.e 1 parameter is TRUE. I am using NSPREDICATE and below is a sample code NSManagedObjectContext *context = managedObjectContext_; if (!context) { // Handle the error. NSLog(@"ERROR CONTEXT IS NIL"); } NSEntityDescription *entity = [NSEntityDescriptio...

NSMutableURLRequest proper posting

Hello Stackoverflow, So I am trying to log into my site using an NSMutableURLRequest which presents the credentials via a post. As a noobie, I have some questions about the functionality of this method to make sure I am understanding it. NSString *post = [NSString stringWithFormat:@"username=%@&password=%@&TARGET=%@",LoginId,LoginPw...

Simple bug crashes hangs Xcode.

I have build the simplest possible iPhone program, a window based program. I only changed the testappdelegate.h file to be the following: #import <UIKit/UIKit.h> @interface TestAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; int pos[10]10]; //note the error here. } @property (nonatomic, retain) IBOutlet UIWi...

Application crash problem when using plist in iPhone

Hi friends, I have used NSMutable Dictionary and NSMutable Array. The datas are to be stored and retrieved from plist(Documents Directory) using NSArray of NSMutable Dictionary. Edit: I have six buttons in the scroll view, on clicks the button, the data is to be displayed in the table view using XML parsing. i have put the data into ...

iphone: threads + release pool + [ object release] = "message sent to deallocated instance"

Hi guys, i'm having a bad time with some little code running on the iphone basically, i just press a button, it calls runTest, it runs test method on a background thread. That's why I created an autorelease pool. if i run the below code i got a beautiful message on the console saying: 2010-09-07 11:45:15.527 test[1312:207] *** -[CFS...

New Test App Build on iTunes 10 Won't Install

I have been developing test builds of an app for some time and have deployed through iTunes successfully until now, with iTunes 10. At the same time I am getting a strange warning in Xcode during the build. It is: warning: building with 'Targeted Device Family' set to iPhone only ('1') not supported with SDK 'Device - iPhone OS 3.2'...

How to implement a Badge for a UIBarButtonItem ?

I want to pu a badge on the UIBarButtonItem that controls popover in a SplitView This code did do nothing: - (void)splitViewController: (UISplitViewController*)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem*)barButtonItem forPopoverController: (UIPopoverControll...

Why does NSOperationQueue on iPhone OS 3.1 hold on to long-cancelled (and released) operations?

I have an app that uses NSOperations to manage service calls to a web API (the calls are based on CURLOperation in Jon Wight's touchcode). There is a certain call that downloads map locations when the center of a map view changes significantly; since these can stack up so quickly, if you move the map around, I try to aggressively cancel...

making iphone picker/combo box links

I'm building a navigation drop down/combobox menu for a mobile website. it works fine on no iphones. essentially you click an item from the drop down and then it links you to the appropriate page. when I do this with the iphone it brings up the picker wheel, I click my selection, and then nothing happens. I'm fairly new to building s...

iPhone calls and sms: user notifications with hidden status bar

Hi, my iPhone app uses OpenGL ES in full screen mode (the status bar is hidden), just as the OpenGL ES application template. Using the simulator "Toggle In-Call Status Bar" has no effect, i.e. there is no visual/acoustic notification for the user. I'd like to know whether this is an issue of the simulator or it happens also on the device...

iPhone memory leak issue in ZipArchive lib

I'm gratefully using the ZipArchive library but it seems there is a memory leak. I don't know how to fix this - it's written in C and I'm unfamiliar with it. My question is - is it possible to autorelease the line s=(unz_s*)ALLOC(sizeof(unz_s)); like you would in Objective-C in this scenario? extern unzFile ZEXPORT unzOpen2 (path, pzlib...

app using MPMoviePlayerViewController freezes when Home Button is pressed

Cannot duplicate in simulator - only on iPhone device I have an app that is using MPMoviePlayerViewController to show a movie. Works just fine. But if you interrupt the movie by pressing the home button and subsequently try to restart it from the menu icon - all you get is a blank screen. This only happens when the app has the plist...

Substituting flash in a iphone app

I have some .swf files I want to use in an iphone app for menu changes etc. I have tried to loop through the images(200) to get the same effect, but it doesnt seem to be to my benefit. What are the best ways to achieve this? Edit I currently use the following code [A1 setImage:[UIImage imageNamed:@"m1.10001.png"] forState:UICont...

How can I add to the contents of UITableView via a button?

I have a UITableView subclass which initially holds nothing, however by pressing a button I want to be able to add a string to the data and have it show up in the view. How can I do this? I have been trying to simply modify listdata, but this only seems to work once as after that the Table view does not reload, even though I can see more...

how to distinguish day/night with [NSDate date]?

Hi, after i get current device time by using [NSDate date], how do i know it's daytime or night now? thanks in advance! ...

UIButton scale on touch?

hil, can someone tell me how i can scale an UIButton on touch? the button should scale up like 10%. thanks in advance! ...

Problem updating UITableViewCells when rotating UITableView

I have a UILabel in a custom UITableViewCell that gets resized when the device is rotated. The text in this label needs to be recalculated after the rotation because I am cutting it down to size and appending some text at the end. E.g. the datamodel has: "This is a run-on sentence that needs to stop." In portrait mode it becomes "This...