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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:35:20+00:00 2026-06-07T20:35:20+00:00

In general: I got a custom UIView with a xib file as subview on

  • 0

In general:
I got a custom UIView with a xib file as subview on a UIViewController. I add the subview programmatically in my controller.

In my UIViewController:

NSArray *subviewArray = [[NSBundle mainBundle] loadNibNamed:@"MyCustomSubView" owner:self  options:nil];
mySubView = [subviewArray objectAtIndex:0];
...
[self.view addSubview:mapView];

Because I need to scroll on this subview, which also have an UIImageView on it, I decided to change my custom UIView into an UIScrollView.

I did the following steps:

  • Changed the MyCustomSubView.xib, added an UIScrollView with Custom Class MyCustomSubView (and an UIImageView on it like before)
  • Changed my MyCustomSubView class to extend UIScrollView
  • Changed my MyViewController to implement UIScrollViewDelegate
  • set mySubView.delegate to self(the controller)
  • implemented (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView and returned the UIImageView of the subview
  • enabled user interaction on the imageview and on the uiscrollview

These were my total steps I think. But as example, the viewForZoomingInScrollView method wasn’t called. Also I tried to zoom in, but nothing happened.

Anyone an idea, what could be wrong?

  • 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-07T20:35:22+00:00Added an answer on June 7, 2026 at 8:35 pm

    Looking briefly at the UIScrollView Class Reference page, I see the following:

    The UIScrollView class can have a delegate that must adopt the UIScrollViewDelegate protocol. For zooming and panning to work, the delegate must implement both viewForZoomingInScrollView: and scrollViewDidEndZooming:withView:atScale:; in addition, the maximum (maximumZoomScale) and minimum ( minimumZoomScale) zoom scale must be different.

    You mentioned implementing viewForZoomingInScrollView:, but not scrollViewDidEndZooming:atScale:, nor did you mention setting maximumZoomScale or minimumZoomScale. Try doing those things, and check back if you’re still having issues.

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

Sidebar

Related Questions

In general, if I've got a custom file of type W and want to
I got more of a general question. Instead of a tableview I have a
General approach in GWT is to use Panels and then apply custom CSS themes
I've got a general question illustrated with a concrete example. How much would you
everyone. I got general idea about RMI, but still need to understand some details.
I've got a general curiosity question. Say I have 1 master server (for writes)
I have got a Mysql (5.1.58-1ubuntu1) 'users' table ( InnoDB storage engine, utf8 general
I got one general and probably easy question. When saving an array of int
I've got a fairly general purpose PHP library which I'd like to use for
I've got an MS SQL database with 3 inherent tables. A general one called

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.