Do I need to manually add instance variables and synthesize statements these days?

I've been doing Objective-C programming for a few years now. I was listening to a podcast the other day which mentioned something about how Apple has made it easier over the years, and I thought I heard mention of there being no need to manually add instance variables now. Is this true? Here's how I do it currently:

.h:

@interface Class : UIView

@property (nonatomic, strong) NSString *testString;

@end

.m:

@interface Class () {

NSString *_testString;

}

@end

@implementation Class

@synthesize testString = _testString;

Is this work necessary?

Answers


This is all you need now

.h:

@interface Class : UIView

@property (nonatomic, strong) NSString *testString;

@end

.m:

@implementation Class

@end

Need Your Help

VB.NET Oledb Update Command Not Working

vb.net ms-access oledb

I'm trying to pass this Update command to a database, it completes ok with no errors but it doesnt update the database and I can't understand why?

How can I size my custom component appropriately?

java swing

So I have a custom Button, that runs good, no errors.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.