iphone

How can we get two animations run simultaneously ?

hi, I am writing a game in iPad using cocos2d. I need to mix two actions, One action is, to get the rotation of the object. I have 10 images of the rotation of an object. When we animate them we get the rotation of the object. Second action is to move the object from one edge to other edge. I am able to get one action after the other. ...

Get UIButton from view programmatically

Hi Im creating and adding a grid of buttons to my custom view keyboardView as follows: int offset = 0; for (int row = 0; row<4; row++){ for (int col = 0; col<13;col++) { offset +=1; UIButton *aButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; aButton.frame = CGRectMake(5+col*65+offset,5+row*65, 60,...

App crashes after logging in using facebook connect

I have setup my application key and secret as well as added the facebook connect button to my view. When I select the button and login within the app, it crashes with the following error * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CategoryQuoteViewController session:didLogin:]: unrecognized se...

how to configure UIImage view for iPad

Hello I was made the project for iPhone which contain UIImage. Now I have to implement same project for iPad . So what is size of image which can i used. also tell me if there is any another code for for page size as it was in iPhone like CGRect like that. also provide some code to adjust image from landscape to portrait. Thanks ...

Problems adding more than one UIMenuItem to UIMenuController

Hello, I'm using the new customization abilities of the UIMenuController to add things other than "Copy" to the menu for cut&paste into a webview. What I do is getting the reference to the shared UIMenuController, setting my NSArray of UIMenuItems into the menuItems, and everything work fine as long as I add a single item. For instance...

Most efficient way of implementing an alarm on iPhone

I have implemented a simple clock like so: - (void)runTimer { timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(showActivity) userInfo:nil ...

iPhone SDK: iAds and autorotation

Hello, I am trying to get my iAds to autorotate, so far without success. My code appears below. Is there anything missing that I would need for autorotation? The portrait orientation displays fine, but the landscape ad disappears from the screen. Thanks! My .h: #import <UIKit/UIKit.h> #import <iAd/iAd.h> @interface AutorotateView...

iPhone: App Crashes When Search Bar Used in TableView

I'm new to this and in my application I use UISearchBar. When I enter any word to search in it the application crashes. In my project I am using sqlite and values are fetched from the db in AppDelegate and saved in an NSMutableArray named docArray. RootViewController.m - (void)viewDidLoad{ listOfItems = [[NSMutableArray alloc] ini...

UITableView add control issue in iphone

I am adding an activity indicator in each row of table. The issue is every time I scroll it get added again in cell overwriting the previous one. Please let me know which is best way to add control in tableview cell. UIActivityIndicatorView *a; // Customize the appearance of table view cells. -(UITableViewCell *)tableView:(UITableVie...

how i convert and use Xml file in our application

Hello all, I'm new in iPhone Application Programming. I can't get value from XML file and display it in UITableView. I need to get the name value of animal. How is the simple way to parse XML without attribute? I've been read NSXMLParser Documentation but the data is not displayed in my UITableView. Here is my XML file : <Employees> ...

Want to use https request in phonegap application on iphone

Hi Guys I am trying to call https request in phonegap iphone app using jquery's method getJSON(),though it work fine in normal safari,but in mobile safari,it gives error like Download Failed-Safari cannot download this file Please suggest me... Thanks ...

How to write a MsWord (.doc) file in Objective C?

Hi all, I need to write pure Msword file in objective C. I have been writing .txt file till now but when i write a .doc file i'm facing encoding issues with all encoding schemes. Microsoft provide library in visual studio to play with .doc files which is not available in Xcode. So is there any way to make it happen? ...

What is the API for iPhone/iPad file transfer?

I can't seem to find anywhere the name of the API to use in my iPad(iOS 3.2) app in order to be able to sync files from/to computer using iTunes, the way Stanza, GoodReader and zillion other iPad apps do. Any ideas? Hints? Tutorials? ...

iphone NSCondition - App is crashing when "wait" is called

I am working on iphone app. I created a custom class that derives from "NSCondition". The following piece of code is working fine with iPhone SDK 3.1.3 - (bool)waitForFinish { @try { [self lock]; while (!done) { [self wait]; } } @finally { [self unlock]; } return success; } The app is crashing on iPhone SDK 4.0...

Adding an activityIndicator on modalViewController iphone

Hi all, I'm trying to add an activityIndicator on a modalViewController. Basically I want to start animating this activityIndicator after user presses a button on this modalViewController. But what's happening is whatever I'm doing before firing presentModalViewController on this modalViewController is staying constant i.e. If I simpl...

What is the Objective-c equivalent to java timestamp?

I've not found a answer to this question anywhere, but this seems like a typical problem: I have in Objective-C a "NSDate timestamp" that looks like "2010-07-14 16:30:41 +0200". The java timestamp is just a long integer (for example:"976712400000"). So, my question is: What is a Objective-c equivalent to java timestamp? Thanks in adva...

Best way for search word in 150k words dictionnary in a iphone app ?

Hi, I m developping a simple dictionnary word app in french with 150k words and definitions. i m looking for the best way to do this. First i use a sqlite bdd with 150k words. i use the LIKE command for word search but it is very slow ex : SELECT * FROM words WHERE word LIKE '%avoi%' LIMIT 0,50; for searching word who contain 'avoi' li...

iPhone Xcode RELEASE configuration build error - yet DEBUG works OK

Hi, I am a fairly new iPhone developer. I have four apps in final testing stages and working to get them signed and ready for the app store. I duplicated the RELEASE configuration, and when I try to build using it I get this error: Precompile myappname_Prefix.pch<br> Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4...

CABasicAnimation shrink effect the animation look very jerky

Any suggestion how can i improve it the size of image intially is 2000*1500 CABasicAnimation* shrink = [CABasicAnimation animationWithKeyPath:@"transform.scale"]; shrink.toValue = [NSNumber numberWithDouble:0]; shrink.duration = 15.0f; shrink.fillMode=kCAFillModeForwards; shrink.removedOnCompletion=NO; shrink.delegate = self; [imagevie...

how to implement two fingers panning like safari broswer?

hi all i try to implement panning and zooming functionality like safari browser in ipad. i used UIPinchGestureRecognizer for zooming with two fingers touch. but i dont know how to implement two fingers panning. when i touch with two fingers its tap count is 1. please help. thanks in advance. ...