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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:10:56+00:00 2026-05-14T00:10:56+00:00

according to this code i dont understand about NSClassFromString how did i know viewControllerName

  • 0

according to this code
i dont understand about NSClassFromString

how did i know “viewControllerName”
can i use it from another source ?

could you please tell me more information how to use NSClassFromString?

UIViewController *viewController = [[NSClassFromString(viewControllerName) alloc] init];
  • 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-14T00:10:56+00:00Added an answer on May 14, 2026 at 12:10 am

    NSClassFromString returns an Objective-C class based on it’s name as a string (The function name is really self explanitory)…

    The string you pass in is the name of the class you want to create, for example:

    If you have a class called MyViewController and you want to get an Objective-C class from that string, you use this function, like NSClassFromString(@"MyViewController");

    Normally you only need to do this when testing for class names that may not be available to you, for example, when writing code that targets iPhone OS 2.0 and 3.0 simultaneously.

    If you use the class as a symbol, it’ll crash if the class doesn’t exist on the previous version of the OS. So you use this function to return a class using that string, and if the class is successfully returned, you know that it exists and is safe to use, else if it returns nil, then the class doesn’t exist, you shouldn’t use it and your program should take steps to behave properly in this situation.

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

Sidebar

Related Questions

according to this code if i want to access imageView1 and imageView2 how can
I know this issue was posted before, and i fixed my code according to
According to this feature matrix , Visual Studio 2010 Premium (RC) includes static code
I didnt find anything according this issue. Can jaas be used to secure my
here is code from programming pearls this code prints random numbers in decreasing form
I don't understand this, I have this code: <html> <head> <title>Problema</title> <script language=javascript type=text/javascript
I want to understand how ThenBy works in .Net. (I know how to use
I am using this code: $('.ui-accordion').bind('accordionchange', function(event, ui) { $(this).next().next().css({'background-image':'images/green-bg.jpg'}); //ui.newHeader // jQuery object,
I've been here and accordingly found out that this piece of code here var
According this article , generic JPA DAO(Data Access Object) is a pretty nice pattern.

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.