iphone

Quicktime on iPhone

Hey there! May I know if the videos played via quicktime through safari are saved in the iPhone? If they are may I know where to find them? ...

Cocoa-Created PDF Not Rendering Correctly

I've created a PDF on the iPad, but the problem is when you have a line of text greater than 1 line, the content just goes off the page. This is my code: void CreatePDFFile (CGRect pageRect, const char *filename) { CGContextRef pdfContext; CFStringRef path; CFURLRef url; CFMutableDictionaryRef myDictionary = NULL; path = CFStringCr...

Google search from within an iPhone app

Hey, I want to have the user enter a keyword in my app and then search google for this keyword, perform some logic on the results and display a final conclusion to the user. Is this possible? How do I perform the search on google from my app? What is the format of the reply? If anybody has some code samples for this, they would be grea...

Why doesen't the number 2 work in this for-loop?

Hello. I have a function that runs trough each element in an array. It's hard to explain, so I'll just paste in the code here: NSLog(@"%@", arraySub); for (NSNumber *favoriteThing in arrayFav){ int favoriteLoop = [favoriteThing intValue] + favCount; NSLog(@"%d", favoriteLoop); id arrayFavObject = [array objectAtIndex:f...

Building an array of arrays

I am trying to get the following loop working to fill an array of arrays: while (condition) { [itemsArray fillFromDB]; if (! [checkArray containsObject:checkFlag]) { // Add existing itemsArray to myArray if (itemsArray.count) { // add the itemsArray to myArray and create a new instance of itemsArray [myArray addObject:items...

How can the subView detect that the mainView is rotating?

I have a mainView. To this view, I am adding a view of the same size. When the mainView(the background) rotates, its being detected but the subview doesnt have any idea about being rotated. And its functions are not even being called. Even when the program launches too, if I am in landscape mode, its the same way. How can I make the sub...

accessing parsed JSON on the iPhone SDK

Hello All! I've been following the great tutorial about (iPhone, json and Flickr API and I did manage to access the parsed json info just fine. Now I'm trying to do the same thing with the Twitter API, and I am able to get the json info and parse it, but I can't seem to access it like in Flickr. I noticed that the json info that is ret...

memory leak when removing objects in NSMutableArray

Hello everyone I hope to store MYFileObj to NSMutableArray (fileArray) and display data on an UITavleView(tableview). //----------------------------------MYFileObj #import <UIKit/UIKit.h> @interface MYFileObj : NSObject { NSString *fileName; } -(void) setFileName:(NSString *)s ; -(NSString *) fileName ; @end the array I ...

shouldStartLoadWithRequest is not called when using AJAX/XMLHttpRequest

Hi, I am trying to send method invocations from JavaScript to Objective-C and vice versa. Everything works fine for window.location triggered urls, which are catched by shouldStartLoadWithRequest. Now if I try to use an AJAX call instead, shouldStartLoadWithRequest is not called. Is there a way to do this? Mainly I do not want to be rest...

[Iphone]How to get the length of one text string under one specific font with no word wrap.

Hi I am new as a Iphone developer. I am wondering how to get the length of a given string under one specific UIFont, WITHOUT line word wrap. say I have a NSString* lpText = @"a unknon lenght string ..... string" //could be very long and I am using the "Times New Rome" font for rendering... Any idea? Thanks in advance. ...

OpenGL ES Simple Undo Last Drawing

Hi Everyone, I am trying to figure out how to implement a simple "undo" of last drawing action on the iPhone screen. I draw by first preparing the frame buffer: [EAGLContext setCurrentContext:context]; glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer); I then prepare the vertex array and draw this way: glVertexPointer(2, GL...

Table View in iPhone

I have this code [tableView deselectRowAtIndexPath:indexPath animated:YES]; Why doesn't the table view deselect the row, What am i doing wrong. EDIT: -(void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath{ [tableView deselectRowAtIndexPath:indexPath animated:YES]; } ...

How Can open root in iphone?

Hi , I want to knowing how can i open root directory ? I know Messages saved in sms.db that is in "/var/root/Library/SMS/sms.db" , but I can not see sub folder of root, I know ,the root have password and should enter it to open ,... but how can open this without Unlock or entering password? ...

xcodebuild - how to define preprocessor macro?

How can I define a preprocessor macro when using xcodebuild? I need to build my app using a bunch of different configurations, and I would like to do this using a shell script which runs xcodebuild a number of times with different preprocessor macros. ...

iPhone: error: request for member 'table' in something not a structure or union

Hi there, When it comes to compiling my application, I get the error mentioned in the title. How would I go about remedying this error? Basically, I want to get from one table to the other. Hierarchy, navigation. NextViewController.m #import "RootViewController.h" #import "NextViewController.h" @implementation NextViewController - ...

Passing NSArray Pointer Rather Than A Pointer To a Specific Type

I've just written a piece of code to display a UIActionSheet within my app. Whilst looking at the code to initialise my UIActionSheet something struck me as a little strange. The initialisation function has the following signature... initWithTitle:(NSString *)title delegate:(id UIActionSheetDelegate)delegate cancelButtonTitle:(NSStrin...

How do I build and install applications on a jailbroken iPhone without being in the iPhone Developer Program?

Hi everyone, I would like to build and install my app on my jailbroken device without paying the $99 required for the iPhone Developer Program. I have Rock and Cydia... what is the easiest way to do it (if it's possible)? Thanks. ...

iPhone: Modal View Controller Leaking Memory

Hi! I'm presenting a modalViewController. After I dismiss the modal view controller with: - (void)dismissModalViewControllerAnimated:(BOOL)animated .. the view is still in memory. How do I dismiss it such that it will use memory? Thanks. ...

iPhone zoom to userLocation

Hi, I need help making my iPhone app zoom to the users current location. I have seen this answered before on StackOverflow ( http://stackoverflow.com/questions/2423236/zoom-on-userlocation )but I have no idea what I am doing when it comes to iPhone development (I make websites not iPhone apps). I need it explained extremely simply, dow...

How can I get user's email? iPhone SDK

Hi! I need to get an user's email address that used in Mail.app. How can I do it with the iPhone SDK? Thank you! ...