objective-c

presentModalViewController does not work if called too early.

If I dismiss the the modal VC and present it (or another one) again in less than a certain amount of time, it does not appear. Am I missing something? ...

Detect iPhone device capabilities for Core Location

I have a core location app that I'm writing leveraging the startMonitoringSignificantLocationChanges method to generate updates when appropriate but this does not work on older devices such as iPhone 3g. I would like for the core location functionality to still work while the device is open, so I thought I could use a selector test to...

2d collision between line and a point

Im trying to understanding collision detection in 2d world. I recently got this tutorials http://www.gotoandplay.it/_articles/2003/12/bezierCollision.php. I have question which puzzled me a lot - on the flash demo ball is dropping without responding if i try to swap the starting and end point. Can someone explain me , how the simulation...

How to upload photos to Plixi (Tweetphoto) using Oauth?

Hi all, I am creating an iphone application in which I have to upload photos using different services. I am successful in uploading photos with Twitpic & YFrog but not able to do with Plixi. I am using Oauth ,as Twitter is not allowing Basic authentication. If anyone has tried with Plixi ,please help me out!! I have googled a lot but...

replace characters in a string

i have a sting in which i want to replace all characters(except special characters) by X.. i mean if i have a string str= mac,iphone & ipad are products of apple theis should be converted to str= XXX,XXXXXX & XXXX XXX XXXXXXXX XX XXXXX i know this can be done by finding all special characters and note their position and then replace ...

identify the User.

Hi, I want to make an application that has some views for information display. Now if i install that app in iPhone then it should display the info. Now if i install that app in my iPad then the app should recognize device and display the info related to my account only. Now is there any way to find the single user of two devices wit...

Why is this object being released?

I'm getting an EXC_BAD_ACCESS when releasing newImage on the last line of the following code snippet: UIGraphicsBeginImageContext(newSize); [image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)]; UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); [self setImageToSave:newImage]; [newI...

How to display images of type .jpeg or .gif or .tiff in iphone sdk using objective-c

I am facing a problem while displaying the image in iphone. I used the below code but it work only for .png files. UIImageView* imageView=[[UIImageView alloc] initWithFrame:CGRectMake(6,10, 80, 80)]; imageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:customerListObject.customerImage]]]; [my...

UIPickerView with custom View and labels not scrolling

I'm using the following code to add a label and a view to a UIPickerView. - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view { CustomPickerView *customView = [[CustomPickerView alloc] initWithFrame:CGRectMake(0.0, 0.0, 180, 32)];...

Is there a way to add images of type .jpeg , .gif and tiff... etc in iphone sdk?

Hi guys, I got one problem that how can i display the .jpeg and other type of files in iphone sdk. Is there any solution to this. please help me. Thank you, Madan Mohan. ...

changing label size and position runtime tableview

I am using customCell in UITableView my cell has diffrent UILabel in customCell I want to change the size of the labels according the text to be displayed so that no text truncates and the positions of the labels below the label which size has changed so that no label overlap each other. Thanks.. ...

displaying data dynamically in 2 pickers

can anyone provide me the code for selecting a row in 1st picker and it dynamically changes data in other picker based on the selection. Like if i have array of colors(red,green,blue)in 1st picker so on selecting red i should get red1,red2,red3 in other picker and similarly for other colors also.. thanks ...

how to use .gif files in iphone sdk?

Hi guy's I am getting a problem in displaying the .gif file in my view.Actually I am getting the .gif files from the parser and I need to display the into my view.Can anyone suggest how to use the .gif file in our app.I am struggling a lot for this.Can we convert .gif,.tiff and .jpg files into .png with progrmming? Anyone's help will b...

Using XPath to filter HTML by class value

I'm fetching an a HTML page and try to get some of it's content to show it in a table view. Following the documentation I tried NSXMLDocument and NSXmlParser but could not get any of them to give me the right data back :-( The page I'm trying to scrap is http://www.instapaper.com/u The code I'm using is NSXMLDocument * doc = [[NSXMLDo...

xcode - how to write multiple lines in a label

I have a xib file of type View XIB. In it I have a View controller, and in the View controller I have a label. I have long text that I want to break, but it doesn't - it gets truncated. I tried this solution - I did it in the attribute window - but it doesn't help. ...

selecting different combinations from pickerview and displaying textfields dynamically

its working fine..now if i select like say A and Ab or any other combination some action should be performed.Like for A and Ab i have 3 textfields with 3 labels.For B and Bc i have 6 textfields with 6 labels.This should be dynamic.how would i do that?? ...

API for making video conference calls in Iphone sdk?

Hi guy's, Is there any API to make video conferencing calls in Iphone sdk or any third party tools to make this.Guy's I need some documentation or tutorials to implement the video conferencing calls. Anyone's suggestion will me much appreciated. Thanks in advance, Monish. ...

How to controll second UIView (subview) from a different UIViewController file in one XIB

Hi Guys. I am strugling on the following task. I am trying to control my subview from another viewController class. What I did and does not work is this. I inserted an object and changed it class to my second viewController class. Then I connected its UIButton outlet to a button I have on my subview. I then connected the buttons ...

Auto adjust the UITableViewCell height depend on it's contents in Objective-c

I want to adjust the height of a cell depend on it's contents. I know UITableViewDelegate let you implement the - (CGFloat) tableView: (UITableView *) tableView heightForRowAtIndexPath: (NSIndexPath *) indexPath { return someHeight; } but I do not want to hardcode the height. Is there a way to do this dynamically? ...

How to display the UIImageJPEGRepresentation image in iphone sdk

Hi Guys, I want to use UIImageJPEGRepresentation to add the image in iphone, in below code i am missing some thing I don't know how to add NSData *data=[NSData dataWithContentsOfURL:[NSURL URLWithString:gameObj.gameThumbnails]]; UIImage *myImage=[UIImage imageWithData:data]; imageView.image=UIImageJPEGRepr...