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

  • Home
  • SEARCH
  • 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 596733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:12:12+00:00 2026-05-13T16:12:12+00:00

For an application I’m working on, I’d like to implement sort of a gauge-like

  • 0

For an application I’m working on, I’d like to implement sort of a gauge-like control. The gauge should be of vertical orientation and I’d like to get the effect of a dial with the values printed on it to move vertically so that the current value appears at the center of the gauge. While the part of the dial that is not currently visible gets clipped.

I thought a good approach would be to have one UIView that acts as the top visible part (the gauge’s window if you will) and a subview that just draws the dial with the values and markers. The top view would receive a message indicating the value to display and move the subview around so that the current value is centered while the part of the dial that is not currently visible gets clipped. I tried to do a little illustration of this (the part of the dial that is grayed-out should be clipped):

Gauge

I’m am unsure how to set up the views so that I can actually get this to work. I tried around with two UIView subclasses but the view rendering the dial would just paint at some unexpected location on the screen and wouldn’t be clipped by the parent view.

I’m really just looking for general advice on the parts needed to implement a control like this. Does it make sense to use two views as I tried to describe or should I implement this as one single UIView subclass that just figures out which part of the dial to draw whenever the value is changed? Or maybe something completely different?

  • 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-13T16:12:13+00:00Added an answer on May 13, 2026 at 4:12 pm

    Look into the UIScrollView class.

    From what I read in your question, this should give you what you need.

    The scroll view acts as a kind of ‘window’ on top of a content view. The content view is clipped by the scroll view if it is larger.

    So you could have a content view is that is say, for arguments sake, 50×320, and the scroll view be only 50 x 50. The area of the content view will be clipped to the 50×50 size, and you will be able to move the content view by scrolling with your finger, like other native iPhone controls.

    Many, if not all, iPhone apps use a scroll view in some way. UITableViews are subclasses of scroll views, as are UITextViews.

    Apple has a decent example app that shows how to use a scroll view, so check that out too.

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

Sidebar

Related Questions

Application[temp] = 8; should set the value 8 to the key temp . However,
Application : I am working on one mid-large size application which will be used
Application is a C# .Net 3.5 WCF Service. I'd like during the build process
APPLICATION DESCRIPTION : I am a new iPhone developer. I am working on an
Our application uses libcurl for HTTP, and we want to get access to Internet
Application I am working on an MMO and have run into an issue. The
Application: WPF Application consisting of a textbox on top and a listbox below Users
Application : HTA (therefore IE) This is an application that uses SendKeys to populate
Application is written in delphi 2010 and the underlying dll is a C++ dll.
Application names on Google Play don't need to be unique, and it's possible to

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.