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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:10:26+00:00 2026-05-22T20:10:26+00:00

I have a UISegmentedView that I use to present the user with an option

  • 0

I have a UISegmentedView that I use to present the user with an option on one of two calculations they can do in my program. If the segmented control is one way, it should show 4 text boxes and their labels, if the other only 3 (and the calculation would change as well).

This all works, my problem is with moving the controls (I want to hide the ones you won’t need, as well as move the controls on the screen to make it look nice)

I would like to put this in one method, and just pass the UIControl to move it. For example, in my .h

-(void) moveControlUp:(UIControl*)controlToMove;

Then, in my .m

- (void)moveControlUp:(UIControl*)controlToMove
{
    controlToMove.frame = CGRectMake(controlToMove.frame.origin.x, controlToMove.frame.origin.y - 39, controlToMove.frame.size.width, controlToMove.frame.size.height); 
}

and then when I actually want to move the controls (labelPointsHeader is a UILabel, textPointsName is a text box):

[labelPointsHeader moveControlUp];
[textPointsName moveControlUp];

This doesn’t work, and I get two errors. “UILabel may not respond to ‘-moveControlUp'” and “Method ‘-moveControlUp’ not found (return type defaults to id). I crash when I hit this, stating that ‘unrecognized selector sent to instance’.

  • 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-22T20:10:27+00:00Added an answer on May 22, 2026 at 8:10 pm

    In which class did you define these methods? (doesn’t appear to be a category)

    Let’s say you defined them in SomeClass, then you need to do this:

    [someInstanceOfSomeClass moveControlUp:labelPointsHeader];

    Right now you are sending a message to a UILabel in the first case, but UILabel does not have this method. The method is in whichever class you defined it.

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

Sidebar

Related Questions

Have an app that can use tts to read text messages. It can also
Have noticed issue while testing iphone app that if one quickly opens/dismisses a modal
Have a build process that can't be edited and need to pack another war
Have a bit of a weird one and hopefully someone can help out. The
I have a script that appends some rows to a table. One of the
Have a look at the menus on this page: http://www.pieterdedecker.be/labs/vspwpg/?page_id=96 They look okay in
have a table that dynamically generates text boxes in run time. I want to
I have a project that adds elements to an AutoCad drawing. I noticed that
I have a new web app that is packaged as a WAR as part
have a wierd issue. for the life of me can't trace this back (its

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.