Permalink
Browse files

Use strong and unsafe_unretained in properties

Previously retain and assign were being used. It's better to use the ARCy ones.
  • Loading branch information...
1 parent 295f424 commit df98fabd1e9586c04e941bdcf9e076e695127c33 @soffes soffes committed May 26, 2012
@@ -11,7 +11,7 @@
@interface SSAddressBarTextField : SSTextField
@property (nonatomic, assign, getter=isLoading) BOOL loading;
-@property (nonatomic, retain) UIButton *reloadButton;
-@property (nonatomic, retain) UIButton *stopButton;
+@property (nonatomic, strong) UIButton *reloadButton;
+@property (nonatomic, strong) UIButton *stopButton;
@end
@@ -16,6 +16,6 @@
/**
A view that indicates some status to the user. (read-only)
*/
-@property (nonatomic, retain, readonly) SSBadgeView *badgeView;
+@property (nonatomic, strong, readonly) SSBadgeView *badgeView;
@end
View
@@ -41,7 +41,7 @@ typedef enum {
/**
The badge text label.
*/
-@property (nonatomic, retain, readonly) SSLabel *textLabel;
+@property (nonatomic, strong, readonly) SSLabel *textLabel;
///-------------------------------------
@@ -55,14 +55,14 @@ typedef enum {
@see defaultBadgeColor
*/
-@property (nonatomic, retain) UIColor *badgeColor;
+@property (nonatomic, strong) UIColor *badgeColor;
/**
The badge's background color while its cell is highlighted.
The default value of this property is white.
*/
-@property (nonatomic, retain) UIColor *highlightedBadgeColor;
+@property (nonatomic, strong) UIColor *highlightedBadgeColor;
/**
The corner radius used when rendering the badge's outline.
@@ -101,7 +101,7 @@ typedef enum {
Setting a strechable image for this property is recommended.
*/
-@property (nonatomic, retain) UIImage *badgeImage;
+@property (nonatomic, strong) UIImage *badgeImage;
/**
The badge's background image while its cell is highlighted.
@@ -110,7 +110,7 @@ typedef enum {
Setting a strechable image for this property is recommended.
*/
-@property (nonatomic, retain) UIImage *highlightedBadgeImage;
+@property (nonatomic, strong) UIImage *highlightedBadgeImage;
///---------------
@@ -20,14 +20,14 @@
@see bottomBorderColor
*/
-@property (nonatomic, retain) UIColor *topBorderColor;
+@property (nonatomic, strong) UIColor *topBorderColor;
/**
The top inset color. The default is `nil`.
@see bottomInsetColor
*/
-@property (nonatomic, retain) UIColor *topInsetColor;
+@property (nonatomic, strong) UIColor *topInsetColor;
///--------------------------------
@@ -39,13 +39,13 @@
@see topInsetColor
*/
-@property (nonatomic, retain) UIColor *bottomInsetColor;
+@property (nonatomic, strong) UIColor *bottomInsetColor;
/**
The bottom border color. The default is `nil`.
@see topBorderColor
*/
-@property (nonatomic, retain) UIColor *bottomBorderColor;
+@property (nonatomic, strong) UIColor *bottomBorderColor;
@end
@@ -117,21 +117,21 @@ typedef enum {
/**
The background view of the collection view.
*/
-@property (nonatomic, retain) UIView *backgroundView;
+@property (nonatomic, strong) UIView *backgroundView;
/**
Returns an accessory view that is displayed above the collection.
The default value is `nil`. The collection header view is different from a section header.
*/
-@property (nonatomic, retain) UIView *collectionHeaderView;
+@property (nonatomic, strong) UIView *collectionHeaderView;
/**
Returns an accessory view that is displayed below the collection.
The default value is `nil`. The collection footer view is different from a section footer.
*/
-@property (nonatomic, retain) UIView *collectionFooterView;
+@property (nonatomic, strong) UIView *collectionFooterView;
/**
The style of the receiving collection view's headers and footers.
@@ -163,7 +163,7 @@ typedef enum {
This will be the background of the collection view if `nil` is provided. The default is `nil`.
*/
-@property (nonatomic, retain) UIColor *rowBackgroundColor;
+@property (nonatomic, strong) UIColor *rowBackgroundColor;
///-----------------------------------
@@ -229,7 +229,7 @@ typedef enum {
The internal scroll view of the collection view. This should only be used to inspect its state or scrolling. Changing
the value of its attributes is undefined.
*/
-@property (nonatomic, retain, readonly) UIScrollView *scrollView;
+@property (nonatomic, strong, readonly) UIScrollView *scrollView;
///--------------------------
@@ -440,12 +440,12 @@ typedef enum {
/**
The object that acts as the data source of the receiving collection view.
*/
-@property (nonatomic, assign) id<SSCollectionViewDataSource> dataSource;
+@property (nonatomic, unsafe_unretained) id<SSCollectionViewDataSource> dataSource;
/**
The object that acts as the delegate of the receiving collection view.
*/
-@property (nonatomic, assign) id<SSCollectionViewDelegate> delegate;
+@property (nonatomic, unsafe_unretained) id<SSCollectionViewDelegate> delegate;
@end
@@ -16,6 +16,6 @@
/**
Returns the table view managed by the controller object. (read-only)
*/
-@property (nonatomic, retain, readonly) SSCollectionView *collectionView;
+@property (nonatomic, strong, readonly) SSCollectionView *collectionView;
@end
@@ -8,7 +8,7 @@
@interface SSCollectionViewExtremityTableViewCell : UITableViewCell
-@property (nonatomic, retain) UIView *extrimityView;
+@property (nonatomic, strong) UIView *extrimityView;
- (id)initWithReuseIdentifier:(NSString *)aReuseIdentifier;
@@ -30,30 +30,30 @@ typedef enum {
Returns the image view (`UIImageView` object) of the collection view item, which initially has no image set.
`SSCollectionViewItem` creates the image view object when you create the item.
*/
-@property (nonatomic, retain) UIImageView *imageView;
+@property (nonatomic, strong) UIImageView *imageView;
/**
Returns the label used for the main textual content of the table cell. (read-only)
Holds the main label of the item. `SSCollectionViewItem` adds an appropriate label when you create the cell in a given
item style.
*/
-@property (nonatomic, retain) SSLabel *textLabel;
+@property (nonatomic, strong) SSLabel *textLabel;
/**
Returns the secondary label of the collection view item. (read-only)
Holds the secondary label of the item. `SSCollectionViewItem` adds an appropriate label when you create the cell in a
given item style.
*/
-@property (nonatomic, retain) SSLabel *detailTextLabel;
+@property (nonatomic, strong) SSLabel *detailTextLabel;
/** The view used as the background of the item.
The default is `nil`. `SSCollectionViewItem` adds the background view as a subview behind all other views and uses its
current frame location.
*/
-@property (nonatomic, retain) UIView *backgroundView;
+@property (nonatomic, strong) UIView *backgroundView;
/**
The view used as the background of the item when it is selected.
@@ -63,7 +63,7 @@ typedef enum {
is not `nil`, or behind all other views. Calling `setSelected:animated:` causes the `selectedBackground` view to
animate in and out with an alpha fade.
*/
-@property (nonatomic, retain) UIView *selectedBackgroundView;
+@property (nonatomic, strong) UIView *selectedBackgroundView;
/**
A string used to identify an item that is reusable. (read-only)
@@ -10,7 +10,7 @@
@interface SSCollectionViewItem ()
-@property (nonatomic, retain) NSIndexPath *indexPath;
-@property (nonatomic, assign) SSCollectionView *collectionView;
+@property (nonatomic, strong) NSIndexPath *indexPath;
+@property (nonatomic, unsafe_unretained) SSCollectionView *collectionView;
@end
@@ -12,8 +12,8 @@
@property (nonatomic, assign) CGSize itemSize;
@property (nonatomic, assign) CGFloat itemSpacing;
-@property (nonatomic, retain) NSArray *items;
-@property (nonatomic, assign) SSCollectionView *collectionView;
+@property (nonatomic, strong) NSArray *items;
+@property (nonatomic, unsafe_unretained) SSCollectionView *collectionView;
- (id)initWithReuseIdentifier:(NSString *)aReuseIdentifier;
@@ -61,14 +61,14 @@ typedef enum {
The default is `nil`.
*/
-@property (nonatomic, retain) UIColor *topColor;
+@property (nonatomic, strong) UIColor *topColor;
/**
The bottom gradient color. This method is deprecated.
The default is `nil`.
*/
-@property (nonatomic, retain) UIColor *bottomColor;
+@property (nonatomic, strong) UIColor *bottomColor;
/** The scale of the gradient. This method is deprecated.
View
@@ -8,15 +8,15 @@
@interface SSHUDView : UIView
-@property (nonatomic, retain, readonly) UILabel *textLabel;
+@property (nonatomic, strong, readonly) UILabel *textLabel;
@property (nonatomic, assign) BOOL textLabelHidden;
-@property (nonatomic, retain, readonly) UIActivityIndicatorView *activityIndicator;
+@property (nonatomic, strong, readonly) UIActivityIndicatorView *activityIndicator;
@property (nonatomic, assign) CGSize hudSize;
@property (nonatomic, assign, getter=isLoading) BOOL loading;
@property (nonatomic, assign, getter=isSuccessful) BOOL successful;
@property (nonatomic, assign) BOOL hidesVignette;
-@property (nonatomic, retain) UIImage *completeImage;
-@property (nonatomic, retain) UIImage *failImage;
+@property (nonatomic, strong) UIImage *completeImage;
+@property (nonatomic, strong) UIImage *failImage;
- (id)initWithTitle:(NSString *)aTitle;
- (id)initWithTitle:(NSString *)aTitle loading:(BOOL)isLoading;
View
@@ -24,14 +24,14 @@
The default is `[UIColor grayColor]`.
*/
-@property (nonatomic, retain) UIColor *lineColor;
+@property (nonatomic, strong) UIColor *lineColor;
/**
The color of the line inset.
The default is 50% opaque white.
*/
-@property (nonatomic, retain) UIColor *insetColor;
+@property (nonatomic, strong) UIColor *insetColor;
///---------------------
@@ -17,11 +17,11 @@
/**
The text label that is displayed to the user.
*/
-@property (nonatomic, retain, readonly) UILabel *textLabel;
+@property (nonatomic, strong, readonly) UILabel *textLabel;
/**
A view that indicates loading activity to the user. (read-only)
*/
-@property (nonatomic, retain, readonly) UIActivityIndicatorView *activityIndicatorView;
+@property (nonatomic, strong, readonly) UIActivityIndicatorView *activityIndicatorView;
@end
@@ -17,9 +17,9 @@
*/
@interface SSPickerViewController : UITableViewController
-@property (nonatomic, retain) NSArray *keys;
-@property (nonatomic, retain) id selectedKey;
-@property (nonatomic, retain) NSIndexPath *currentIndexPath;
+@property (nonatomic, strong) NSArray *keys;
+@property (nonatomic, strong) id selectedKey;
+@property (nonatomic, strong) NSIndexPath *currentIndexPath;
- (void)loadKeys;
- (NSString *)cellTextForKey:(id)key;
@@ -41,21 +41,21 @@
@see defaultPieColor
*/
-@property (nonatomic, retain) UIColor *pieBorderColor;
+@property (nonatomic, strong) UIColor *pieBorderColor;
/**
The fill color.
@see defaultPieColor
*/
-@property (nonatomic, retain) UIColor *pieFillColor;
+@property (nonatomic, strong) UIColor *pieFillColor;
/**
The background color.
The default is white.
*/
-@property (nonatomic, retain) UIColor *pieBackgroundColor;
+@property (nonatomic, strong) UIColor *pieBackgroundColor;
///---------------
@@ -44,12 +44,12 @@
/**
The image draw for a star that is empty.
*/
-@property (nonatomic, retain) UIImage *emptyStarImage;
+@property (nonatomic, strong) UIImage *emptyStarImage;
/**
The image draw for a star that is filled.
*/
-@property (nonatomic, retain) UIImage *filledStarImage;
+@property (nonatomic, strong) UIImage *filledStarImage;
/**
The spacing of stars.
@@ -73,6 +73,6 @@
/**
The text label drawn under the stars when there is no rating selected. (read-only)
*/
-@property (nonatomic, retain, readonly) UILabel *textLabel;
+@property (nonatomic, strong, readonly) UILabel *textLabel;
@end
@@ -13,8 +13,8 @@
@interface SSRatingPickerScrollView : UIScrollView <UITextViewDelegate>
-@property (nonatomic, retain, readonly) SSRatingPicker *ratingPicker;
-@property (nonatomic, retain, readonly) SSTextField *titleTextField;
-@property (nonatomic, retain, readonly) SSTextView *reviewTextView;
+@property (nonatomic, strong, readonly) SSRatingPicker *ratingPicker;
+@property (nonatomic, strong, readonly) SSTextField *titleTextField;
+@property (nonatomic, strong, readonly) SSTextView *reviewTextView;
@end
@@ -25,7 +25,7 @@
All of the rating picker's values are the default values of `SSRatingPicker`.
*/
-@property (nonatomic, retain, readonly) SSRatingPicker *ratingPicker;
+@property (nonatomic, strong, readonly) SSRatingPicker *ratingPicker;
///-------------------------------
@@ -35,11 +35,11 @@
/**
The text field for the title. (read-only)
*/
-@property (nonatomic, retain, readonly) SSTextField *titleTextField;
+@property (nonatomic, strong, readonly) SSTextField *titleTextField;
/**
The text view for the review. (read-only)
*/
-@property (nonatomic, retain, readonly) SSTextView *reviewTextView;
+@property (nonatomic, strong, readonly) SSTextView *reviewTextView;
@end
Oops, something went wrong.

0 comments on commit df98fab

Please sign in to comment.