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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T03:07:30+00:00 2026-05-17T03:07:30+00:00

I am looking for a way to automatically localize texts on buttons/textfields etc and

  • 0

I am looking for a way to automatically localize texts on buttons/textfields etc and for this method I need to find all (for example) UIButton’s on a UIView.

I tried the following 2 methods, but they both do no work like I want them to work:

for (UIView* subView in self.view.subviews)
{
    NSLog(@"object class : %@", [subView class]);

    if ([subView isMemberOfClass:[UIButton class]])
        NSLog(@"Button found!");
}

The problem with this piece of code is that a RoundedRectButton does not match the UIButton class, while it really is just a UIButton.

I also tried the following:

for (UIButton* button in self.view.subviews)
{
// Do my stuff
}

But the stupid thing is, is that cocoa-touch actually just lists all subviews in that for-loop (also the UITextFields etc).

Is there a way to actually just get all UIButtons from a view? Or do I really need to find controls by looking at their selectors.

  • 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-17T03:07:30+00:00Added an answer on May 17, 2026 at 3:07 am

    the first method is correct, except you need to change isMemberOfClass function to isKindOfClass:

    isKindOfClass: Returns a Boolean value
    that indicates whether the receiver is
    an instance of given class or an
    instance of any class that inherits
    from that class.

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

Sidebar

Related Questions

We are looking for a way of automatically filtering all CRUD operations by a
Is there any possible way to automatically append all strings/etc to a textbox(or other
I'm looking for a way to automatically generate a header file. This file is
I'm looking for a good way to automatically 'svn add' all unversioned files in
I'm looking for a way to automatically do some clean up tasks when the
I'm looking for a way to add an EventListener which will automatically removes itself
I'm looking for a way to automatically have my RESTful controller, which returns a
I'm looking for a way to automatically set the initial focus on a Silverlight
I'm looking for a way to automatically determine the natural language used by a
I'm looking for a way to automatically produce an abstract, basically the first few

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.