---
title: "@synthesize vs @dynamic, what are the differences?"  
description: "@synthesize vs @dynamic, what are the differences?"  
author: "Samuel Fernandes"  
published: 2015-04-27  
updated: 2015-04-27  
canonical: https://www.mindstick.com/forum/23148/synthesize-vs-dynamic-what-are-the-differences  
category: "iphone"  
tags: ["iphone", "ios"]  
reading_time: 1 minute  

---

# @synthesize vs @dynamic, what are the differences?

What are the [differences](https://www.mindstick.com/articles/12918/cat-5e-vs-cat-6a-understanding-the-major-differences) between implementing a @[property](https://www.mindstick.com/blog/205/property-notification-in-c-sharp) with @[dynamic](https://www.mindstick.com/blog/11080/features-of-java-dynamic-complied-and-interpreted) or @synthesize?

## Replies

### Reply by Anonymous User

@synthesize will generate getter and setter methods for your property. @dynamic just tells the compiler that the getter and setter methods are implemented not by the class itself but somewhere else (like the superclass or will be provided at runtime).\
Uses for @dynamic are e.g. with subclasses of NSManagedObject (CoreData) or when you want to create an outlet for a property defined by a superclass that was not defined as an outlet:\
**Super class:**\

```
@property (nonatomic, retain) NSButton *someButton;...@synthesize someButton;
```

**Subclass:**

```
@property (nonatomic, retain) IBOutlet NSButton *someButton;...@dynamic someButton;
```


---

Original Source: https://www.mindstick.com/forum/23148/synthesize-vs-dynamic-what-are-the-differences

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
