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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:22:03+00:00 2026-06-08T00:22:03+00:00

I have a Person class which has only a property: name. I want to

  • 0

I have a Person class which has only a property: name. I want to list the property value when debug, but xcode just display “isa”, how can I do it like in eclipse?

Xcode :

eclipse:

enter image description here

  • 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-08T00:22:04+00:00Added an answer on June 8, 2026 at 12:22 am

    Under the hood, properties are accessed using methods. A property named name can be read using the name method, and it can be set using the setName: method. You can use the debugger’s po command to print a description of an object. Try typing this at the debugger console:

    po [p name]
    

    The po command works by sending the debugDescription message to the object you’re printing, and by default, debugDescription just sends the description message. So you could add this method to your Person class:

    - (NSString *)description {
        return [NSString stringWithFormat:@"<%@: %p name=%@>", self.class, self, self.name];
    }
    

    Then you can use a debugger command like this:

    po p
    

    and get output like this:

    <Person: 0x10013fd60 name=Jack>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a person class which has a name and a list of friends
I have a Person class which has an instance variable: Name and Person. @interface
I have a Person class which has a String collection of aliases representing additional
Simple question I have a class say person who has as a property a
Let's have a class Person . Person has a name and height. Equals and
Say I have a class which represents a person, a variable within that class
I have a model in my rails application which is class Person < ActiveRecord::Base
I have a dll in C# which returns a class object. DLL code: Person.cs:
Example-I have a person class Public Class Person Private _fname As String Public Property
Say I have a model Person for which there is a PersonIndex class in

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.