Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Started overhauling documentation

  • Loading branch information...
commit bf2d0ec6be4c0485cfb1c2b16a51146819d2408e 1 parent 178e931
@soffes soffes authored
Showing with 652 additions and 820 deletions.
  1. +4 −8 SSToolkit/SSAddressBarTextField.m
  2. +3 −6 SSToolkit/SSAddressBarTextFieldBackgroundView.m
  3. +1 −2  SSToolkit/SSAddressBarTextFieldBackgroundViewInnerView.m
  4. +21 −13 SSToolkit/SSAnimatedImageView.h
  5. +1 −2  SSToolkit/SSAnimatedImageView.m
  6. +2 −6 SSToolkit/SSBadgeTableViewCell.h
  7. +3 −6 SSToolkit/SSBadgeTableViewCell.m
  8. +46 −41 SSToolkit/SSBadgeView.h
  9. +5 −10 SSToolkit/SSBadgeView.m
  10. +21 −12 SSToolkit/SSBordererView.h
  11. +3 −6 SSToolkit/SSBordererView.m
  12. +38 −60 SSToolkit/SSCollectionView.h
  13. +8 −16 SSToolkit/SSCollectionView.m
  14. +2 −6 SSToolkit/SSCollectionViewController.h
  15. +5 −10 SSToolkit/SSCollectionViewController.m
  16. +5 −10 SSToolkit/SSCollectionViewExtremityTableViewCell.m
  17. +25 −38 SSToolkit/SSCollectionViewItem.h
  18. +5 −10 SSToolkit/SSCollectionViewItem.m
  19. +5 −10 SSToolkit/SSCollectionViewItemTableViewCell.m
  20. +7 −11 SSToolkit/SSConcurrentOperation.h
  21. +3 −6 SSToolkit/SSConcurrentOperation.m
  22. +2 −4 SSToolkit/SSDrawingUtilities.h
  23. +25 −25 SSToolkit/SSGradientView.h
  24. +5 −10 SSToolkit/SSGradientView.m
  25. +5 −10 SSToolkit/SSHUDView.m
  26. +4 −8 SSToolkit/SSHUDWindow.m
  27. +12 −24 SSToolkit/SSIndicatorLabel.h
  28. +5 −10 SSToolkit/SSIndicatorLabel.m
  29. +5 −10 SSToolkit/SSLabel.h
  30. +3 −6 SSToolkit/SSLabel.m
  31. +22 −15 SSToolkit/SSLineView.h
  32. +2 −4 SSToolkit/SSLineView.m
  33. +13 −24 SSToolkit/SSLoadingView.h
  34. +3 −6 SSToolkit/SSLoadingView.m
  35. +3 −4 SSToolkit/SSNavigationController.h
  36. +2 −4 SSToolkit/SSNavigationController.m
  37. +6 −6 SSToolkit/SSPickerViewController.h
  38. +6 −12 SSToolkit/SSPickerViewController.m
  39. +33 −16 SSToolkit/SSPieProgressView.h
  40. +11 −7 SSToolkit/SSPieProgressView.m
  41. +4 −8 SSToolkit/SSRatingPicker.m
  42. +4 −8 SSToolkit/SSRatingPickerScrollView.m
  43. +5 −10 SSToolkit/SSRatingPickerViewController.m
  44. +7 −14 SSToolkit/SSSegmentedControl.m
  45. +5 −10 SSToolkit/SSSwitch.m
  46. +5 −9 SSToolkit/SSTableViewController.h
  47. +6 −12 SSToolkit/SSTableViewController.m
  48. +10 −10 SSToolkit/SSTextField.h
  49. +3 −6 SSToolkit/SSTextField.m
  50. +5 −10 SSToolkit/SSTextView.h
  51. +4 −8 SSToolkit/SSTextView.m
  52. +1 −2  SSToolkit/SSViewController.h
  53. +6 −12 SSToolkit/SSViewController.m
  54. +192 −183 SSToolkit/SSWebView.h
  55. +15 −24 SSToolkit/SSWebView.m
View
12 SSToolkit/SSAddressBarTextField.m
@@ -13,8 +13,7 @@
@implementation SSAddressBarTextField
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize loading = _loading;
@@ -33,8 +32,7 @@ - (void)setLoading:(BOOL)isLoading {
@synthesize stopButton = _stopButton;
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (void)dealloc {
self.reloadButton = nil;
@@ -44,8 +42,7 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (id)initWithFrame:(CGRect)aFrame {
if ((self = [super initWithFrame:aFrame])) {
@@ -97,8 +94,7 @@ - (void)layoutSubviews {
}
-#pragma mark -
-#pragma mark UITextField
+#pragma mark - UITextField
- (CGRect)rightViewRectForBounds:(CGRect)bounds {
CGSize size = self.frame.size;
View
9 SSToolkit/SSAddressBarTextFieldBackgroundView.m
@@ -39,8 +39,7 @@ - (void)setLoading:(BOOL)isLoading {
}
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (void)dealloc {
[_innerView release];
@@ -48,8 +47,7 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (id)initWithFrame:(CGRect)aFrame {
if ((self = [super initWithFrame:aFrame])) {
@@ -69,8 +67,7 @@ - (id)initWithFrame:(CGRect)aFrame {
}
-#pragma mark -
-#pragma mark Private Methods
+#pragma mark - Private Methods
- (void)_setupAnimation {
View
3  SSToolkit/SSAddressBarTextFieldBackgroundViewInnerView.m
@@ -11,8 +11,7 @@
@implementation SSAddressBarTextFieldBackgroundViewInnerView
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (id)initWithFrame:(CGRect)aFrame {
if ((self = [super initWithFrame:aFrame])) {
View
34 SSToolkit/SSAnimatedImageView.h
@@ -8,19 +8,23 @@
@protocol SSAnimatedImageViewDelegate;
-/** @brief Animated image view.
+/** Animated image view.
- <code>SSAnimatedImageView</code> is a simple subclass of <code>UIImageView</code> that provides more advanced control
- of image animations. The animation is backed by a <code>CAKeyframeAnimation</code>.
+ `SSAnimatedImageView` is a simple subclass of `UIImageView` that provides more advanced control of image animations.
+ The animation is backed by a `CAKeyframeAnimation`.
This class is a work in progress.
*/
@interface SSAnimatedImageView : UIImageView
-/** @brief Start an image animation.
+///--------------------------
+/// @name Starting Animations
+///--------------------------
+
+/** Start an image animation.
@param animationName The named of the animation.
- @param images An array of <code>UIImage</code>s that will be animated.
+ @param images An array of `UIImage` objects that will be animated.
@param delegate The delegate of the animation.
The duration is set to the appropriate length for playing the images at 30fps.
@@ -28,25 +32,29 @@
- (void)startImageAnimation:(NSString *)animationName images:(NSArray *)images delegate:(id<SSAnimatedImageViewDelegate>)delegate;
-/** @brief Start an image animation with duration and repeat count.
+/** Start an image animation with duration and repeat count.
@param animationName The named of the animation.
- @param images An array of <code>UIImage</code> objects that will be animated.
+ @param images An array of `UIImage` objects that will be animated.
@param duration The duration of the animation.
- @param repeatCount The number of times the animation repeats. Specify <code>0</code> to repeat indefinitely.
+ @param repeatCount The number of times the animation repeats. Specify `0` to repeat indefinitely.
@param delegate The delegate of the animation.
*/
- (void)startImageAnimation:(NSString *)animationName images:(NSArray *)images duration:(NSTimeInterval)duration repeatCount:(NSUInteger)repeatCount delegate:(id<SSAnimatedImageViewDelegate>)delegate;
-/** @brief Start a timed image animation with repeat count.
+///--------------------------------
+/// @name Starting Timed Animations
+///--------------------------------
+
+/** Start a timed image animation with repeat count.
@param animationName The named of the animation.
- @param images An array of <code>UIImage</code>s that will be animated.
- @param keyTimes An array of <code>NSNumber</code> objects that define the duration of each keyframe segment.
- @param repeatCount The number of times the animation repeats. Specify <code>0</code> to repeat indefinitely.
+ @param images An array of `UIImage` objects that will be animated.
+ @param keyTimes An array of `NSNumber` objects that define the duration of each keyframe segment.
+ @param repeatCount The number of times the animation repeats. Specify `0` to repeat indefinitely.
@param delegate The delegate of the animation.
- See <code>CAKeyframeAnimation</code>'s documentation for more information on how to specify <code>keyTimes</code>.
+ See `CAKeyframeAnimation`'s documentation for more information on how to specify `keyTimes`.
*/
- (void)startTimedImageAnimation:(NSString *)animationName images:(NSArray *)images keyTimes:(NSArray *)keyTimes repeatCount:(NSUInteger)repeatCount delegate:(id<SSAnimatedImageViewDelegate>)delegate;
View
3  SSToolkit/SSAnimatedImageView.m
@@ -93,8 +93,7 @@ - (void)startTimedImageAnimation:(NSString *)animationName images:(NSArray *)ima
}
-#pragma mark -
-#pragma mark CAAnimation Delegate
+#pragma mark - CAAnimation Delegate
- (void)animationDidStart:(CAAnimation *)animation {
id<SSAnimatedImageViewDelegate> delegate = [animation valueForKey:@"SSAnimatedImageViewDelegate"];
View
8 SSToolkit/SSBadgeTableViewCell.h
@@ -8,9 +8,7 @@
@class SSBadgeView;
-/**
- @brief Table view cell that displays a badge as its accessory.
- */
+/// Table view cell that displays a `SSBadgeView` as its accessory.
@interface SSBadgeTableViewCell : UITableViewCell {
@private
@@ -18,9 +16,7 @@
SSBadgeView *_badgeView;
}
-/**
- @brief A view that indicates some status to the user. (read-only)
- */
+/// A view that indicates some status to the user. (read-only)
@property (nonatomic, retain, readonly) SSBadgeView *badgeView;
@end
View
9 SSToolkit/SSBadgeTableViewCell.m
@@ -11,14 +11,12 @@
@implementation SSBadgeTableViewCell
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize badgeView = _badgeView;
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (void)dealloc {
[_badgeView release];
@@ -26,8 +24,7 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UITableView
+#pragma mark - UITableView
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) {
View
87 SSToolkit/SSBadgeView.h
@@ -14,17 +14,15 @@ typedef enum {
@class SSLabel;
-/**
- @brief Badge view.
+/** Badge view.
- Provides the accesory view for a SSBadgeTableViewCell, available through the <code>badgeView</code> property.
+ Provides the accesory view for a SSBadgeTableViewCell, available through the `badgeView` property.
- Acts very much like the badges in Mail.app, with the key difference being that Apple uses images and SSBadgeView is
- rendered with CoreGraphics for improved scrolling performance (although images are supported). This also allows for
- more flexible resizing.
-
- Not limited to numbers, strings should still be short enough to fit within the accesoryView bounds.
+ Acts very much like the badges in Mail.app, with the key difference being that Apple uses images and `SSBadgeView` is
+ rendered with Core Graphics for improved scrolling performance (although images are supported). This also allows for
+ more flexible resizing.
*/
+
@interface SSBadgeView : UIView {
@private
@@ -39,13 +37,19 @@ typedef enum {
BOOL _highlighted;
}
-/**
- @brief The badge text label.
+///--------------------------------
+/// @name Accessing the Badge Label
+///--------------------------------
+
+/** The badge text label.
*/
@property (nonatomic, retain, readonly) SSLabel *textLabel;
-/**
- @brief The badge's background color.
+///-------------------------------------
+/// @name Accessing the Badge Attributes
+///-------------------------------------
+
+/** The badge's background color.
The default value of this property is grayish blue (that matches Mail.app).
@@ -53,58 +57,59 @@ typedef enum {
*/
@property (nonatomic, retain) UIColor *badgeColor;
-/**
- @brief The badge's background color while its cell is highlighted.
+/** The badge's background color while its cell is highlighted.
The default value of this property is white.
*/
@property (nonatomic, retain) UIColor *highlightedBadgeColor;
-/**
- @brief The badge's background image.
+/** The corner radius used when rendering the badge's outline.
- The default value of this property is <code>nil</code>. If the value is non-nil, it will be draw instead of the color.
-
- Setting a strechable image for this property is recommended.
+ The default value of this property is 10.
*/
-@property (nonatomic, retain) UIImage *badgeImage;
+@property (nonatomic, assign) CGFloat cornerRadius;
-/**
- @brief The badge's background image while its cell is highlighted.
+/** The badge's horizontal alignment within the accesoryView frame.
- The default value of this property is <code>nil</code>. If the value is non-nil, it will be draw instead of the color.
+ This will position the badge in the view's bounds accordinly.
- Setting a strechable image for this property is recommended.
+ The default value of this property is `SSBadgeViewAlignmentCenter`.
*/
-@property (nonatomic, retain) UIImage *highlightedBadgeImage;
+@property (nonatomic, assign) SSBadgeViewAlignment badgeAlignment;
-/**
- @brief The corner radius used when rendering the badge's outline.
+/** A Boolean value indicating whether the receiver should be drawn with a highlight.
- The default value of this property is 10.
+ Setting this property causes the receiver to redraw with the appropriate highlight state.
+
+ The default value of this property is `NO`.
*/
-@property (nonatomic, assign) CGFloat cornerRadius;
+@property (nonatomic, assign, getter=isHighlighted) BOOL highlighted;
-/**
- @brief The badge's horizontal alignment within the accesoryView frame.
+///---------------------
+/// @name Drawing Images
+///---------------------
+
+/** The badge's background image.
- This will position the badge in the view's bounds accordinly.
+ The default value of this property is `nil`. If the value is non-nil, it will be draw instead of the color.
- The default value of this property is <code>SSBadgeViewAlignmentCenter</code>.
+ Setting a strechable image for this property is recommended.
*/
-@property (nonatomic, assign) SSBadgeViewAlignment badgeAlignment;
+@property (nonatomic, retain) UIImage *badgeImage;
-/**
- @brief A Boolean value indicating whether the receiver should be drawn with a highlight.
+/** The badge's background image while its cell is highlighted.
- Setting this property causes the receiver to redraw with the appropriate highlight state.
+ The default value of this property is `nil`. If the value is non-nil, it will be draw instead of the color.
- The default value of this property is <code>NO</code>.
+ Setting a strechable image for this property is recommended.
*/
-@property (nonatomic, assign, getter=isHighlighted) BOOL highlighted;
+@property (nonatomic, retain) UIImage *highlightedBadgeImage;
+
+///---------------
+/// @name Defaults
+///---------------
-/**
- @brief The default badge color.
+/** The default badge color.
@return A color with its value set to the default badge color.
*/
View
15 SSToolkit/SSBadgeView.m
@@ -12,8 +12,7 @@
@implementation SSBadgeView
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize textLabel = _textLabel;
@@ -82,16 +81,14 @@ - (void)setHighlighted:(BOOL)highlighted {
}
-#pragma mark -
-#pragma mark Class Methods
+#pragma mark - Class Methods
+ (UIColor *)defaultBadgeColor {
return [UIColor colorWithRed:0.541f green:0.596f blue:0.694f alpha:1.0f];
}
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (void)dealloc {
[_textLabel release];
@@ -103,8 +100,7 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (id)initWithFrame:(CGRect)rect {
if ((self = [super initWithFrame:rect])) {
@@ -190,8 +186,7 @@ - (void)willMoveToSuperview:(UIView *)newSuperview {
}
-#pragma mark -
-#pragma mark NSKeyValueObserving
+#pragma mark - NSKeyValueObserving
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
if (object == _textLabel && [keyPath isEqualToString:@"text"]) {
View
33 SSToolkit/SSBordererView.h
@@ -6,10 +6,7 @@
// Copyright 2011 Sam Soffes. All rights reserved.
//
-/**
- @brief Simple UIView for drawing top and bottom borders with optional insets in a view.
- */
-
+/// Simple UIView for drawing top and bottom borders with optional insets in a view.
@interface SSBordererView : UIView {
@private
@@ -20,23 +17,35 @@
UIColor *_bottomBorderColor;
}
-/**
- @brief The top border color. The default is <code>nil</code>.
+///-----------------------------
+/// @name Drawing the Top Border
+///-----------------------------
+
+/** The top border color. The default is `nil`.
+
+ @see bottomBorderColor
*/
@property (nonatomic, retain) UIColor *topBorderColor;
-/**
- @brief The top inset color. The default is <code>nil</code>.
+/** The top inset color. The default is `nil`.
+
+ @see bottomInsetColor
*/
@property (nonatomic, retain) UIColor *topInsetColor;
-/**
- @brief The bottom inset color. The default is <code>nil</code>.
+///--------------------------------
+/// @name Drawing the Bottom Border
+///--------------------------------
+
+/** The bottom inset color. The default is `nil`.
+
+ @see topInsetColor
*/
@property (nonatomic, retain) UIColor *bottomInsetColor;
-/**
- @brief The bottom border color. The default is <code>nil</code>.
+/** The bottom border color. The default is `nil`.
+
+ @see topBorderColor
*/
@property (nonatomic, retain) UIColor *bottomBorderColor;
View
9 SSToolkit/SSBordererView.m
@@ -11,8 +11,7 @@
@implementation SSBordererView
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize topBorderColor = _topBorderColor;
@@ -54,8 +53,7 @@ - (void)setBottomBorderColor:(UIColor *)bottomBorderColor {
}
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (void)dealloc {
[_topBorderColor release];
@@ -66,8 +64,7 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
View
98 SSToolkit/SSCollectionView.h
@@ -23,15 +23,14 @@ typedef enum {
@protocol SSCollectionViewDelegate;
@protocol SSCollectionViewDataSource;
-/**
- @brief Simple collection view.
+/** Simple collection view.
My goals are to be similar to UITableView and NSCollectionView when possible. Only scrolling vertically is currently
supported.
Editing will be my next focus. Then animating changes when data changes and an option to disable that.
- Note: NSIndexPath is uses the same way UITableView uses it. The <code>row</code> property is used to specify the item
+ Note: NSIndexPath is uses the same way UITableView uses it. The `row` property is used to specify the item
instead of row. This is done to make working with other classes that use NSIndexPath (like NSFetchedResultsController)
easier.
*/
@@ -53,83 +52,71 @@ typedef enum {
UITableView *_tableView;
}
-/**
- @brief The object that acts as the data source of the receiving collection view.
+/** The object that acts as the data source of the receiving collection view.
*/
@property (nonatomic, assign) id<SSCollectionViewDataSource> dataSource;
-/**
- @brief The object that acts as the delegate of the receiving collection view.
+/** The object that acts as the delegate of the receiving collection view.
*/
@property (nonatomic, assign) id<SSCollectionViewDelegate> delegate;
-/**
- @brief The style of the receiving collection view's headers and footers.
+/** The style of the receiving collection view's headers and footers.
- Setting to <code>SSCollectionViewExtremitiesStyleFixed</code> will cause the headers and footer to behave like a
- <code>UITableView</code> with its style set to <code>UITableViewStylePlain</code>. Setting to
- <code>SSCollectionViewExtremitiesStyleScrolling</code> will cause the headers and footer to behave like a
- <code>UITableView</code> with its style set to <code>UITableViewStyleGrouped</code>. The default is
- <code>SSCollectionViewExtremitiesStyleFixed</code>.
+ Setting to `SSCollectionViewExtremitiesStyleFixed` will cause the headers and footer to behave like a
+ `UITableView` with its style set to `UITableViewStylePlain`. Setting to
+ `SSCollectionViewExtremitiesStyleScrolling` will cause the headers and footer to behave like a
+ `UITableView` with its style set to `UITableViewStyleGrouped`. The default is
+ `SSCollectionViewExtremitiesStyleFixed`.
*/
@property (nonatomic, assign) SSCollectionViewExtremitiesStyle extremitiesStyle;
-/**
- @brief The minimum column spacing.
+/** The minimum column spacing.
The default is 0.
*/
@property (nonatomic, assign) CGFloat minimumColumnSpacing;
-/**
- @brief The spacing between each row in the receiver. This does not add space above the first row or below the last.
+/** The spacing between each row in the receiver. This does not add space above the first row or below the last.
The row spacing is in points. The default is 20.
*/
@property (nonatomic, assign) CGFloat rowSpacing;
-/**
- @brief The background view of the collection view.
+/** The background view of the collection view.
*/
@property (nonatomic, retain) UIView *backgroundView;
-/**
- @brief A Boolean value that determines whether selecting items is enabled.
+/** A Boolean value that determines whether selecting items is enabled.
- If the value of this property is <code>YES</code>, selecting is enabled, and if it is <code>NO</code>, selecting is
- disabled. The default is <code>YES</code>.
+ If the value of this property is `YES`, selecting is enabled, and if it is `NO`, selecting is
+ disabled. The default is `YES`.
*/
@property (nonatomic, assign) BOOL allowsSelection;
-/**
- @brief The internal scroll view of the collection view. The delegate must not be overridden.
+/** The internal scroll view of the collection view. The delegate must not be overridden.
*/
@property (nonatomic, retain, readonly) UIScrollView *scrollView;
-/**
- @brief The number of sections in the collection view.
+/** The number of sections in the collection view.
- <code>SSCollectionView</code> gets the value returned by this method from its data source and caches it.
+ `SSCollectionView` gets the value returned by this method from its data source and caches it.
*/
@property (nonatomic, assign, readonly) NSUInteger numberOfSections;
-/**
- @brief Reloads the items and sections of the receiver.
+/** Reloads the items and sections of the receiver.
*/
- (void)reloadData;
-/**
- @brief Returns a reusable collection view item object located by its identifier.
+/** Returns a reusable collection view item object located by its identifier.
@param identifier A string identifying the cell object to be reused.
- @return A <code>SSCollectionViewItem</code< object with the associated identifier or nil if no such object exists in
+ @return A `SSCollectionViewItem</code< object with the associated identifier or nil if no such object exists in
the reusable-item queue.
*/
- (SSCollectionViewItem *)dequeueReusableItemWithIdentifier:(NSString *)identifier;
-/**
- @brief Returns the collection view item at the specified index path.
+/** Returns the collection view item at the specified index path.
@param indexPath The index path locating the item in the receiver.
@@ -139,8 +126,7 @@ typedef enum {
*/
- (SSCollectionViewItem *)itemPathForIndex:(NSIndexPath *)indexPath;
-/**
- @brief Returns an index path representing the row (index) and section of a given collection view item.
+/** Returns an index path representing the row (index) and section of a given collection view item.
@param item An item object of the collection view.
@@ -150,50 +136,45 @@ typedef enum {
*/
- (NSIndexPath *)indexPathForItem:(SSCollectionViewItem *)item;
-/**
- @brief Selects an item in the receiver identified by index path, optionally scrolling the item to a location in the
+/** Selects an item in the receiver identified by index path, optionally scrolling the item to a location in the
receiver.
@param indexPath An index path identifying an item in the receiver.
- @param animated <code>YES</code> if you want to animate the selection and any change in position, <code>NO</code> if
+ @param animated `YES` if you want to animate the selection and any change in position, `NO` if
the change should be immediate.
@param scrollPosition A constant that identifies a relative position in the receiving collection view (top, middle,
bottom) for the row when scrolling concludes.
- Calling this method does cause the delegate to receive a <code>collectionView:willSelectRowAtIndexPath:</code> and
- <code>collectionView:didSelectRowAtIndexPath:</code> message, which differs from <code>UITableView</code>.
+ Calling this method does cause the delegate to receive a `collectionView:willSelectRowAtIndexPath:` and
+ `collectionView:didSelectRowAtIndexPath:` message, which differs from `UITableView`.
*/
- (void)selectItemAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated scrollPosition:(SSCollectionViewScrollPosition)scrollPosition;
-/**
- @brief Deselects a given item identified by index path, with an option to animate the deselection.
+/** Deselects a given item identified by index path, with an option to animate the deselection.
@param indexPath An index path identifying an item in the receiver.
- @param animated <code>YES</code> if you want to animate the deselection and <code>NO</code> if the change should be
+ @param animated `YES` if you want to animate the deselection and `NO` if the change should be
immediate.
*/
- (void)deselectItemAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated;
-/**
- @brief Scrolls the receiver until an item identified by index path is at a particular location on the screen.
+/** Scrolls the receiver until an item identified by index path is at a particular location on the screen.
@param indexPath An index path that identifies an item in the table view by its row index and its section index.
@param scrollPosition A constant that identifies a relative position in the receiving collection view (top, middle,
bottom) for row when scrolling concludes.
- @param animated <code>YES</code> if you want to animate the change in position, <code>NO</code> if it should be
+ @param animated `YES` if you want to animate the change in position, `NO` if it should be
immediate.
*/
- (void)scrollToItemAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(SSCollectionViewScrollPosition)scrollPosition animated:(BOOL)animated;
-/**
- @brief Reloads the specified item.
+/** Reloads the specified item.
- @param indexPath An index path that identifies an item in the collection view by its row index and its section index.
+ @param indexPaths An index path that identifies an item in the collection view by its row index and its section index.
*/
- (void)reloadItemsAtIndexPaths:(NSArray *)indexPaths;
-/**
- @brief Returns the number of item (collection view items) in a specified section.
+/** Returns the number of item (collection view items) in a specified section.
@param section An index number that identifies a section of the collection.
@@ -201,8 +182,7 @@ typedef enum {
*/
- (NSUInteger)numberOfItemsInSection:(NSUInteger)section;
-/**
- @brief Returns the drawing area for a specified section of the receiver.
+/** Returns the drawing area for a specified section of the receiver.
@param section An index number identifying a section of the collection view.
@@ -210,8 +190,7 @@ typedef enum {
*/
- (CGRect)rectForSection:(NSUInteger)section;
-/**
- @brief Returns the drawing area for the header of the specified section.
+/** Returns the drawing area for the header of the specified section.
@param section An index number identifying a section of the collection view.
@@ -219,8 +198,7 @@ typedef enum {
*/
- (CGRect)rectForHeaderInSection:(NSUInteger)section;
-/**
- @brief Returns the drawing area for the footer of the specified section.
+/** Returns the drawing area for the footer of the specified section.
@param section An index number identifying a section of the collection view.
View
24 SSToolkit/SSCollectionView.m
@@ -50,8 +50,7 @@ - (void)_setSectionInfoItem:(id)object forKey:(NSString *)key section:(NSUIntege
@implementation SSCollectionView
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize dataSource = _dataSource;
@@ -112,8 +111,7 @@ - (void)setExtremitiesStyle:(SSCollectionViewExtremitiesStyle)style {
}
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (void)dealloc {
self.dataSource = nil;
@@ -139,8 +137,7 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (id)initWithFrame:(CGRect)frame {
if ((self = [super initWithFrame:frame])) {
@@ -175,8 +172,7 @@ - (void)setFrame:(CGRect)frame {
}
-#pragma mark -
-#pragma mark SSCollectionView
+#pragma mark - SSCollectionView
- (void)reloadData {
[_sectionCache removeAllObjects];
@@ -317,8 +313,7 @@ - (CGRect)rectForFooterInSection:(NSUInteger)section {
}
-#pragma mark -
-#pragma mark Private Methods
+#pragma mark - Private Methods
- (void)_reuseItem:(SSCollectionViewItem *)item {
[_visibleItems removeObject:item];
@@ -544,8 +539,7 @@ - (void)_setSectionInfoItem:(id)object forKey:(NSString *)key section:(NSUIntege
}
-#pragma mark -
-#pragma mark UITableViewDataSource
+#pragma mark - UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return (NSInteger)[self numberOfSections];
@@ -590,8 +584,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
}
-#pragma mark -
-#pragma mark UITableViewDelegate
+#pragma mark - UITableViewDelegate
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)rowIndexPath {
// If scrolling extremity style, provide the height for the extermity
@@ -702,8 +695,7 @@ - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSIntege
}
-#pragma mark -
-#pragma mark UIScrollViewDelegate
+#pragma mark - UIScrollViewDelegate
- (void)scrollViewDidScroll:(UIScrollView *)aScrollView {
if ([_delegate respondsToSelector:@selector(scrollViewDidScroll:)]) {
View
8 SSToolkit/SSCollectionViewController.h
@@ -9,9 +9,7 @@
#import "SSViewController.h"
#import "SSCollectionView.h"
-/**
- @brief Creates a controller object that manages a collection view.
- */
+/// Creates a controller object that manages a collection view.
@interface SSCollectionViewController : SSViewController <SSCollectionViewDataSource, SSCollectionViewDelegate> {
@private
@@ -19,9 +17,7 @@
SSCollectionView *_collectionView;
}
-/**
- @brief Returns the table view managed by the controller object.
- */
+/// Returns the table view managed by the controller object.
@property (nonatomic, retain, readonly) SSCollectionView *collectionView;
@end
View
15 SSToolkit/SSCollectionViewController.m
@@ -11,14 +11,12 @@
@implementation SSCollectionViewController
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize collectionView = _collectionView;
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (void)dealloc {
_collectionView.dataSource = nil;
@@ -28,8 +26,7 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UIViewController
+#pragma mark - UIViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
@@ -54,8 +51,7 @@ - (void)viewDidAppear:(BOOL)animated {
}
-#pragma mark -
-#pragma mark SSCollectionViewDataSource
+#pragma mark - SSCollectionViewDataSource
- (NSUInteger)collectionView:(SSCollectionView *)aCollectionView numberOfItemsInSection:(NSUInteger)section {
return 0;
@@ -67,8 +63,7 @@ - (SSCollectionViewItem *)collectionView:(SSCollectionView *)aCollectionView ite
}
-#pragma mark -
-#pragma mark SSCollectionViewDelegate
+#pragma mark - SSCollectionViewDelegate
- (CGSize)collectionView:(SSCollectionView *)aCollectionView itemSizeForSection:(NSUInteger)section {
return CGSizeZero;
View
15 SSToolkit/SSCollectionViewExtremityTableViewCell.m
@@ -10,8 +10,7 @@
@implementation SSCollectionViewExtremityTableViewCell
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize extrimityView = _extrimityView;
@@ -23,8 +22,7 @@ - (void)setExtrimityView:(UIView *)view {
}
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (void)dealloc {
[_extrimityView release];
@@ -32,16 +30,14 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (void)layoutSubviews {
_extrimityView.frame = self.bounds;
}
-#pragma mark -
-#pragma mark UITableViewCell
+#pragma mark - UITableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if ((self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier])) {
@@ -63,8 +59,7 @@ - (void)prepareForReuse {
}
-#pragma mark -
-#pragma mark Initializer
+#pragma mark - Initializer
- (id)initWithReuseIdentifier:(NSString *)aReuseIdentifier {
self = [self initWithStyle:UITableViewCellStyleDefault reuseIdentifier:aReuseIdentifier];
View
63 SSToolkit/SSCollectionViewItem.h
@@ -16,8 +16,7 @@ typedef enum {
@class SSLabel;
@class SSCollectionView;
-/**
- @brief View for display in a collection view.
+/** View for display in a collection view.
*/
@interface SSCollectionViewItem : UIView {
@@ -39,40 +38,35 @@ typedef enum {
NSIndexPath *_indexPath;
}
-/**
- @brief Returns the image view of the collection view item. (read-only)
+/** Returns the image view of the collection view item. (read-only)
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;
-/**
- @brief Returns the label used for the main textual content of the table cell. (read-only)
+/** 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;
-/**
- @brief Returns the secondary label of the collection view item. (read-only)
+/** 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;
-/**
- @brief The view used as the background of the item.
+/** 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;
-/**
- @brief The view used as the background of the item when it is selected.
+/** The view used as the background of the item when it is selected.
The default is nil. SSCollectionViewItem adds the value of this property as a subview only when the
cell is selected. It adds the selected background view as a subview directly above the background
@@ -81,8 +75,7 @@ typedef enum {
*/
@property (nonatomic, retain) UIView *selectedBackgroundView;
-/**
- @brief A string used to identify an item that is reusable. (read-only)
+/** A string used to identify an item that is reusable. (read-only)
The reuse identifier is associated with a SSCollectionViewItem object that the collection view's
delegate creates with the intent to reuse it as the basis (for performance reasons) for multiple
@@ -93,22 +86,20 @@ typedef enum {
*/
@property (nonatomic, readonly, copy) NSString *reuseIdentifier;
-/**
- @brief A Boolean value that indicates whether the cell is selected.
+/** A Boolean value that indicates whether the cell is selected.
The selection affects the appearance of labels, image, and background. The default value is
- <code>NO</code>.
+ `NO`.
@see setSelected:animated:
*/
@property (nonatomic, getter=isSelected) BOOL selected;
-/**
- @brief A Boolean value that indicates whether the item is highlighted.
+/** A Boolean value that indicates whether the item is highlighted.
The highlighting affects the appearance of labels, image, and background. When the the highlighted
- state of an item is set to <code>YES</code>, labels are drawn in their highlighted text color. The
- default value is <code>NO</code>. If you set the highlighted state to <code>YES</code> through this
+ state of an item is set to `YES`, labels are drawn in their highlighted text color. The
+ default value is `NO`. If you set the highlighted state to `YES` through this
property, the transition to the new state appearance is not animated. For animated highlighted-state
transitions, see the setHighlighted:animated: method.
@@ -121,13 +112,12 @@ typedef enum {
*/
@property (nonatomic, getter=isHighlighted) BOOL highlighted;
-/**
- @brief Initializes a collection view item with a style and a reuse identifier and returns it to
+/** Initializes a collection view item with a style and a reuse identifier and returns it to
the caller.
@param style A constant indicating a item style.
- @param reuseIdentifier A string used to identify the item object if it is to be reused for drawing
+ @param aReuseIdentifier A string used to identify the item object if it is to be reused for drawing
multiple items of a collection view. Pass nil if the cell object is not to be reused. You should
use the same reuse identifier for all cells of the same form.
@@ -135,37 +125,34 @@ typedef enum {
*/
- (id)initWithStyle:(SSCollectionViewItemStyle)style reuseIdentifier:(NSString *)aReuseIdentifier;
-/**
- @brief Prepares a reusable item for reuse by the table view's delegate.
+/** Prepares a reusable item for reuse by the table view's delegate.
*/
- (void)prepareForReuse;
-/**
- @brief Sets the selected state of the item, optionally animating the transition between states.
+/** Sets the selected state of the item, optionally animating the transition between states.
- @param selected <code>YES</code> to set the item as selected, <code>NO</code> to set it as unselected.
- The default is <code>NO</code>.
+ @param selected `YES` to set the item as selected, `NO` to set it as unselected.
+ The default is `NO`.
- @param animated <code>YES</code> to animate the transition between selected states, <code>NO</code> to
+ @param animated `YES` to animate the transition between selected states, `NO` to
make the transition immediate.
The selection affects the appearance of labels, image, and background. When the the selected state
- of a cell to <code>YES</code>, it draws the background for selected items with its title in its
+ of a cell to `YES`, it draws the background for selected items with its title in its
highlightedTextColor.
*/
- (void)setSelected:(BOOL)selected animated:(BOOL)animated;
-/**
- @brief Sets the highlighted state of the item, optionally animating the transition between states.
+/** Sets the highlighted state of the item, optionally animating the transition between states.
- @param highlighted <code>YES</code> to set the item as highlighted, <code>NO</code> to set it as
- unhighlighted. The default is <code>NO</code>.
+ @param highlighted `YES` to set the item as highlighted, `NO` to set it as
+ unhighlighted. The default is `NO`.
- @param animated <code>YES</code> to animate the transition between highlighted states, <code>NO</code>
+ @param animated `YES` to animate the transition between highlighted states, `NO`
to make the transition immediate.
Highlights or unhighlights the item, animating the transition between regular and highlighted state if
- animated is <code>YES</code>. Highlighting affects the appearance of the items's labels, image, and
+ animated is `YES`. Highlighting affects the appearance of the items's labels, image, and
background.
Note that for highlighting to work properly, you must fetch the item's label (or labels) using the
View
15 SSToolkit/SSCollectionViewItem.m
@@ -15,8 +15,7 @@
@implementation SSCollectionViewItem
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize imageView = _imageView;
@synthesize textLabel = _textLabel;
@@ -29,8 +28,7 @@ @implementation SSCollectionViewItem
@synthesize indexPath = _indexPath;
@synthesize collectionView = _collectionView;
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (void)dealloc {
self.collectionView = nil;
@@ -45,8 +43,7 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UIResponder
+#pragma mark - UIResponder
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[self setHighlighted:YES animated:NO];
@@ -67,8 +64,7 @@ - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
}
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (id)initWithFrame:(CGRect)frame {
return [self initWithStyle:SSCollectionViewItemStyleDefault reuseIdentifier:nil];
@@ -82,8 +78,7 @@ - (void)layoutSubviews {
}
-#pragma mark -
-#pragma mark SSCollectionViewItem
+#pragma mark - SSCollectionViewItem
- (id)initWithStyle:(SSCollectionViewItemStyle)style reuseIdentifier:(NSString *)aReuseIdentifier {
if ((self = [super initWithFrame:CGRectZero])) {
View
15 SSToolkit/SSCollectionViewItemTableViewCell.m
@@ -13,8 +13,7 @@
@implementation SSCollectionViewItemTableViewCell
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize itemSize = _itemSize;
@synthesize itemSpacing = _itemSpacing;
@@ -40,8 +39,7 @@ - (void)setItems:(NSArray *)someItems {
@synthesize collectionView = _collectionView;
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (void)dealloc {
self.collectionView = nil;
@@ -50,8 +48,7 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (void)layoutSubviews {
CGFloat x = _itemSpacing;
@@ -63,8 +60,7 @@ - (void)layoutSubviews {
}
-#pragma mark -
-#pragma mark UITableViewCell
+#pragma mark - UITableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if ((self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier])) {
@@ -90,8 +86,7 @@ - (void)prepareForReuse {
}
-#pragma mark -
-#pragma mark Initializer
+#pragma mark - Initializer
- (id)initWithReuseIdentifier:(NSString *)aReuseIdentifier {
self = [self initWithStyle:UITableViewCellStyleDefault reuseIdentifier:aReuseIdentifier];
View
18 SSToolkit/SSConcurrentOperation.h
@@ -6,14 +6,12 @@
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//
-/**
- @brief A simple wrapper for concurrent NSOperations
+/** A simple wrapper for concurrent NSOperations
Subclasses should override the start and stop methods. Here is
a basic example.
- @code
- - (void)start {
+ <pre><code>- (void)start {
[super start];
networkRequest = [[NetworkRequest alloc] init];
[networkRequest start];
@@ -23,8 +21,7 @@
[networkRequest cancel];
[networkRequest release];
[super finish];
- }
- @endcode
+ }</code></pre>
This allows for convenient handling of asynchronous calls in an operation.
*/
@@ -36,12 +33,11 @@
BOOL _isFinished;
}
-/**
- @brief Finishes the receiver's task.
+/** Finishes the receiver's task.
- Subclasses must implement their own versions of finish to clean up anything
- before the operation completes. After performing the class-specific functionality,
- the subclass method should incorporate superclass versions of finish through a message to super.
+ Subclasses must implement their own versions of `finish` to clean up anything before the operation completes. After
+ performing the class-specific functionality, the subclass method should incorporate superclass versions of `finish`
+ through a message to `super`.
*/
- (void)finish;
View
9 SSToolkit/SSConcurrentOperation.m
@@ -10,8 +10,7 @@
@implementation SSConcurrentOperation
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (id)init {
if ((self = [super init])) {
@@ -22,8 +21,7 @@ - (id)init {
}
-#pragma mark -
-#pragma mark NSOperation
+#pragma mark - NSOperation
- (BOOL)isConcurrent {
return YES;
@@ -47,8 +45,7 @@ - (void)start {
}
-#pragma mark -
-#pragma mark SSConcurrentOperation
+#pragma mark - SSConcurrentOperation
- (void)finish {
[self willChangeValueForKey:@"isExecuting"];
View
6 SSToolkit/SSDrawingUtilities.h
@@ -9,15 +9,13 @@
#ifndef SSDRAWINGUTILITIES
#define SSDRAWINGUTILITIES
-/**
- A macro that converts a number from degress to radians.
+/** A macro that converts a number from degress to radians.
@param d number in degrees
@returns The number converted to radians.
*/
#define DEGREES_TO_RADIANS(d) ((d) * 0.0174532925199432958f)
-/**
- A macro that converts a number from radians to degrees.
+/** A macro that converts a number from radians to degrees.
@param r number in radians
@returns The number converted to degrees.
*/
View
50 SSToolkit/SSGradientView.h
@@ -5,8 +5,6 @@
// Created by Sam Soffes on 10/27/09.
// Copyright 2009-2011 Sam Soffes. All rights reserved.
//
-// Greatly inspired by BWGradientBox. http://brandonwalkin.com/bwtoolkit
-//
#import "SSBordererView.h"
@@ -15,9 +13,7 @@ typedef enum {
SSGradientViewDirectionVertical
} SSGradientViewDirection;
-/**
- @brief Simple UIView wrapper for CGGradient.
- */
+/// Simple `UIView` wrapper for `CGGradient`.
@interface SSGradientView : SSBordererView {
@private
@@ -29,45 +25,49 @@ typedef enum {
CGGradientRef _gradient;
}
-/**
- @brief An array of <code>UIColor</code> objects used to draw the gradient. If the value is <code>nil</code>, the
- <code>backgroundColor</code> will be drawn instead of a gradient. The default is <code>nil</code>.
+///---------------------------
+/// @name Drawing the Gradient
+///-------------------------
+
+/** An array of `UIColor` objects used to draw the gradient. If the value is `nil`, the
+ `backgroundColor` will be drawn instead of a gradient.
+
+ The default is `nil`.
*/
@property (nonatomic, copy) NSArray *colors;
-/**
- @brief An optional array of NSNumber objects defining the location of each gradient stop.
+/** An optional array of `NSNumber` objects defining the location of each gradient stop.
- The gradient stops are specified as values between <code>0</code> and <code>1</code>. The values must be monotonically
- increasing. If <code>nil</code>, the stops are spread uniformly across the range. Defaults to <code>nil</code>.
+ The gradient stops are specified as values between `0` and `1`. The values must be monotonically
+ increasing. If `nil`, the stops are spread uniformly across the range. Defaults to `nil`.
*/
@property (nonatomic, copy) NSArray *locations;
-/**
- @brief The direction of the gradient.
+/** The direction of the gradient.
- The default is <code>SSGradientViewDirectionHorizontal</code>.
+ The default is `SSGradientViewDirectionHorizontal`.
*/
@property (nonatomic, assign) SSGradientViewDirection direction;
+///-------------------------
+/// @name Deprecated Methods
+///-------------------------
-#pragma mark -
-#pragma mark Deprecated
-
-/**
- @brief The top gradient color. The default is <code>nil</code>. DEPRECATED.
+/** The top gradient color. This method is deprecated.
+
+ The default is `nil`.
*/
@property (nonatomic, retain) UIColor *topColor;
-/**
- @brief The bottom gradient color. The default is <code>nil</code>. DEPRECATED.
+/** The bottom gradient color. This method is deprecated.
+
+ The default is `nil`.
*/
@property (nonatomic, retain) UIColor *bottomColor;
-/**
- @brief The scale of the gradient. DEPRECATED.
+/** The scale of the gradient. This method is deprecated.
- The default is <code>1.0</code>.
+ The default is `1.0`.
*/
@property (nonatomic, assign) CGFloat gradientScale;
View
15 SSToolkit/SSGradientView.m
@@ -16,8 +16,7 @@ - (void)_refreshGradient;
@implementation SSGradientView
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize colors = _colors;
@@ -45,8 +44,7 @@ - (void)setDirection:(SSGradientViewDirection)direction {
}
-#pragma mark -
-#pragma mark Deprecated Accessors
+#pragma mark - Deprecated Accessors
- (CGFloat)gradientScale {
if ([self.locations count] == 2) {
@@ -113,8 +111,7 @@ - (void)setBottomColor:(UIColor *)bottomColor {
}
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (void)dealloc {
[_colors release];
@@ -127,8 +124,7 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (id)initWithFrame:(CGRect)frame {
@@ -155,8 +151,7 @@ - (void)drawRect:(CGRect)rect {
}
-#pragma mark -
-#pragma mark Gradient Methods
+#pragma mark - Gradient Methods
- (void)_refreshGradient {
CGGradientRelease(_gradient);
View
15 SSToolkit/SSHUDView.m
@@ -22,8 +22,7 @@ - (void)_removeWindow;
@implementation SSHUDView
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize textLabel = _textLabel;
@@ -62,8 +61,7 @@ - (void)setHidesVignette:(BOOL)hide {
}
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (id)init {
return [self initWithTitle:nil loading:YES];
@@ -82,8 +80,7 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (id)initWithFrame:(CGRect)frame {
return [self initWithTitle:nil loading:YES];
@@ -138,8 +135,7 @@ - (void)layoutSubviews {
}
-#pragma mark -
-#pragma mark HUD
+#pragma mark - HUD
- (id)initWithTitle:(NSString *)aTitle {
return [self initWithTitle:aTitle loading:YES];
@@ -299,8 +295,7 @@ - (void)dismissAnimated:(BOOL)animated {
}
-#pragma mark -
-#pragma mark Private Methods
+#pragma mark - Private Methods
- (void)_setTransformForCurrentOrientation:(BOOL)animated {
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
View
12 SSToolkit/SSHUDWindow.m
@@ -13,8 +13,7 @@
@implementation SSHUDWindow
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize hidesVignette = _hidesVignette;
@@ -25,8 +24,7 @@ - (void)setHidesVignette:(BOOL)hide {
}
-#pragma mark -
-#pragma mark Class Methods
+#pragma mark - Class Methods
+ (SSHUDWindow *)defaultWindow {
if (!kHUDWindow) {
@@ -36,8 +34,7 @@ + (SSHUDWindow *)defaultWindow {
}
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (id)init {
if ((self = [super initWithFrame:[[UIScreen mainScreen] bounds]])) {
@@ -48,8 +45,7 @@ - (id)init {
}
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (void)drawRect:(CGRect)rect {
if (_hidesVignette) {
View
36 SSToolkit/SSIndicatorLabel.h
@@ -6,13 +6,11 @@
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//
-/**
- @brief This class is a nice little view that makes showing an
- activity indicator next to a label when loading something easy.
+/** This class is a nice little view that makes showing an activity indicator next to a label when loading something
+ easy.
- The indicator will slide in from the left when loading and then
- back out when it is complete. This is great for a view that shows
- some sort of status that can refresh.
+ The indicator will slide in from the left when loading and then back out when it is complete. This is great for a view
+ that shows some sort of status that can refresh.
*/
@interface SSIndicatorLabel : UIView {
@@ -23,37 +21,27 @@
BOOL _loading;
}
-/**
- @brief Returns the label used for the main textual content of the view.
- (read-only)
- */
+/// Returns the label used for the main textual content of the view. (read-only)
@property (nonatomic, retain, readonly) UILabel *textLabel;
-/**
- @brief A view that indicates loading activity to the user. (read-only)
- */
+/// A view that indicates loading activity to the user. (read-only)
@property (nonatomic, retain, readonly) UIActivityIndicatorView *activityIndicatorView;
-/**
- @brief A Boolean value that determines whether the view is loading.
+/** A Boolean value that determines whether the view is loading.
- The default value is <code>NO</code>.
+ The default value is `NO`.
*/
@property (nonatomic, assign, getter=isLoading) BOOL loading;
-/**
- @brief Starts loading and updates the text of the text label.
+/** Starts loading and updates the text of the text label.
- @param text String to update the <code>textLabel</code>'s <code>text</code>
- property to.
+ @param text String to update the `textLabel`'s `text` property to.
*/
- (void)startWithText:(NSString *)text;
-/**
- @brief Completes loading and updates the text of the text label.
+/** Completes loading and updates the text of the text label.
- @param text String to update the <code>textLabel</code>'s <code>text</code>
- property to.
+ @param text String to update the `textLabel`'s `text` property to.
*/
- (void)completeWithText:(NSString *)text;
View
15 SSToolkit/SSIndicatorLabel.m
@@ -15,8 +15,7 @@ + (CGFloat)padding;
@implementation SSIndicatorLabel
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize textLabel = _textLabel;
@synthesize activityIndicatorView = _activityIndicatorView;
@@ -35,8 +34,7 @@ - (void)setLoading:(BOOL)l {
}
-#pragma mark -
-#pragma mark Class Methods
+#pragma mark - Class Methods
+ (CGSize)indicatorSize {
return CGSizeMake(20.0f, 20.0f);
@@ -48,8 +46,7 @@ + (CGFloat)padding {
}
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (void)dealloc {
[_textLabel release];
@@ -58,8 +55,7 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (id)initWithFrame:(CGRect)rect {
if ((self = [super initWithFrame:rect])) {
@@ -112,8 +108,7 @@ - (void)setOpaque:(BOOL)o {
}
-#pragma mark -
-#pragma mark Status
+#pragma mark - Status
- (void)startWithText:(NSString *)text {
self.loading = YES;
View
15 SSToolkit/SSLabel.h
@@ -12,10 +12,7 @@ typedef enum {
SSLabelVerticalTextAlignmentBottom = UIControlContentVerticalAlignmentBottom
} SSLabelVerticalTextAlignment;
-/**
- @brief Simple label subclass that adds the ability to align your text
- to the top or bottom.
- */
+/// Simple label subclass that adds the ability to align your text to the top or bottom.
@interface SSLabel : UILabel {
@private
@@ -24,17 +21,15 @@ typedef enum {
UIEdgeInsets _textEdgeInsets;
}
-/**
- @brief The vertical text alignment of the receiver.
+/** The vertical text alignment of the receiver.
- The default is SSLabelVerticalTextAlignmentMiddle to match UILabel.
+ The default is `SSLabelVerticalTextAlignmentMiddle` to match `UILabel`.
*/
@property (nonatomic, assign) SSLabelVerticalTextAlignment verticalTextAlignment;
-/**
- @brief The edge insets of the text.
+/** The edge insets of the text.
- The default is UIEdgeInsetsZero so it behaves like UILabel by default.
+ The default is `UIEdgeInsetsZero` so it behaves like `UILabel` by default.
*/
@property (nonatomic, assign) UIEdgeInsets textEdgeInsets;
View
9 SSToolkit/SSLabel.m
@@ -10,8 +10,7 @@
@implementation SSLabel
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize verticalTextAlignment = _verticalTextAlignment;
@@ -31,8 +30,7 @@ - (void)setTextEdgeInsets:(UIEdgeInsets)textEdgeInsets {
}
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (id)initWithFrame:(CGRect)aFrame {
if ((self = [super initWithFrame:aFrame])) {
@@ -43,8 +41,7 @@ - (id)initWithFrame:(CGRect)aFrame {
}
-#pragma mark -
-#pragma mark UILabel
+#pragma mark - UILabel
- (void)drawTextInRect:(CGRect)rect {
rect = UIEdgeInsetsInsetRect(rect, _textEdgeInsets);
View
37 SSToolkit/SSLineView.h
@@ -6,12 +6,11 @@
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//
-/**
- @brief Don't under estimate this class. It draws lines, but they are awesome.
+/** Don't under estimate this class. It draws lines, but they are awesome.
- The recommended height is 2 points if you are using the inset and 1 if you are not.
+ The recommended height is `2.0` points if you are using the inset and `1.0` if you are not.
- The inset is drawn under the line if showInset is set to YES.
+ The inset is drawn under the line if `insetColor` is not `nil`.
*/
@interface SSLineView : UIView {
@@ -23,35 +22,43 @@
NSArray *_dashLengths;
}
-/**
- @brief The primary color of the line.
+///--------------------
+/// @name Drawing Lines
+///--------------------
+
+/** The primary color of the line.
+
+ The default is `[UIColor grayColor]`.
*/
@property (nonatomic, retain) UIColor *lineColor;
-/**
- @brief The color of the line inset. The default is 50% opaque white.
+/** The color of the line inset.
+
+ The default is 50% opaque white.
*/
@property (nonatomic, retain) UIColor *insetColor;
-/**
- @brief A float that specifies how far into the dash pattern the line starts, in points.
+///---------------------
+/// @name Drawing Dashes
+///---------------------
+
+/** A float that specifies how far into the dash pattern the line starts, in points.
For example, passing a value of 3 means the line is drawn with the dash pattern starting at 3 points from its
beginning. Passing a value of 0 draws a line starting with the beginning of a dash pattern.
- The default is <code>0.0</code>.
+ The default is `0.0`.
*/
@property (nonatomic, assign) CGFloat dashPhase;
-/**
- @brief An array of values that specify the lengths of the painted segments and unpainted segments, respectively, of the
- dash pattern—or <code>nil</code> for no dash pattern.
+/** An array of values that specify the lengths of the painted segments and unpainted segments, respectively, of the
+ dash pattern—or `nil` for no dash pattern.
For example, passing an array with the values [2,3] sets a dash pattern that alternates between a 2 point long painted
segment and a 3 point long unpainted segment. Passing the values [1,3,4,2] sets the pattern to a 1 point painted
segment, a 3 point unpainted segment, a 4 oiunt painted segment, and a 2 point unpainted segment.
- The default is <code>nil</code>.
+ The default is `nil`.
*/
@property (nonatomic, copy) NSArray *dashLengths;
View
6 SSToolkit/SSLineView.m
@@ -49,8 +49,7 @@ - (void)setDashLengths:(NSArray *)dashLengths {
}
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (void)dealloc {
[_lineColor release];
@@ -60,8 +59,7 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (id)initWithFrame:(CGRect)frame {
if ((self = [super initWithFrame:frame])) {
View
37 SSToolkit/SSLoadingView.h
@@ -6,10 +6,8 @@
// Copyright 2009-2011 Sam Soffes. All rights reserved.
//
-/**
- @brief easy view to show loading similar to the loading screens
- in the iTunes or App Store applications. The view is intended to cover
- another view while it is loading and the removed once loading is complete.
+/** An easy view to show loading similar to the loading screens in the iTunes or App Store applications. The view is
+ intended to cover another view while it is loading and the removed once loading is complete.
This view will automatically center the text and the activity indicator.
*/
@@ -25,44 +23,35 @@
CGSize _shadowOffset;
}
-/**
- @brief A view that indicates loading activity to the user. (read-only)
- */
+/// A view that indicates loading activity to the user. (read-only)
@property (nonatomic, retain, readonly) UIActivityIndicatorView *activityIndicatorView;
-/**
- @brief The text that is displayed to the user.
+/** The text that is displayed to the user.
The default is "Loading..."
*/
@property (nonatomic, copy) NSString *text;
-/**
- @brief The font of the text.
- */
+/// The font of the text.
@property (nonatomic, retain) UIFont *font;
-/**
- @brief The color of the text.
+/** The color of the text.
- The default value is <code>[UIColor darkGrayColor]</code>.
+ The default value is `[UIColor darkGrayColor]`.
*/
@property (nonatomic, retain) UIColor *textColor;
-/**
- @brief The color of the text shadow.
+/** The color of the text shadow.
- Set to nil to disable drawing the shadow. The default value is
- <code>[UIColor whiteColor]</code>.
+ Set to nil to disable drawing the shadow. The default value is `[UIColor whiteColor]`.
*/
@property (nonatomic, retain) UIColor *shadowColor;
-/**
- @brief The shadow offset (measured in points) for the text.
+/** The shadow offset (measured in points) for the text.
- The shadowColor must be non-nil for this property to have any effect. The default offset
- size is (0, 1), which indicates a shadow one point below the text. Text shadows are drawn
- with the specified offset and color and no blurring.
+ The shadowColor must be non-nil for this property to have any effect. The default offset size is (0, 1), which
+ indicates a shadow one point below the text. Text shadows are drawn with the specified offset and color and no
+ blurring.
*/
@property (nonatomic, assign) CGSize shadowOffset;
View
9 SSToolkit/SSLoadingView.m
@@ -14,8 +14,7 @@
@implementation SSLoadingView
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize activityIndicatorView = _activityIndicatorView;
@@ -68,8 +67,7 @@ - (void)setShadowOffset:(CGSize)shadowOffset {
}
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (void)dealloc {
[_font release];
@@ -81,8 +79,7 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UIView
+#pragma mark - UIView
- (id)initWithFrame:(CGRect)frame {
if ((self = [super initWithFrame:frame])) {
View
7 SSToolkit/SSNavigationController.h
@@ -10,11 +10,10 @@
@class SSViewController;
-/**
- @brief UINavigationController subclass that comforms to the SSModalViewController protocol.
+/** UINavigationController subclass that comforms to the SSModalViewController protocol.
- This class contains a dirty hack to position it's navigation bar correctly when in a
- custom modal that is created with the SSViewController class.
+ This class contains a dirty hack to position it's navigation bar correctly when in a custom modal that is created with
+ the SSViewController class.
@see SSViewController
@see SSModalViewController
View
6 SSToolkit/SSNavigationController.m
@@ -11,8 +11,7 @@
@implementation SSNavigationController
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize modalParentViewController = _modalParentViewController;
@synthesize dismissCustomModalOnVignetteTap = _dismissCustomModalOnVignetteTap;
@@ -20,8 +19,7 @@ @implementation SSNavigationController
@synthesize originOffsetForViewInCustomModal = _originOffsetForViewInCustomModal;
-#pragma mark -
-#pragma mark UIViewController
+#pragma mark - UIViewController
- (void) viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
View
12 SSToolkit/SSPickerViewController.h
@@ -2,16 +2,16 @@
// SSPickerViewController.h
// SSToolkit
//
-// This is an abstract class for displaying a UITableView with
-// a list of items for the user to choose. A subclass should
-// override the - (void)loadObjects and
-// - (NSString *)cellTextForObject:(id)anObject methods to
-// customize this class.
-//
// Created by Sam Soffes on 10/9/08.
// Copyright 2008-2011 Sam Soffes. All rights reserved.
//
+/** This is an abstract class for displaying a `UITableView` with a list of items for the user to choose similar to
+ Settings.app.
+
+ A subclass should override the `- (void)loadObjects` and `- (NSString *)cellTextForObject:(id)anObject` methods to
+ customize this class.
+ */
@interface SSPickerViewController : UITableViewController {
@private
View
18 SSToolkit/SSPickerViewController.m
@@ -10,16 +10,14 @@
@implementation SSPickerViewController
-#pragma mark -
-#pragma mark Accessors
+#pragma mark - Accessors
@synthesize selectedKey = _selectedKey;
@synthesize keys = _keys;
@synthesize currentIndexPath = _currentIndexPath;
-#pragma mark -
-#pragma mark NSObject
+#pragma mark - NSObject
- (id)init {
self = [super initWithStyle:UITableViewStyleGrouped];
@@ -35,8 +33,7 @@ - (void)dealloc {
}
-#pragma mark -
-#pragma mark UIViewController Methods
+#pragma mark - UIViewController Methods
- (void)viewDidLoad {
[super viewDidLoad];
@@ -51,8 +48,7 @@ - (void)viewDidLoad {
}
-#pragma mark -
-#pragma mark SSPickerViewController
+#pragma mark - SSPickerViewController
// This method should be overridden by a subclass
- (void)loadKeys {
@@ -67,8 +63,7 @@ - (NSString *)cellTextForKey:(id)key {
}
-#pragma mark -
-#pragma mark UITableViewDelegate
+#pragma mark - UITableViewDelegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {