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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:33:37+00:00 2026-05-22T22:33:37+00:00

I have a doubt about initializing string with synthesize keyword. In my Event.h class

  • 0

I have a doubt about initializing string with synthesize keyword.

In my Event.h class I have

@interface Event : NSObject {

    NSString *title;
}

@property (nonatomic, retain) NSString *title;

and in Event.h I have

@synthesize title;

However when I want to set the title from my main class and I display the content in the console, I get null:

 [self.currentEvent.title stringByAppendingString:@"hello"];  
 NSLog(@"%@", self.currentEvent.title); //this is null

Is because I don’t properly initialize the title variable in Event? Isn’t synthesize initializing it for me?

  • 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-22T22:33:38+00:00Added an answer on May 22, 2026 at 10:33 pm

    @synthesize creates the setter and getter methods for you, but does not initialize

    Fastest way to get up to speed with this stuff is to watch “Developing Apps for iOS” by Paul Hegarty / Stanford University, available free on iTunes.

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

Sidebar

Related Questions

I have some doubt about the title, but I couldn't come up with anything
I have little doubt about string reading in C. string reading functions like gets,
I have some doubt about python's class variables. As my understanding, if I define
I am programming in C++ for many years, still I have doubt about one
I have a doubt about orkut's new URL Writing method. Earlier the home page
i have some doubt about PHP based web crawlers,can it run like the java
I have some doubt, about FB Log in system integration in my website ,
I am new to specflow and a have a doubt about how to mock
I'm getting my hands on JSF 2.0 and have certain doubt about new annotation
I have a doubt about how I can check an URL like this: http://your.url/set_new_password.php?userid=564979&code=54c4a2767c2f485185ab72cdcf03ab59

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.