objective-c

Accept string values in NSArray from the user

hi i want to accept string values into the object of NSArray at run time from the user heres what i tried -(void)fun { NSArray *arr = [[NSArray alloc]init]; for(int i =0;i<3;i++) { scanf("%s",&arr[i]); } printf("Print values\n"); for(int j =0; j<3;j++) { printf("\n%s",arr[j]); } } i am ...

movie not playing in full mode(portrait)?

Hi All, I want to play a video in iphone in potrait mode .I have written the following code -(void)buttonEvent { NSBundle *bundle = [NSBundle mainBundle]; NSString *moviePath = [bundle pathForResource:@"Movie" ofType:@"m4v"]; NSURL *URL = [NSURL fileURLWithPath:moviePath]; self.moviePlayer = [[MPMoviePlayerController alloc] init...

how can i print values stored in NSMutable Array.. to UITableView cell

m having this coe....could any one tell me how can i print it on UITable view cell [customerDetailsArray addObject:[NSDictionary dictionaryWithObjectsAndKeys:nameStr,@"name",cityStr,@"city",countryStr,@"country",nil]]; NSLog(@"customerDetailsArray %@",customerDetailsArray); I am trying by this way but nt successful if(indexPath....

Tapping a UIScrollView to hide the keyboard?

I'm working on an iPhone app which involves typing stuff into a UITextView, which adds content to a UITableView. The problem is, I need to be able to close the keyboard when the user's done with it, and the only area that is really visible other than the keyboard and UITextView at this point is the UITableView. I'm having trouble impleme...

How to prepare iPhone app to be able for upgrading to the latest version available on AppStore

How to prepare app to be able for upgrading to the latest version available on AppStore ...

Difference between Category and Extension?

Hi, What is the difference between Category and Extension. I believe both are used to add custom methods in existing classes. Can someone throw light on this? Examplification with code will be really appreciated. ...

Interface builder is unable to open documents of type iPad XIB

Hi, I got a application from my teammate, and it is for both iphone and ipad devices (which it is developed under iPhone SDK 3.2). I have iPhone SDK 3.1.3 installed in my mac book. When i tried to compile the application for iphone simulator i got the following error. Interface builder is unable to open documents of type iPad XIB. Th...

encode and decode int variable in Objective-C

How do I decode and encode int variables in Objective-C? This is what I have done so far, but application is terminating at that point. Whats the mistake here? -(void)encodeWithCoder:(NSCoder*)coder { [coder encodeInt:count forKey:@"Count"]; } -(id)initWithCoder:(NSCoder*)decoder { [[decoder decodeIntForKey:@"Count"]copy]; r...

decoding and encoding array in Objective-C

Hello, Can i decode and encode an array in ths way?? NSMutableArray *arr; -(void)encodeWithCoder:(NSCoder*)coder { [coder encodeInt:arr forKey:@"Array"]; } -(id)initWithCoder:(NSCoder*)decoder { NSMutableArray array; array = [[decoder decodeIntForKey:@"Array"]copy]; return self; } ...

Can I add an iPad popover programatically?

Is it possible to add a popover programatically without using a NIB file? All the examples I have run into use NIB files. Any information/help/examples would be appreciated. Thanks! ...

Resizing CATiledLayer's Using Scale Transforms vs. Bounds Manipulation

I've got my layer hosted workspace working so that using CATiledLayers for hundreds of images works nicely when the workspace is zoomed out substantially. All the images use lower resolution representations, and my application is much more responsive when panning and zooming large numbers of images. However, within my application I also...

What is my CoreData fetch request actually returning?

I'm fetching some objects out of a data store but the results aren't what I'm expecting. I'm new to CoreData but I'm fairly certain this should work. What am I missing? Note that User is a valid managed object and that I include its header file in this code, and that UserID is a valid property of that class. NSFetchRequest *request...

Preventing CALayer Sublayers From Getting Scaled

I have some CALayers in a layer hosted view. Each of these layers has additional layers to hold (1) a close button, and (2) a resize handle. These additional 'control' layers are added as sublayers to the parent layer. Currently, when I zoom the workspace in which these layers reside, everything scales -- including these control layers....

how to convent a NSString * to a file?

I have a NSString *csvData which contains the csv data and the format is correct. In my program (the iPhone), there is a button. When the user click the button, the string will convent to the .csv file. However, I don't know how to convent the NSString to a CSV file. Does the objective C provides any build-in function or class can help...

Twitter logout using oauth in iphone

hi, I'm using http://github.com/bengottlieb/Twitter-OAuth-iPhone/tree/master for Twitter+Oauth in my iPhone app.I am creating a music application where user can login and log out of twitter. This paticular Twitter+Oauth implementation doesn't use sessions, so I'm not sure how this works. Does anyone have experience with this and if so ...

Monobjc and Mac UI for Windows Application

Hi there, I've got an application which was written in C# and is running on Windows and Linux using Mono. Now we need a native user interface for the Mac. Is there a way of doing this using Monobjc? Did anyone ever work with it? Is there any other approach? Thanks for your help –f ...

How to create iphone app to react as web server?

Hi! I'm working on an app, in which server (windows based) will connect to the ipad application. Then data will be transfer from the server to the ipad app. I saw different apps like PDF Expert, Wifi HD, allows server apps to connect to the iphone app through IP address. I decided to use this approach. But I don't know how to implement t...

How to post tweet in twitter with the use of oauth in iphone

Hi to all, I have created a music application in iphone . i want to integrate twitter in my application with the use of Oauth such that when a user log in twitter his username and password details are validated and then the post tweet page is opened where the user can post his tweets .So, can anybody help me to how to post tweets in t...

How to find the number of characters that a UILabel can Hold ?

I am trying to find the number of characters that a UILabel can hold.I am using lbl_Text = [[UILabel alloc]initWithFrame:CGRectMake(0,15,290,320)]; lbl_Text.lineBreakMode = UILineBreakModeWordWrap; lbl_Text.numberOfLines = 20; lbl_Text.font = [UIFont fontWithName:@"Helvetica-Bold" size:14]; to set the font and font si...

using different layers in objective c

Hey all, Is it possible to create the layered structure (for eg. like the ones you see in photoshop) in an iPhone app. Something like an image is being displayed and on top of it (a different layer) are controls like rotate...etc... If yes, could anyone tell me how its done? Any suggestion appreciated. Thanks! ...