Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8796693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:40:52+00:00 2026-06-13T23:40:52+00:00

Im opening a PDF from the button hulp This is the code: -(IBAction)hulp; {

  • 0

Im opening a PDF from the button hulp

This is the code:

-(IBAction)hulp;
{
NSString *path = [[NSBundle mainBundle] pathForResource:@"Handleiding" ofType:@"pdf"];
NSURL *targetURL = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:targetURL];
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
webView.tag=55;
[[webView scrollView] setContentOffset:CGPointMake(0,500) animated:YES];
[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"window.scrollTo(0.0, 50.0)"]];
[webView loadRequest:request];
[self.view addSubview:webView];
[webView release];

UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button addTarget:self
           action:@selector(aMethod:)
 forControlEvents:UIControlEventTouchDown];
[button setTitle:@"Close" forState:UIControlStateNormal];
button.frame = CGRectMake(80, 425, 160, 40);
[button addTarget:self action:@selector(close:) forControlEvents:UIControlEventTouchUpInside];
[webView addSubview:button];

}


- (IBAction)close:(id)sender {

[[self.view viewWithTag:55] removeFromSuperview];


}

Does anyone see what im doing wrong:

  *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[LocationTestViewController aMethod:]: unrecognized selector sent to instance 0x8087c60'
  *** First throw call stack:
 (0x1f26012 0x15e8e7e 0x1fb14bd 0x1f15bbc 0x1f1594e 0x15fc705 0x38c920 0x38c8b8 0x44d671 0x44dbcf 0x44c872 0x3bc16d 0x3bc552 0x39a3aa 0x38bcf8 0x22badf9 0x22baad0 0x1e9bbf5 0x1e9b962 0x1eccbb6 0x1ecbf44 0x1ecbe1b 0x22b97e3 0x22b9668 0x38965c 0x244d 0x2385)
  libc++abi.dylib: terminate called throwing an exception
 (lldb) 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:40:53+00:00Added an answer on June 13, 2026 at 11:40 pm

    What is this instruction for:

    [button addTarget:self
               action:@selector(aMethod:)
     forControlEvents:UIControlEventTouchDown];
    

    Remove it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im opening a map like this: NSString *urlString = [NSString stringWithFormat:@http://maps.google.com/maps?q=%@,%@, destLat, destLong]; [[UIApplication
I m opening pdf file in uiwebview from my app. That pdf contains some
This is similar to a question I asked previously about opening a pdf in
I am opening Acrobat X Pro to edit PDF documents from Sharepoint 2007, but
I'm using this Java code to download a file from the Internet: String address
I am opening pdf documents from my application in Ibooks using docController = [UIDocumentInteractionController
Our universal app supports opening pdf files from other apps, but we only want
I have created an html5 application in which I open an pdf, after opening
Opening an application( probably an .exe file) as an administrator in headless mode from
i am opening jQuery Dialog through the below code.The problem here is when i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.