Tag: iphone

MPMoviePlayerController not working in iOS4

I’m using the first answer from iOS 4 + MPMoviePlayerController to try and get MPMoviePlayerController to play. In the simulator (iPhone device with iOS4), I hear sound but no video. On the device (iPhone 3GS and iOS4), I don’t get anything. Here’s my code: MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:moviePath]]; moviePlayer.movieControlMode = MPMovieControlModeDefault; if […]

How do I get accurate text using Tesseract OCR in iOS?

I am working on iPhone application.Here I need to get text from the images, after googling I found Tesseract can do that.Its working fine but not getting accurate results.I used this and processed the image but still not getting good results. Tesseract* tesseract = [[Tesseract alloc] initWithDataPath:@”tessdata” language:@”eng”]; UIImage *selectedImage=[UIImage imageNamed:@”download.jpg”]; [tesseract setImage:selectedImage]; ImageWrapper *greyScale=Image::createImage(selectedImage, […]

Strange GDB behaviour once application is deployed to a jailbroken iPhone

Im trying to make an application which sends commands to GDB via NSTask and directs the output to the UITextView. It works well on the Mac (iOS Simulator). However, when deployed to the actual device (iPhone), it does not display any registers after the command “info registers” The code is as such : – (void)viewDidLoad […]

how to perform touch up inside before prepareForSegue

I am using a Custom UITableViewCell and this cell contains round rect. This round rect is bounded to action touchup inside and same button is used to perform segue to the other View. prepareForSegue is called first and then it calls the touch up inside method. Is there any way to make this reversed?

How do I repeat an ASIHTTPRequest?

Given the example code below: // ExampleModel.h @interface ExampleModel : NSObject <ASIHTTPRequestDelegate> { } @property (nonatomic, retain) ASIFormDataRequest *request; @property (nonatomic, copy) NSString *iVar; – (void)sendRequest; // ExampleModel.m @implementation ExampleModel @synthesize request; @synthesize iVar; # pragma mark NSObject – (void)dealloc { [request clearDelegatesAndCancel]; [request release]; [iVar release]; [super dealloc]; } – (id)init { if ((self […]

Adding UIPickerView to UIActionSheet (buttons at the bottom)

I want to show a picker view (sliding up) deactivate the background while it’s visible show (UIActionSheet) buttons at the bottom (not at the top) It seems to me an easy solution at first since you can find code for adding a picker view to an action sheet everywhere in the web but all solutions […]

How could I make a horizontal picker?

I want to make a horizontal picker for my app, but I’m kinda new at all this. Could someone provide an easy to follow guide on how I’d make this?

How to save the response From My server , and How can i access That data

Hi i am getting the response from my server successfully.i need to access the user_id send by the server in my app. check my code: NSURLSessionConfiguration *defaultConfigObject = [NSURLSessionConfiguration defaultSessionConfiguration]; NSURLSession *defaultSession = [NSURLSession sessionWithConfiguration: defaultConfigObject delegate: nil delegateQueue: [NSOperationQueue mainQueue]]; NSURL * url = [NSURL URLWithString:@”my url”]; NSMutableURLRequest * urlRequest = [NSMutableURLRequest requestWithURL:url]; NSString […]

NSMutableArray replace object

I try to find object in my array and if success I need to replace object from my array to new object for (id existingSig in allSignature) if ([[existingSig objectForKey:@”SignatureName”] isEqualToString:[item objectForKey:@”name”]]) { [allSignature removeObject:existingSig]; [allSignature addObject:[NSDictionary dictionaryWithObjectsAndKeys:@”1″, @”SignatureIsRich”, [item objectForKey:@”name”], @”SignatureName”, generatedID, @”SignatureUniqueId”, nil]]; } I have error ‘NSCFArray: 0x100551f10> was mutated while being […]

Strange problem with reading and writing a plist file

I have an application that read info from I plist file. To do it I use this code below: NSData *plistData; NSString *error; NSPropertyListFormat format; id plist; localizedPath = [[NSBundle mainBundle] pathForResource:@”settings” ofType:@”plist”]; plistData = [NSData dataWithContentsOfFile:localizedPath]; plist = [NSPropertyListSerialization propertyListFromData:plistData mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&error]; if (!plist) { NSLog(@”Error reading plist from file ‘%s’, error = […]