What is the correct code to intercept location.href URL in a UIWebView?
- (NSString*)actionURL
{
NSString *script = @"document.getElementById('action_url').name";
return [webView stringByEvaluatingJavaScriptFromString:script];
}
This code doesn't work :(
...
UIImage *image = [UIImage imageNamed:@"logo_header.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
imageView.frame = CGRectMake(0, 10, 320, 28);
[self.navigationController.view addSubview:imageView];
I have added an image to my mainview using above code, how can I remove it from view so that it will not visib...
I've registered/paid for the iPhone developer program, which allows me to test apps on a device. I have an old 3G that I would like to use. However, I'm interested in using the significant change notifications as well as it working in the background.
If I were to jailbreak to enable background processing and things like that, what issue...
This looks like the best way to so a preview of documents but I can't find any information on how to use it. Am I missing something or is there a better way to do this?
http://developer.euro.apple.com/iphone/library/documentation/NetworkingInternet/Reference/QLPreviewController_Class/Reference/Reference.html
...
Hi,
I declared
NSString *dayinfield[43];
and fill it in
-(void)DrawDemo {
dayinfield[2] = @"hallo";
dayinfield[3] = @"test";
// also i can read it
NSLog (@"show: %@",dayinfield[2]);
//works fine
}
but when i like to read its content in another function (same class)
-(void)ReadData
{
NSLog (@"show: %@",dayinfield[2]);
// I get ...
I've set up a UITapGestureRecognizer on viewDidLoad of my view controller but somehow it fires the selector method twice for a single tap.
UITapGestureRecognizer *g = [[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(openInMapsApp:)] autorelease];
[self.mapView addGestureRecognizer:g];
My method:
-(void)openInMaps...
I want an empty date picker for my app's launch image. Preferrably no text at all in any of the picker views.
Short of defining a custom UIPickerView to look that way, is there any way to do this?
...
how can I convert the valuesof textbox to numeric?
here's what I'm doing:
int el = electric.text;
int wb = waterbill.text;
int inet = internet.text;
...
Hi,
I'm searching for a library similar to ARToolKit. It needs to support processing a single image and search that image for a marker. If it finds one I want it to return the camera angle / viewpoint based of the marker.
I couldn't find anything via Google, does something like this exist?
...
I have music playing within my application using a MPMusicPlayerController, using iPodMusicPlayer (also tried applicationMusicPlayer). When I play a sound using AVAudioPlayer my music from my MPMusicPlayerController will stop. Is there a way to have the MPMusicPlayerController and the AVAudioPlayer play sounds simultaneously?
...
I have 2 view controllers presented modally.
A presents B which presents C.
When I dismiss C I would like to dismiss B as well. But I am not sure how to do this:
Dismiss C:
[self dismissModalViewControllerAnimated:YES]
//[delegate dismissB] //this doesn't work either when i create a delegate pattern
Now I am left with B. How can I...
I have a render method as such:
[EAGLContext setCurrentContext:context];
glBindFramebufferOES(GL_FRAMEBUFFER_OES, defaultFramebuffer);
glViewport(0, 0, backingWidth, backingHeight);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrthof(0, backingWidth, backingHeight, 0, -1.0f, 1.0f);
glTranslatef(0.5f, 0.5f, 0.0f);
glMatrixMode(GL_...
I'm writing an iPhone app. Starting from a view controller in a navigation stack [called EditCreatorController], I am presenting a custom modal view controller [called BMSStringPickerController]. I have created a delegate protocol, etc. per the Apple guidelines for passing data back to the first view and using that view to dismiss the mo...
Hi,
I am sketching out the workflow of an app where you have a main menu 'Level 0' that calls a modal view 'Level 1', which calls another modal view 'Level 2'.
I am able to get this working, no problem AND I am able to dismiss the entire stack by using:
[[[self parentViewController] parentViewController] dismissModalViewControllerAnim...
I am developing an iPhone app that needs push notification. I followed the instructions for creating the certifications and modifying the app ID. I am not totally sure I did this correctly, but I did follow the directions. Any idea how I can check to see if this is OK?
When I ran in the emulator I did get an error message saying that th...
I have an OpenGL view that I would like to manually modify and redraw in response to a device orientation change. How can I accomplish this? If I return YES from shouldAutorotateToInterfaceOrientation:, the system does its stock rotation animation, which I don't want. I just want to get a notification and then adjust my openGL scene to m...
I have tab based application with 2 tabs -> Home and News.
In my News tab I have a table with 2 rows, General News, sports news.
When I click General News, I want to show my RSS View. (With button to return to the News tab)
Please can someone tell me how to do this, I looked online and its very confusing.
Thanks a million.
...
Hi everybody, I'm working on an ipad application that use coredata. It download information on a database that is on the web, and record them in coredata. The application is based on a split view. My problem was to make the download and the record of the data in background. Here is how I've done :
- I've create an NSOperation, that does ...
i created a UITextField and a custom View.
after that i added this custom view as "inputView" to my UITextField.
amountKeyboardViewController *amountKeyboard = [[amountKeyboardViewController alloc] initWithNibName:@"amountKeyboardViewController" bundle:nil];
amountTextField.inputView = amountKeyboard.view;
[amountTextField becomeFirs...
I would like to be able to send the user out of my app and into Safari as if they had performed a search of some terms I provide. I realize I could construct a URL for doing a Google search and send them there, however the user has the option of configuring one of several search engines, and I'd like to use the one they've chosen and no...