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

Generating istanbul code coverage reports for jasmine tests run (via grunt) on a browserify bundle in phantomjs

node.js gruntjs phantomjs browserify istanbul

The title says it all really. Despite trawling the internet I haven't found a single example of a solution to this problem.

Set android window title bar icon from custom application theme

android android-layout

Is it possible to set the window title bar title and icon from my own custom theme?