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 5975803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:08:17+00:00 2026-05-22T21:08:17+00:00

i have a strange problem. On my view i have two segmented controls and

  • 0

i have a strange problem.
On my view i have two segmented controls and one button.
The segmented controls work perfectly but my button crashes the app when i touch it.
NSLog won’t be called anymore.

PageViewController.h

paintingOptions = [[UIButton alloc] initWithFrame:CGRectMake(200,30,100,100)];
[paintingOptions setTitle:@"Ok" forState:UIControlStateNormal];
[paintingOptions setBackgroundColor:[UIColor blackColor]];
[paintingOptions addTarget:self action:@selector(showPaintingOptions:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:paintingOptions];

-(void) showPaintingOptions: (id) sender {
   NSLog(@"Button pressed");
}

Any hints on how to solve that ?

Debug:

The debug output says nothing but (gdb).
Xcode shows me this line:

PDFViewController.h

- (UIView *)view {
    return self.scrollView; }

0x32c37102  <+0014>  ldr    r1, [pc, #16]   (0x32c37114 <-[UIViewController nextResponder]+32>)

But this function is in another view controller.
So the view where i have the button in is a subview of this scrollView.

Adding PageViewController to PDFViewController:

- (void)loadScrollViewWithPage:(int)page
{
if (page < 0)
    return;
if (page >= kNumberOfPages)
    return;

// replace the placeholder if necessary
PageViewController *controller = [viewControllers objectAtIndex:page];
if ((NSNull *)controller == [NSNull null])
{
    //page+1 cause CGPDF indexing starts with 1
    controller = [[PageViewController alloc] initWithPageNumberAndUrl:page+1: [chapter urlOnFilesystem]];
    [viewControllers replaceObjectAtIndex:page withObject:controller];
    [controller release];
}

// add the controller's view to the scroll view
if (controller.view.superview == nil)
{
    CGRect frame = scrollView.frame;
    frame.origin.x = frame.size.width * page;
    frame.origin.y = 0;
    controller.view.frame = frame;

    [scrollView addSubview:controller.view];


}
}
  • 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-05-22T21:08:17+00:00Added an answer on May 22, 2026 at 9:08 pm

    From the crash log it looks like -(void) showPaintingOptions: (id) sender is not in your target self. Please make sure that.

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

Sidebar

Related Questions

I have one strange problem.I have two UItextfields in my view and a button.When
I have a strange problem in my android app. In one method I do
Im having a very strange problem, i have a complicated view that returns incorrect
We have very strange problem, one of our applications is continually querying server by
I'm making an Android app and have a strange problem. I need a ViewFlipper
I have strange problem. I have class which behaves similar dropdown list. package test.view;
I have a strange problem in my android app. I have an activity which
I have a strange problem when I try to deploy my current app to
I have strange problem with sharepoint and ajax functionality. We have an UpdatePanel placed
i have strange problem doing reporting: i have numerous clients with different issued invoices.

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.