Skip to content

Commit

Permalink
Mark symbols to be deprecated
Browse files Browse the repository at this point in the history
Follow go/material-ios-lists for list guidance instead.

PiperOrigin-RevId: 458230970
  • Loading branch information
CGRect authored and material-automation committed Jun 30, 2022
1 parent 372144c commit f2d6a16
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/core/src/NISnapshotRotation.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

API_DEPRECATED_BEGIN("This feature is no longer applicable and should be removed from usage.",
ios(12, API_TO_BE_DEPRECATED))
/**
* An object designed to easily implement snapshot rotation.
*
Expand Down Expand Up @@ -225,3 +227,5 @@ UIImageView* NISnapshotViewOfViewWithTransparency(UIView* view);
*
* @fn NISnapshotRotation::didRotateFromInterfaceOrientation:
*/

API_DEPRECATED_END
5 changes: 5 additions & 0 deletions src/core/src/NIViewRecycler.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

API_DEPRECATED_BEGIN("Use standard UITableView or UICollectionView APIs instead.",
ios(12, API_TO_BE_DEPRECATED))

/**
* For recycling views in scroll views.
*
Expand Down Expand Up @@ -162,3 +165,5 @@ if (nil == view) {
*
* @fn NIRecyclableView::reuseIdentifier
*/

API_DEPRECATED_END
5 changes: 5 additions & 0 deletions src/models/src/NICellBackgrounds.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

#import "NIPreprocessorMacros.h" /* for weak */

API_DEPRECATED_BEGIN("Follow go/material-ios-lists for list guidance instead.",
ios(12, API_TO_BE_DEPRECATED))

/**
* The NIGroupedCellAppearance protocol provides support for each cell to adjust their appearance.
*
Expand Down Expand Up @@ -129,3 +132,5 @@ typedef enum {
* @returns A tag for an image that matches the given parameters.
* @fn NIGroupedCellBackground::backgroundTagForFirst:last:drawDivider:
*/

API_DEPRECATED_END
9 changes: 7 additions & 2 deletions src/models/src/NICellCatalog.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

#import "NICellFactory.h"

API_DEPRECATED_BEGIN("Follow go/material-ios-lists for list guidance instead.",
ios(12, API_TO_BE_DEPRECATED))

typedef CGFloat (^NICellDrawRectBlock)(CGRect rect, id object, UITableViewCell* cell);

/**
Expand Down Expand Up @@ -47,8 +50,8 @@ typedef CGFloat (^NICellDrawRectBlock)(CGRect rect, id object, UITableViewCell*
- (id)initWithTitle:(NSString *)title image:(UIImage *)image cellClass:(Class)cellClass userInfo:(id)userInfo;
+ (id)objectWithTitle:(NSString *)title image:(UIImage *)image;
+ (id)objectWithTitle:(NSString *)title;
@property (nonatomic, copy) NSString* title;
@property (nonatomic, strong) UIImage* image;
@property(nonatomic, copy) NSString *title;
@property(nonatomic, strong) UIImage *image;
@end

/**
Expand Down Expand Up @@ -170,3 +173,5 @@ typedef CGFloat (^NICellDrawRectBlock)(CGRect rect, id object, UITableViewCell*
*
* @fn NISubtitleCellObject::cellStyle
*/

API_DEPRECATED_END
5 changes: 5 additions & 0 deletions src/models/src/NICellFactory+Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@

#import "NICellFactory.h"

API_DEPRECATED_BEGIN("Follow go/material-ios-lists for list guidance instead.",
ios(12, API_TO_BE_DEPRECATED))

// Private classes for use in Nimbus.
@interface NICellObject ()

// A property to change the cell class of this cell object.
@property(nonatomic, assign) Class cellClass;

@end

API_DEPRECATED_END
5 changes: 5 additions & 0 deletions src/models/src/NICellFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

#import "NITableViewModel.h"

API_DEPRECATED_BEGIN("Follow go/material-ios-lists for list guidance instead.",
ios(12, API_TO_BE_DEPRECATED))

/**
* A simple factory for creating table view cells from objects.
*
Expand Down Expand Up @@ -256,3 +259,5 @@ _model.delegate = (id)[NICellFactory class];
*
* @fn NICellObject::userInfo
*/

API_DEPRECATED_END
5 changes: 5 additions & 0 deletions src/models/src/NIMutableTableViewModel+Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
#import "NIMutableTableViewModel.h"
#import "NITableViewModel+Private.h"

API_DEPRECATED_BEGIN("Follow go/material-ios-lists for list guidance instead.",
ios(12, API_TO_BE_DEPRECATED))

@interface NIMutableTableViewModel (Private)

@property (nonatomic, strong) NSMutableArray* sections; // Array of NITableViewModelSection
Expand All @@ -30,3 +33,5 @@
- (NSMutableArray *)mutableRows;

@end

API_DEPRECATED_END
5 changes: 5 additions & 0 deletions src/models/src/NIMutableTableViewModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

#import "NITableViewModel.h"

API_DEPRECATED_BEGIN("Follow go/material-ios-lists for list guidance instead.",
ios(12, API_TO_BE_DEPRECATED))

@class NIMutableTableViewModel;

/**
Expand Down Expand Up @@ -233,3 +236,5 @@ NSIndexSet* indexSet = [self.model addSectionWithTitle:@"New section"];
*
* @fn NIMutableTableViewModel::updateSectionIndex
*/

API_DEPRECATED_END
5 changes: 5 additions & 0 deletions src/models/src/NITableViewActions.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

#import "NimbusCore.h"

API_DEPRECATED_BEGIN("Follow go/material-ios-lists for list guidance instead.",
ios(12, API_TO_BE_DEPRECATED))

/**
* The NITableViewActions class provides an interface for attaching actions to objects from a
* NIActionsDataSource.
Expand Down Expand Up @@ -125,3 +128,5 @@ self.tableView.delegate = [self.actions forwardingTo:self.tableView.delegate];
*
* @fn NITableViewActions::tableViewCellSelectionStyle
*/

API_DEPRECATED_END
5 changes: 5 additions & 0 deletions src/models/src/NITableViewModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#import "NIActions.h" /* for NIActionsDataSource */
#import "NIPreprocessorMacros.h" /* for weak */

API_DEPRECATED_BEGIN("Follow go/material-ios-lists for list guidance instead.",
ios(12, API_TO_BE_DEPRECATED))

#if NS_BLOCKS_AVAILABLE
typedef UITableViewCell * _Nonnull (^NITableViewModelCellForIndexPathBlock)(UITableView* _Nonnull tableView, NSIndexPath* _Nonnull indexPath, id _Nonnull object);
#endif // #if NS_BLOCKS_AVAILABLE
Expand Down Expand Up @@ -303,3 +306,5 @@ typedef enum {
*/

#endif // #if NS_BLOCKS_AVAILABLE

API_DEPRECATED_END

0 comments on commit f2d6a16

Please sign in to comment.