Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Deprecate ReplicaController.
Reviewers: O4 Material Motion Apple platform reviewers, O2 Material Motion, markwei

Reviewed By: O4 Material Motion Apple platform reviewers, O2 Material Motion, markwei

Tags: #material_motion

Differential Revision: http://codereview.cc/D1918
  • Loading branch information
jverkoey committed Nov 15, 2016
1 parent 10d37a6 commit a8c94f8
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/MDMReplicaController.h
Expand Up @@ -18,12 +18,15 @@

@protocol MDMReplicaControllerDelegate;

// clang-format off

/**
A replica controller is responsible for facilitating the creation of visible replicas of
displayable elements.
An element might be a UIView or any other displayable object.
*/
__deprecated_msg("Use ViewReplicator instead. Deprecated in v1.1.0.")
NS_SWIFT_NAME(ReplicaController)
@interface MDMReplicaController : NSObject

Expand All @@ -37,7 +40,8 @@ NS_SWIFT_NAME(ReplicaController)
The returned element can not be the provided element.
*/
- (nullable id)replicateElement:(nonnull id)element
NS_SWIFT_NAME(replicate(element:));
NS_SWIFT_NAME(replicate(element:))
__deprecated_msg("Use ViewReplicator instead. Deprecated in v1.1.0.");

#pragma mark Configuration replication

Expand All @@ -46,15 +50,18 @@ NS_SWIFT_NAME(ReplicaController)
If no delegate is provided, no replicas will be created.
*/
@property(nonatomic, weak, nullable) id<MDMReplicaControllerDelegate> delegate;
@property(nonatomic, weak, nullable) id<MDMReplicaControllerDelegate> delegate
__deprecated_msg("Use ViewReplicator instead. Deprecated in v1.1.0.");

/** Disable replication for a specific element. */
- (void)disableReplicationForElement:(nonnull id)element
NS_SWIFT_NAME(disableReplication(forElement:));
NS_SWIFT_NAME(disableReplication(forElement:))
__deprecated_msg("Use ViewReplicator instead. Deprecated in v1.1.0.");

@end

/** The replica controller delegate is responsible for creating replica elements. */
__deprecated_msg("Use ViewReplicator instead. Deprecated in v1.1.0.")
NS_SWIFT_NAME(ReplicaControllerDelegate)
@protocol MDMReplicaControllerDelegate <NSObject>

Expand All @@ -64,6 +71,9 @@ NS_SWIFT_NAME(ReplicaControllerDelegate)
Return `element` if replication of the element is not possible or desired.
*/
- (nonnull id)replicateElement:(nonnull id)element
NS_SWIFT_NAME(replicate(element:));
NS_SWIFT_NAME(replicate(element:))
__deprecated_msg("Use ViewReplicator instead. Deprecated in v1.1.0.");

@end

// clang-format on

0 comments on commit a8c94f8

Please sign in to comment.