Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

More documentation. #24 #25

  • Loading branch information...
commit 072f882d5ce51a1fd58c4e68231e64f55bc545c1 1 parent f40b093
@soffes soffes authored
Showing with 737 additions and 260 deletions.
  1. +20 −0 SSToolkit/NSArray+SSToolkitAdditions.h
  2. +8 −0 SSToolkit/NSData+SSToolkitAdditions.h
  3. +3 −0  SSToolkit/NSDate+SSToolkitAdditions.h
  4. +3 −0  SSToolkit/NSDictionary+SSToolkitAdditions.h
  5. +3 −0  SSToolkit/NSString+SSToolkitAdditions.h
  6. +3 −0  SSToolkit/NSURL+SSToolkitAdditions.h
  7. +2 −2 SSToolkit/SSAddressBarTextField.m
  8. +1 −1  SSToolkit/SSAddressBarTextFieldBackgroundViewInnerView.m
  9. +47 −6 SSToolkit/SSAnimatedImageView.h
  10. +6 −2 SSToolkit/SSBadgeTableViewCell.h
  11. +21 −10 SSToolkit/SSBadgeView.h
  12. +11 −5 SSToolkit/SSBordererView.h
  13. +56 −32 SSToolkit/SSCollectionView.h
  14. +6 −2 SSToolkit/SSCollectionViewController.h
  15. +62 −60 SSToolkit/SSCollectionViewItem.h
  16. +5 −4 SSToolkit/SSConcurrentOperation.h
  17. +10 −4 SSToolkit/SSDrawingUtilities.h
  18. +14 −7 SSToolkit/SSGradientView.h
  19. +1 −1  SSToolkit/SSHUDWindow.m
  20. +14 −7 SSToolkit/SSIndicatorLabel.h
  21. +7 −3 SSToolkit/SSLabel.h
  22. +10 −5 SSToolkit/SSLineView.h
  23. +18 −9 SSToolkit/SSLoadingView.h
  24. +2 −1  SSToolkit/SSNavigationController.h
  25. +2 −1  SSToolkit/SSPickerViewController.h
  26. +13 −6 SSToolkit/SSPieProgressView.h
  27. +19 −8 SSToolkit/SSRatingPicker.h
  28. +2 −2 SSToolkit/SSRatingPicker.m
  29. +8 −3 SSToolkit/SSRatingPickerViewController.h
  30. +4 −4 SSToolkit/SSSegmentedControl.m
  31. +9 −9 SSToolkit/SSSwitch.m
  32. +8 −4 SSToolkit/SSTableViewController.h
  33. +7 −3 SSToolkit/SSTextField.h
  34. +7 −3 SSToolkit/SSTextView.h
  35. +2 −1  SSToolkit/SSViewController.h
  36. +2 −2 SSToolkit/SSViewController.m
  37. +150 −37 SSToolkit/SSWebView.h
  38. +19 −0 SSToolkit/UIApplication+SSToolkitAdditions.h
  39. +0 −2  SSToolkit/UIApplication+SSToolkitAdditions.m
  40. +3 −0  SSToolkit/UIColor+SSToolkitAdditions.h
  41. +3 −0  SSToolkit/UIControl+SSToolkitAdditions.h
  42. +3 −0  SSToolkit/UIDevice+SSToolkitAdditions.h
  43. +61 −4 SSToolkit/UIImage+SSToolkitAdditions.h
  44. +11 −10 SSToolkit/UIImage+SSToolkitAdditions.m
  45. +34 −0 SSToolkit/UIScreen+SSToolkitAdditions.h
  46. +16 −0 SSToolkit/UIScrollView+SSToolkitAdditions.h
  47. +3 −0  SSToolkit/UIView+SSToolkitAdditions.h
  48. +18 −0 SSToolkit/UIViewController+SSToolkitAdditions.h
View
20 SSToolkit/NSArray+SSToolkitAdditions.h
@@ -6,10 +6,30 @@
// Copyright 2009-2011 Sam Soffes. All rights reserved.
//
+/**
+ Provides extensions to `NSArray` for various common tasks.
+ */
@interface NSArray (SSToolkitAdditions)
+/**
+ Returns the object in the array with the lowest index value.
+
+ @return The object in the array with the lowest index value. If the array is empty, returns `nil`.
+ */
- (id)firstObject;
+
+/**
+ Returns the object in the array with a random index value.
+
+ @return The object in the array with a random index value. If the array is empty, returns `nil`.
+ */
- (id)randomObject;
+
+/**
+ Returns a new array with its elements shuffled.
+
+ @return A new array containing the receiving array's elements rearranged in a random order.
+ */
- (NSArray *)shuffledArray;
@end
View
8 SSToolkit/NSData+SSToolkitAdditions.h
@@ -6,8 +6,16 @@
// Copyright 2008-2011 Sam Soffes. All rights reserved.
//
+/**
+ Provides extensions to `NSData` for various common tasks.
+ */
@interface NSData (SSToolkitAdditions)
+/**
+ Returns a string of the MD5 sum of the receiver.
+
+ @return The string of the MD5 sum of the receiver.
+ */
- (NSString *)MD5Sum;
@end
View
3  SSToolkit/NSDate+SSToolkitAdditions.h
@@ -6,6 +6,9 @@
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//
+/**
+ Provides extensions to `NSDate` for various common tasks.
+ */
@interface NSDate (SSToolkitAdditions)
+ (NSDate *)dateFromISO8601String:(NSString *)string;
View
3  SSToolkit/NSDictionary+SSToolkitAdditions.h
@@ -6,6 +6,9 @@
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//
+/**
+ Provides extensions to `NSDictionary` for various common tasks.
+ */
@interface NSDictionary (SSToolkitAdditions)
+ (NSDictionary *)dictionaryWithFormEncodedString:(NSString *)encodedString;
View
3  SSToolkit/NSString+SSToolkitAdditions.h
@@ -6,6 +6,9 @@
// Copyright 2009-2011 Sam Soffes. All rights reserved.
//
+/**
+ Provides extensions to `NSString` for various common tasks.
+ */
@interface NSString (SSToolkitAdditions)
- (BOOL)containsString:(NSString *)string;
View
3  SSToolkit/NSURL+SSToolkitAdditions.h
@@ -6,6 +6,9 @@
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//
+/**
+ Provides extensions to `NSURL` for various common tasks.
+ */
@interface NSURL (SSToolkitAdditions)
- (NSDictionary *)queryDictionary;
View
4 SSToolkit/SSAddressBarTextField.m
@@ -69,7 +69,7 @@ - (id)initWithFrame:(CGRect)aFrame {
UIButton *aReloadButton = [UIButton buttonWithType:UIButtonTypeCustom];
aReloadButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
aReloadButton.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
- [aReloadButton setImage:[UIImage imageNamed:@"SSAddressBarTextFieldReload.png" bundle:kSSToolkitBundleName] forState:UIControlStateNormal];
+ [aReloadButton setImage:[UIImage imageNamed:@"SSAddressBarTextFieldReload.png" bundleName:kSSToolkitBundleName] forState:UIControlStateNormal];
self.reloadButton = aReloadButton;
self.rightView = _reloadButton;
@@ -77,7 +77,7 @@ - (id)initWithFrame:(CGRect)aFrame {
UIButton *aStopButton = [UIButton buttonWithType:UIButtonTypeCustom];
aStopButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
aStopButton.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
- [aStopButton setImage:[UIImage imageNamed:@"SSAddressBarTextFieldStop.png" bundle:kSSToolkitBundleName] forState:UIControlStateNormal];
+ [aStopButton setImage:[UIImage imageNamed:@"SSAddressBarTextFieldStop.png" bundleName:kSSToolkitBundleName] forState:UIControlStateNormal];
self.stopButton = aStopButton;
self.loading = NO;
View
2  SSToolkit/SSAddressBarTextFieldBackgroundViewInnerView.m
@@ -28,7 +28,7 @@ - (id)initWithFrame:(CGRect)aFrame {
- (void)drawRect:(CGRect)rect {
CGSize size = self.frame.size;
- [[UIImage imageNamed:@"SSAddressBarTextFieldBackground.png" bundle:kSSToolkitBundleName] drawAsPatternInRect:CGRectMake(0.0f, 0.0f, size.width, size.height)];
+ [[UIImage imageNamed:@"SSAddressBarTextFieldBackground.png" bundleName:kSSToolkitBundleName] drawAsPatternInRect:CGRectMake(0.0f, 0.0f, size.width, size.height)];
}
@end
View
53 SSToolkit/SSAnimatedImageView.h
@@ -8,7 +8,8 @@
@protocol SSAnimatedImageViewDelegate;
-/** Animated image view.
+/**
+ Animated image view.
`SSAnimatedImageView` is a simple subclass of `UIImageView` that provides more advanced control of image animations.
The animation is backed by a `CAKeyframeAnimation`.
@@ -21,10 +22,13 @@
/// @name Starting Animations
///--------------------------
-/** Start an image animation.
+/**
+ Start an image animation.
@param animationName The named of the animation.
+
@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.
@@ -32,12 +36,17 @@
- (void)startImageAnimation:(NSString *)animationName images:(NSArray *)images delegate:(id<SSAnimatedImageViewDelegate>)delegate;
-/** 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 `UIImage` objects that will be animated.
+
@param duration The duration of the animation.
+
@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;
@@ -46,12 +55,17 @@
/// @name Starting Timed Animations
///--------------------------------
-/** Start a timed image animation with repeat count.
+/**
+ Start a timed image animation with repeat count.
@param animationName The named of the animation.
+
@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 `CAKeyframeAnimation`'s documentation for more information on how to specify `keyTimes`.
@@ -61,11 +75,38 @@
@end
+/**
+ The `SSAnimatedImageViewDelegate` protocol defines methods that a delegate of a `SSAnimatedImageView` object can
+ optionally implement to observe the animation status.
+
+ @warning **Important:** Before releasing an instance of `SSAnimatedImageView` for which you have set a delegate, you
+ must first set the `SSAnimatedImageView` delegate property to `nil` before disposing of the `SSAnimatedImageView`
+ instance. This can be done, for example, in the `dealloc` method where you dispose of the `SSAnimatedImageView`.
+ */
@protocol SSAnimatedImageViewDelegate <NSObject>
@optional
-- (void)imageView:(SSAnimatedImageView *)imageView didStartAnimation:(NSString *)animationName;
-- (void)imageView:(SSAnimatedImageView *)imageView didFinishAnimation:(NSString *)animationName;
+/**
+ Sent when an image view begins playing its animation.
+
+ @param anImageView The image view that started playng its animation.
+
+ @param animationName The name of the animation that started.
+
+ @see imageView:didFinishAnimation:
+ */
+- (void)imageView:(SSAnimatedImageView *)anImageView didStartAnimation:(NSString *)animationName;
+
+/**
+ Sent after an image view finished playing its animation.
+
+ @param anImageView The image view that finished playng its animation.
+
+ @param animationName The name of the animation that started.
+
+ @see imageView:didStartAnimation:
+ */
+- (void)imageView:(SSAnimatedImageView *)anImageView didFinishAnimation:(NSString *)animationName;
@end
View
8 SSToolkit/SSBadgeTableViewCell.h
@@ -8,7 +8,9 @@
@class SSBadgeView;
-/// Table view cell that displays a `SSBadgeView` as its accessory.
+/**
+ Table view cell that displays a `SSBadgeView` as its accessory.
+ */
@interface SSBadgeTableViewCell : UITableViewCell {
@private
@@ -16,7 +18,9 @@
SSBadgeView *_badgeView;
}
-/// 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
31 SSToolkit/SSBadgeView.h
@@ -14,7 +14,8 @@ typedef enum {
@class SSLabel;
-/** Badge view.
+/**
+ Badge view.
Provides the accesory view for a SSBadgeTableViewCell, available through the `badgeView` property.
@@ -41,14 +42,17 @@ typedef enum {
/// @name Accessing the Badge Label
///--------------------------------
-/// The badge text label.
+/**
+ The badge text label.
+ */
@property (nonatomic, retain, readonly) SSLabel *textLabel;
///-------------------------------------
/// @name Accessing the Badge Attributes
///-------------------------------------
-/** The badge's background color.
+/**
+ The badge's background color.
The default value of this property is grayish blue (that matches Mail.app).
@@ -56,19 +60,22 @@ typedef enum {
*/
@property (nonatomic, retain) UIColor *badgeColor;
-/** 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;
-/** The corner radius used when rendering the badge's outline.
+/**
+ The corner radius used when rendering the badge's outline.
The default value of this property is 10.
*/
@property (nonatomic, assign) CGFloat cornerRadius;
-/** The badge's horizontal alignment within the accesoryView frame.
+/**
+ The badge's horizontal alignment within the accesoryView frame.
This will position the badge in the view's bounds accordinly.
@@ -76,7 +83,8 @@ typedef enum {
*/
@property (nonatomic, assign) SSBadgeViewAlignment badgeAlignment;
-/** A Boolean value indicating whether the receiver should be drawn with a highlight.
+/**
+ A Boolean value indicating whether the receiver should be drawn with a highlight.
Setting this property causes the receiver to redraw with the appropriate highlight state.
@@ -88,7 +96,8 @@ typedef enum {
/// @name Drawing Images
///---------------------
-/** The badge's background image.
+/**
+ The badge's background image.
The default value of this property is `nil`. If the value is non-nil, it will be draw instead of the color.
@@ -96,7 +105,8 @@ typedef enum {
*/
@property (nonatomic, retain) UIImage *badgeImage;
-/** The badge's background image while its cell is highlighted.
+/**
+ The badge's background image while its cell is highlighted.
The default value of this property is `nil`. If the value is non-nil, it will be draw instead of the color.
@@ -108,7 +118,8 @@ typedef enum {
/// @name Defaults
///---------------
-/** The default badge color.
+/**
+ The default badge color.
@return A color with its value set to the default badge color.
*/
View
16 SSToolkit/SSBordererView.h
@@ -6,7 +6,9 @@
// Copyright 2011 Sam Soffes. All rights reserved.
//
-/// 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
@@ -21,13 +23,15 @@
/// @name Drawing the Top Border
///-----------------------------
-/** The top border color. The default is `nil`.
+/**
+ The top border color. The default is `nil`.
@see bottomBorderColor
*/
@property (nonatomic, retain) UIColor *topBorderColor;
-/** The top inset color. The default is `nil`.
+/**
+ The top inset color. The default is `nil`.
@see bottomInsetColor
*/
@@ -37,13 +41,15 @@
/// @name Drawing the Bottom Border
///--------------------------------
-/** The bottom inset color. The default is `nil`.
+/**
+ The bottom inset color. The default is `nil`.
@see topInsetColor
*/
@property (nonatomic, retain) UIColor *bottomInsetColor;
-/** The bottom border color. The default is `nil`.
+/**
+ The bottom border color. The default is `nil`.
@see topBorderColor
*/
View
88 SSToolkit/SSCollectionView.h
@@ -23,7 +23,8 @@ typedef enum {
@protocol SSCollectionViewDelegate;
@protocol SSCollectionViewDataSource;
-/** Simple collection view.
+/**
+ Simple collection view.
My goals are to be similar to UITableView and NSCollectionView when possible. Only scrolling vertically is currently
supported.
@@ -52,71 +53,82 @@ typedef enum {
UITableView *_tableView;
}
-/** 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;
-/** 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;
-/** The style of the receiving collection view's headers and footers.
+/**
+ The style of the receiving collection view's headers and footers.
- 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
+ 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;
-/** The minimum column spacing.
+/**
+ The minimum column spacing.
- The default is 0.
+ The default is `0.0`.
*/
@property (nonatomic, assign) CGFloat minimumColumnSpacing;
-/** 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.
+ The row spacing is in points. The default is `20.0`.
*/
@property (nonatomic, assign) CGFloat rowSpacing;
-/** The background view of the collection view.
+/**
+ The background view of the collection view.
*/
@property (nonatomic, retain) UIView *backgroundView;
-/** 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 `YES`, selecting is enabled, and if it is `NO`, selecting is
- disabled. The default is `YES`.
+ 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;
-/** 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;
-/** The number of sections in the collection view.
+/**
+ The number of sections in the collection view.
`SSCollectionView` gets the value returned by this method from its data source and caches it.
*/
@property (nonatomic, assign, readonly) NSUInteger numberOfSections;
-/** Reloads the items and sections of the receiver.
+/**
+ Reloads the items and sections of the receiver.
*/
- (void)reloadData;
-/** 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 `SSCollectionViewItem</code< object with the associated identifier or nil if no such object exists in
- the reusable-item queue.
+ @return A `SSCollectionViewItem` object with the associated identifier or nil if no such object exists in the
+ reusable-item queue.
*/
- (SSCollectionViewItem *)dequeueReusableItemWithIdentifier:(NSString *)identifier;
-/** 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.
@@ -126,7 +138,8 @@ typedef enum {
*/
- (SSCollectionViewItem *)itemPathForIndex:(NSIndexPath *)indexPath;
-/** 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.
@@ -136,12 +149,14 @@ typedef enum {
*/
- (NSIndexPath *)indexPathForItem:(SSCollectionViewItem *)item;
-/** Selects an item in the receiver identified by index path, optionally scrolling the item to a location in the
- receiver.
+/**
+ 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 `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.
@@ -150,31 +165,38 @@ typedef enum {
*/
- (void)selectItemAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated scrollPosition:(SSCollectionViewScrollPosition)scrollPosition;
-/** 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 `YES` if you want to animate the deselection and `NO` if the change should be
immediate.
*/
- (void)deselectItemAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated;
-/** 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 `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;
-/** Reloads the specified item.
+/**
+ Reloads the specified item.
@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;
-/** 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.
@@ -182,7 +204,8 @@ typedef enum {
*/
- (NSUInteger)numberOfItemsInSection:(NSUInteger)section;
-/** 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.
@@ -198,7 +221,8 @@ typedef enum {
*/
- (CGRect)rectForHeaderInSection:(NSUInteger)section;
-/** 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
8 SSToolkit/SSCollectionViewController.h
@@ -9,7 +9,9 @@
#import "SSViewController.h"
#import "SSCollectionView.h"
-/// Creates a controller object that manages a collection view.
+/**
+ Creates a controller object that manages a collection view.
+ */
@interface SSCollectionViewController : SSViewController <SSCollectionViewDataSource, SSCollectionViewDelegate> {
@private
@@ -17,7 +19,9 @@
SSCollectionView *_collectionView;
}
-/// 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
122 SSToolkit/SSCollectionViewItem.h
@@ -16,7 +16,8 @@ typedef enum {
@class SSLabel;
@class SSCollectionView;
-/** View for display in a collection view.
+/**
+ View for display in a collection view.
*/
@interface SSCollectionViewItem : UIView {
@@ -38,112 +39,115 @@ typedef enum {
NSIndexPath *_indexPath;
}
-/** 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.
+ 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;
-/** 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.
+ 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;
-/** 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.
+ 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;
/** 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.
+ 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;
-/** 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
- view (backgroundView) if it is not nil, or behind all other views. Calling setSelected:animated:
- causes the selected background view to animate in and out with an alpha fade.
+ 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 view (`backgroundView`) if it
+ 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;
-/** 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
- items of a collection view. It is assigned to the item object in initWithFrame:reuseIdentifier:
- and cannot be changed thereafter. A SSCollectionView object maintains a queue (or list) of the
- currently reusable items, each with its own reuse identifier, and makes them available to the
- delegate in the dequeueReusableCellWithIdentifier: method.
+ 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 items of a collection view. It is
+ assigned to the item object in `initWithFrame:reuseIdentifier:` and cannot be changed thereafter. A `SSCollectionView`
+ object maintains a queue (or list) of the currently reusable items, each with its own reuse identifier, and makes them
+ available to the delegate in the `dequeueReusableCellWithIdentifier:` method.
*/
@property (nonatomic, readonly, copy) NSString *reuseIdentifier;
-/** 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
- `NO`.
+ The selection affects the appearance of labels, image, and background. The default value is `NO`.
@see setSelected:animated:
*/
@property (nonatomic, getter=isSelected) BOOL selected;
-/** 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 `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.
+ The highlighting affects the appearance of labels, image, and background. When the the highlighted 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.
- Note that for highlighting to work properly, you must fetch the items's labels using the textLabel
- and detailTextLabel properties and set each label's highlightedTextColor property; for images, get
- the item's image using the imageView property and set the UIImageView object's highlightedImage
- property.
+ Note that for highlighting to work properly, you must fetch the items's labels using the textLabel and
+ `detailTextLabel` properties and set each label's `highlightedTextColor` property; for images, get the item's image
+ using the `imageView` property and set the `UIImageView` object's `highlightedImage` property.
@see setHighlighted:animated:
*/
@property (nonatomic, getter=isHighlighted) BOOL highlighted;
-/** Initializes a collection view item with a style and a reuse identifier and returns it to
- the caller.
+/**
+ 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 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.
+ @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.
- @return An initialized SSCollectionViewItem object or nil if the object could not be created.
+ @return An initialized `SSCollectionViewItem` object or nil if the object could not be created.
*/
- (id)initWithStyle:(SSCollectionViewItemStyle)style reuseIdentifier:(NSString *)aReuseIdentifier;
-/** 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;
-/** 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 `YES` to set the item as selected, `NO` to set it as unselected.
- The default is `NO`.
+ @param selected `YES` to set the item as selected, `NO` to set it as unselected. The default is `NO`.
- @param animated `YES` to animate the transition between selected states, `NO` to
- make the transition immediate.
+ @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 `YES`, it draws the background for selected items with its title in its
- highlightedTextColor.
+ The selection affects the appearance of labels, image, and background. When the the selected state 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;
-/** 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 `YES` to set the item as highlighted, `NO` to set it as
unhighlighted. The default is `NO`.
@@ -151,14 +155,12 @@ typedef enum {
@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 `YES`. Highlighting affects the appearance of the items's labels, image, and
- background.
+ Highlights or unhighlights the item, animating the transition between regular and highlighted state if 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
- textLabel (and detailTextLabel) properties and set the label's highlightedTextColor property; for
- images, get the items's image using the imageView property and set the UIImageView object's
- highlightedImage property.
+ Note that for highlighting to work properly, you must fetch the item's label (or labels) using the `textLabel`
+ (and `detailTextLabel`) properties and set the label's `highlightedTextColor` property; for images, get the items's
+ image using the `imageView` property and set the `UIImageView` object's `highlightedImage` property.
A custom table item may override this method to make any transitory appearance changes.
*/
View
9 SSToolkit/SSConcurrentOperation.h
@@ -6,10 +6,10 @@
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//
-/** 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.
+ Subclasses should override the start and stop methods. Here is a basic example.
<pre><code>- (void)start {
[super start];
@@ -33,7 +33,8 @@
BOOL _isFinished;
}
-/** 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`
View
14 SSToolkit/SSDrawingUtilities.h
@@ -9,15 +9,21 @@
#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.
+
+ @return 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.
+
+ @return The number converted to degrees.
*/
#define RADIANS_TO_DEGREES(r) ((r) * 57.29577951308232f)
View
21 SSToolkit/SSGradientView.h
@@ -13,7 +13,9 @@ typedef enum {
SSGradientViewDirectionVertical
} SSGradientViewDirection;
-/// Simple `UIView` wrapper for `CGGradient`.
+/**
+ Simple `UIView` wrapper for `CGGradient`.
+ */
@interface SSGradientView : SSBordererView {
@private
@@ -29,21 +31,24 @@ typedef enum {
/// @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.
+/**
+ 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;
-/** 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 `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;
-/** The direction of the gradient.
+/**
+ The direction of the gradient.
The default is `SSGradientViewDirectionHorizontal`.
*/
@@ -53,13 +58,15 @@ typedef enum {
/// @name Deprecated Methods
///-------------------------
-/** The top gradient color. This method is deprecated.
+/**
+ The top gradient color. This method is deprecated.
The default is `nil`.
*/
@property (nonatomic, retain) UIColor *topColor;
-/** The bottom gradient color. This method is deprecated.
+/**
+ The bottom gradient color. This method is deprecated.
The default is `nil`.
*/
View
2  SSToolkit/SSHUDWindow.m
@@ -53,7 +53,7 @@ - (void)drawRect:(CGRect)rect {
}
NSString *imageName = UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? @"SSVignetteiPad.png" : @"SSVignetteiPhone.png";
- UIImage *image = [UIImage imageNamed:imageName bundle:kSSToolkitBundleName];
+ UIImage *image = [UIImage imageNamed:imageName bundleName:kSSToolkitBundleName];
CGSize screenSize = [[UIScreen mainScreen] bounds].size;
[image drawInRect:CGRectMake(roundf((screenSize.width - image.size.width) / 2.0f),
View
21 SSToolkit/SSIndicatorLabel.h
@@ -6,8 +6,8 @@
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//
-/** 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.
@@ -21,25 +21,32 @@
BOOL _loading;
}
-/// 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;
-/// 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;
-/** A Boolean value that determines whether the view is loading.
+/**
+ A Boolean value that determines whether the view is loading.
The default value is `NO`.
*/
@property (nonatomic, assign, getter=isLoading) BOOL loading;
-/** 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 `textLabel`'s `text` property to.
*/
- (void)startWithText:(NSString *)text;
-/** 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 `textLabel`'s `text` property to.
*/
View
10 SSToolkit/SSLabel.h
@@ -12,7 +12,9 @@ typedef enum {
SSLabelVerticalTextAlignmentBottom = UIControlContentVerticalAlignmentBottom
} SSLabelVerticalTextAlignment;
-/// 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
@@ -21,13 +23,15 @@ typedef enum {
UIEdgeInsets _textEdgeInsets;
}
-/** The vertical text alignment of the receiver.
+/**
+ The vertical text alignment of the receiver.
The default is `SSLabelVerticalTextAlignmentMiddle` to match `UILabel`.
*/
@property (nonatomic, assign) SSLabelVerticalTextAlignment verticalTextAlignment;
-/** The edge insets of the text.
+/**
+ The edge insets of the text.
The default is `UIEdgeInsetsZero` so it behaves like `UILabel` by default.
*/
View
15 SSToolkit/SSLineView.h
@@ -6,7 +6,8 @@
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//
-/** 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.0` points if you are using the inset and `1.0` if you are not.
@@ -26,13 +27,15 @@
/// @name Drawing Lines
///--------------------
-/** The primary color of the line.
+/**
+ The primary color of the line.
The default is `[UIColor grayColor]`.
*/
@property (nonatomic, retain) UIColor *lineColor;
-/** The color of the line inset.
+/**
+ The color of the line inset.
The default is 50% opaque white.
*/
@@ -42,7 +45,8 @@
/// @name Drawing Dashes
///---------------------
-/** A float that specifies how far into the dash pattern the line starts, in points.
+/**
+ 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.
@@ -51,7 +55,8 @@
*/
@property (nonatomic, assign) CGFloat dashPhase;
-/** An array of values that specify the lengths of the painted segments and unpainted segments, respectively, of the
+/**
+ 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
View
27 SSToolkit/SSLoadingView.h
@@ -6,7 +6,8 @@
// Copyright 2009-2011 Sam Soffes. All rights reserved.
//
-/** An easy view to show loading similar to the loading screens in the iTunes or App Store applications. The view is
+/**
+ 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.
@@ -23,33 +24,41 @@
CGSize _shadowOffset;
}
-/// 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;
-/** 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;
-/// The font of the text.
+/**
+ The font of the `text`.
+ */
@property (nonatomic, retain) UIFont *font;
-/** The color of the text.
+/**
+ The color of the text.
The default value is `[UIColor darkGrayColor]`.
*/
@property (nonatomic, retain) UIColor *textColor;
-/** The color of the text shadow.
+/**
+ The color of the text shadow.
- Set to nil to disable drawing the shadow. The default value is `[UIColor whiteColor]`.
+ Set to `nil` to disable drawing the shadow. The default value is `[UIColor whiteColor]`.
*/
@property (nonatomic, retain) UIColor *shadowColor;
-/** 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
+ 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.
*/
View
3  SSToolkit/SSNavigationController.h
@@ -10,7 +10,8 @@
@class SSViewController;
-/** 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.
View
3  SSToolkit/SSPickerViewController.h
@@ -6,7 +6,8 @@
// 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
+/**
+ 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
View
19 SSToolkit/SSPieProgressView.h
@@ -22,7 +22,8 @@
///@name Managing the Progress
///---------------------------
-/** The current progress shown by the receiver.
+/**
+ The current progress shown by the receiver.
The current progress is represented by a floating-point value between `0.0` and `1.0`, inclusive, where `1.0` indicates
the completion of the task. Values less than `0.0` and greater than `1.0` are pinned to those limits.
@@ -35,25 +36,29 @@
/// @name Configuring the Pie Appearance
///-------------------------------------
-/** The outer border width.
+/**
+ The outer border width.
The default is `2.0`.
*/
@property (nonatomic, assign) CGFloat pieBorderWidth;
-/** The border color.
+/**
+ The border color.
@see defaultPieColor
*/
@property (nonatomic, retain) UIColor *pieBorderColor;
-/** The fill color.
+/**
+ The fill color.
@see defaultPieColor
*/
@property (nonatomic, retain) UIColor *pieFillColor;
-/** The background color.
+/**
+ The background color.
The default is white.
*/
@@ -63,7 +68,9 @@
/// @name Defaults
///---------------
-/// The default value of `pieBorderColor` and `pieFillColor`.
+/**
+ The default value of `pieBorderColor` and `pieFillColor`.
+ */
+ (UIColor *)defaultPieColor;
@end
View
27 SSToolkit/SSRatingPicker.h
@@ -6,7 +6,8 @@
// Copyright 2011 Sam Soffes. All rights reserved.
//
-/** A simple control for picking a rating.
+/**
+ A simple control for picking a rating.
The default configuration matches the rating picker in the App Store app (to the pixel). The `textLabel` is
automatically faded in if there is no rating and faded out when there is a rating.
@@ -31,14 +32,16 @@
/// @name Accessing the Star Attributes
///------------------------------------
-/** The float value of the selected number of stars. Setting this value will send `UIControlEventValueChanged` to the
+/**
+ The float value of the selected number of stars. Setting this value will send `UIControlEventValueChanged` to the
pickers targets.
The default is `0.0`.
*/
@property (nonatomic, assign) CGFloat selectedNumberOfStars;
-/** The unsigned integer value of the total number of stars.
+/**
+ The unsigned integer value of the total number of stars.
The default is `5`.
*/
@@ -48,19 +51,25 @@
/// @name Accessing the Star Attributes
///------------------------------------
-/// The image draw for a star that is empty.
+/**
+ The image draw for a star that is empty.
+ */
@property (nonatomic, retain) UIImage *emptyStarImage;
-/// The image draw for a star that is filled.
+/**
+ The image draw for a star that is filled.
+ */
@property (nonatomic, retain) UIImage *filledStarImage;
-/** The spacing of stars.
+/**
+ The spacing of stars.
The default is `{21.0, 36.0}`.
*/
@property (nonatomic, assign) CGSize starSize;
-/** The spacing of stars.
+/**
+ The spacing of stars.
The default is `19.0`.
*/
@@ -70,7 +79,9 @@
/// @name Accessing the Text Label
///-------------------------------
-/// The text label drawn under the stars when there is no rating selected. (read-only)
+/**
+ The text label drawn under the stars when there is no rating selected. (read-only)
+ */
@property (nonatomic, retain, readonly) UILabel *textLabel;
@end
View
4 SSToolkit/SSRatingPicker.m
@@ -127,8 +127,8 @@ - (id)initWithFrame:(CGRect)rect {
self.opaque = YES;
self.contentMode = UIViewContentModeRedraw;
- self.emptyStarImage = [UIImage imageNamed:@"gray-star.png" bundle:kSSToolkitBundleName];
- self.filledStarImage = [UIImage imageNamed:@"orange-star.png" bundle:kSSToolkitBundleName];
+ self.emptyStarImage = [UIImage imageNamed:@"gray-star.png" bundleName:kSSToolkitBundleName];
+ self.filledStarImage = [UIImage imageNamed:@"orange-star.png" bundleName:kSSToolkitBundleName];
self.starSize = CGSizeMake(21.0f, 36.0f);
self.starSpacing = 19.0f;
self.selectedNumberOfStars = 0.0f;
View
11 SSToolkit/SSRatingPickerViewController.h
@@ -19,7 +19,8 @@
/// @name Accessing the Rating Picker
///----------------------------------
-/** The rating picker. (read-only)
+/**
+ The rating picker. (read-only)
All of the rating picker's values are the default values of `SSRatingPicker`.
*/
@@ -29,10 +30,14 @@
/// @name Accessing the Text Input
///-------------------------------
-/// The text field for the title. (read-only)
+/**
+ The text field for the title. (read-only)
+ */
@property (nonatomic, retain, readonly) SSTextField *titleTextField;
-/// The text view for the review. (read-only)
+/**
+ The text view for the review. (read-only)
+ */
@property (nonatomic, retain, readonly) SSTextView *reviewTextView;
@end
View
8 SSToolkit/SSSegmentedControl.m
@@ -197,10 +197,10 @@ - (id)initWithFrame:(CGRect)frame {
_segments = [[NSMutableArray alloc] init];
_momentary = NO;
- self.buttonImage = [[UIImage imageNamed:@"UISegmentBarButton.png" bundle:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:6 topCapHeight:0];
- self.highlightedButtonImage = [[UIImage imageNamed:@"UISegmentBarButtonHighlighted.png" bundle:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:6 topCapHeight:0];
- self.dividerImage = [UIImage imageNamed:@"UISegmentBarDivider.png" bundle:kSSToolkitBundleName];
- self.highlightedDividerImage = [UIImage imageNamed:@"UISegmentBarDividerHighlighted.png" bundle:kSSToolkitBundleName];
+ self.buttonImage = [[UIImage imageNamed:@"UISegmentBarButton.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:6 topCapHeight:0];
+ self.highlightedButtonImage = [[UIImage imageNamed:@"UISegmentBarButtonHighlighted.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:6 topCapHeight:0];
+ self.dividerImage = [UIImage imageNamed:@"UISegmentBarDivider.png" bundleName:kSSToolkitBundleName];
+ self.highlightedDividerImage = [UIImage imageNamed:@"UISegmentBarDividerHighlighted.png" bundleName:kSSToolkitBundleName];
self.selectedSegmentIndex = SSSegmentedControlNoSegment;
_font = [[UIFont boldSystemFontOfSize:12.0f] retain];
View
18 SSToolkit/SSSwitch.m
@@ -38,24 +38,24 @@ - (void)setStyle:(SSSwitchStyle)s {
case SSSwitchStyleDefault: {
NSInteger leftCap = 8;
- self.leftHandleImage = [[UIImage imageNamed:@"UISwitchButtonRightShadowed.png" bundle:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
- self.leftHandleImageHighlighted = [[UIImage imageNamed:@"UISwitchButtonRightShadowedDown.png" bundle:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
- self.centerHandleImage = [[UIImage imageNamed:@"UISwitchButtonFullShadowed.png" bundle:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
- self.centerHandleImageHighlighted = [[UIImage imageNamed:@"UISwitchButtonFullShadowedDown.png" bundle:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
- self.rightHandleImage = [[UIImage imageNamed:@"UISwitchButtonLeftShadowed.png" bundle:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
- self.rightHandleImageHighlighted = [[UIImage imageNamed:@"UISwitchButtonLeftShadowedDown.png" bundle:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
+ self.leftHandleImage = [[UIImage imageNamed:@"UISwitchButtonRightShadowed.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
+ self.leftHandleImageHighlighted = [[UIImage imageNamed:@"UISwitchButtonRightShadowedDown.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
+ self.centerHandleImage = [[UIImage imageNamed:@"UISwitchButtonFullShadowed.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
+ self.centerHandleImageHighlighted = [[UIImage imageNamed:@"UISwitchButtonFullShadowedDown.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
+ self.rightHandleImage = [[UIImage imageNamed:@"UISwitchButtonLeftShadowed.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
+ self.rightHandleImageHighlighted = [[UIImage imageNamed:@"UISwitchButtonLeftShadowedDown.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:leftCap topCapHeight:0];
self.handleWidth = 42;
self.handleShadowWidth = 2;
- self.onBackgroundImageView.image = [[UIImage imageNamed:@"UISwitchTrackBlue.png" bundle:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:5 topCapHeight:0];
+ self.onBackgroundImageView.image = [[UIImage imageNamed:@"UISwitchTrackBlue.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:5 topCapHeight:0];
self.onLabel.textColor = [UIColor whiteColor];
self.onLabel.font = [UIFont boldSystemFontOfSize:16.0f];
self.onLabel.shadowColor = [UIColor colorWithWhite:0.0f alpha:0.5f];
self.onLabel.shadowOffset = CGSizeMake(0.0f, -1.0f);
- self.offBackgroundImageView.image = [[UIImage imageNamed:@"UISwitchTrackClear.png" bundle:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:5 topCapHeight:0];
+ self.offBackgroundImageView.image = [[UIImage imageNamed:@"UISwitchTrackClear.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:5 topCapHeight:0];
self.offLabel.textColor = [UIColor colorWithWhite:0.475f alpha:1.0f];
self.offLabel.font = [UIFont boldSystemFontOfSize:16.0f];
@@ -67,7 +67,7 @@ - (void)setStyle:(SSSwitchStyle)s {
}
case SSSwitchStyleAirplane: {
- self.onBackgroundImageView.image = [[UIImage imageNamed:@"UISwitchTrackOrange.png" bundle:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:5 topCapHeight:0];
+ self.onBackgroundImageView.image = [[UIImage imageNamed:@"UISwitchTrackOrange.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:5 topCapHeight:0];
break;
}
}
View
12 SSToolkit/SSTableViewController.h
@@ -8,7 +8,8 @@
#import "SSViewController.h"
-/** The SSTableViewController class creates a controller object that manages a table view.
+/**
+ The SSTableViewController class creates a controller object that manages a table view.
This class is a SSViewController subclass that is a drop-in replacement for UITableViewController.
*/
@@ -20,11 +21,13 @@
BOOL _clearsSelectionOnViewWillAppear;
}
-/** Returns the table view managed by the controller object.
+/**
+ Returns the table view managed by the controller object.
*/
@property (nonatomic, retain) UITableView *tableView;
-/** A Boolean value indicating if the controller clears the selection when the table appears.
+/**
+ A Boolean value indicating if the controller clears the selection when the table appears.
The default value of this property is YES. When YES, the table view controller clears the table's
current selection when it receives a viewWillAppear: message. Setting this property to `NO`
@@ -32,7 +35,8 @@
*/
@property (nonatomic) BOOL clearsSelectionOnViewWillAppear;
-/** Initializes a table-view controller to manage a table view of a given style.
+/**
+ Initializes a table-view controller to manage a table view of a given style.
@param style A constant that specifies the style of table view that the controller object
is to manage (UITableViewStylePlain or UITableViewStyleGrouped).
View
10 SSToolkit/SSTextField.h
@@ -6,7 +6,9 @@
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//
-/// Simple UITextField subclass to adds text insets.
+/**
+ Simple UITextField subclass to adds text insets.
+ */
@interface SSTextField : UITextField {
@private
@@ -15,7 +17,8 @@
UIEdgeInsets _clearButtonEdgeInsets;
}
-/** The inset or outset margins for the edges of the text content drawing rectangle.
+/**
+ The inset or outset margins for the edges of the text content drawing rectangle.
Use this property to resize and reposition the effective drawing rectangle for the text content. You can specify a
different value for each of the four insets (top, left, bottom, right). A positive value shrinks, or insets, that
@@ -26,7 +29,8 @@
*/
@property (nonatomic, assign) UIEdgeInsets textEdgeInsets;
-/** The inset or outset margins for the edges of the clear button drawing rectangle.
+/**
+ The inset or outset margins for the edges of the clear button drawing rectangle.
Use this property to resize and reposition the effective drawing rectangle for the clear button content. You can
specify a different value for each of the four insets (top, left, bottom, right), but only the top and right insets are
View
10 SSToolkit/SSTextView.h
@@ -6,7 +6,9 @@
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//
-/// UITextView subclass that adds placeholder support like UITextField has.
+/**
+ UITextView subclass that adds placeholder support like UITextField has.
+ */
@interface SSTextView : UITextView {
@private
@@ -17,13 +19,15 @@
BOOL _shouldDrawPlaceholder;
}
-/** The string that is displayed when there is no other text in the text view.
+/**
+ The string that is displayed when there is no other text in the text view.
The default value is `nil`.
*/
@property (nonatomic, retain) NSString *placeholder;
-/** The color of the placeholder.
+/**
+ The color of the placeholder.
The default is `[UIColor lightGrayColor]`.
*/
View
3  SSToolkit/SSViewController.h
@@ -8,7 +8,8 @@
#import "SSModalViewController.h"
-/** UIViewController subclass that displaying custom modals and
+/**
+ UIViewController subclass that displaying custom modals and
other nice enhancements.
Note: Currently only iPad is supported.
View
4 SSToolkit/SSViewController.m
@@ -130,7 +130,7 @@ - (void)presentCustomModalViewController:(UIViewController<SSModalViewController
if (_vignetteButton == nil) {
_vignetteButton = [[UIButton alloc] initWithFrame:CGRectZero];
- [_vignetteButton setImage:[UIImage imageNamed:@"SSVignetteiPad.png" bundle:kSSToolkitBundleName] forState:UIControlStateNormal];
+ [_vignetteButton setImage:[UIImage imageNamed:@"SSVignetteiPad.png" bundleName:kSSToolkitBundleName] forState:UIControlStateNormal];
_vignetteButton.adjustsImageWhenHighlighted = NO;
_vignetteButton.alpha = 0.0f;
}
@@ -139,7 +139,7 @@ - (void)presentCustomModalViewController:(UIViewController<SSModalViewController
[_vignetteButton fadeIn];
if (_modalContainerBackgroundView == nil) {
- UIImage *modalBackgroundImage = [[UIImage imageNamed:@"SSViewControllerFormBackground.png" bundle:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:43 topCapHeight:45];
+ UIImage *modalBackgroundImage = [[UIImage imageNamed:@"SSViewControllerFormBackground.png" bundleName:kSSToolkitBundleName] stretchableImageWithLeftCapWidth:43 topCapHeight:45];
_modalContainerBackgroundView = [[UIImageView alloc] initWithImage:modalBackgroundImage];
_modalContainerBackgroundView.autoresizesSubviews = NO;
_modalContainerBackgroundView.userInteractionEnabled = YES;
View
187 SSToolkit/SSWebView.h
@@ -8,7 +8,8 @@
@protocol SSWebViewDelegate;
-/** This class pushes UIWebView to its limits and many common and usually difficult tasks very simple.
+/**
+ This class pushes UIWebView to its limits and many common and usually difficult tasks very simple.
Note that this class doesn't actually inherit from UIWebView, but instead forwards all of UIWebView's public methods to
an internal instance. It has been designed to be a drop in replacement for UIWebView.
@@ -37,10 +38,11 @@
/// @name Controlling the Appearance
///---------------------------------
-/** A Boolean value that controls whether the web view draws shadows around the outside of its content.
+/**
+ A Boolean value that controls whether the web view draws shadows around the outside of its content.
- If the value of this property is `YES`, the web view will the shadows around the outside of its content. If
- the value is `NO`, shadows will be displayed like normal. The default value is `NO`.
+ If the value of this property is `YES`, the web view will the shadows around the outside of its content. If the value
+ is `NO`, shadows will be displayed like normal. The default value is `NO`.
Note: This isn't 100% reliable since it is very hacky underneath.
*/
@@ -50,7 +52,8 @@
/// @name Setting the Delegate
///---------------------------
-/** The receiver's `delegate`.
+/**
+ The receiver's `delegate`.
The `delegate` is sent messages when content is loading.
*/
@@ -60,7 +63,8 @@
/// @name Loading Content
///----------------------
-/** Sets the main page contents, MIME type, content encoding, and base URL.
+/**
+ Sets the main page contents, MIME type, content encoding, and base URL.
@param data The content for the main page.
@@ -72,7 +76,8 @@
*/
- (void)loadData:(NSData *)data MIMEType:(NSString *)MIMEType textEncodingName:(NSString *)encodingName baseURL:(NSURL *)baseURL;
-/** Sets the main page content and base URL.
+/**
+ Sets the main page content and base URL.
@param string The content for the main page.
@@ -80,12 +85,13 @@
*/
- (void)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL;
-/** Connects to a given URL by initiating an asynchronous client request.
+/**
+ Connects to a given URL by initiating an asynchronous client request.
@param aRequest A URL request identifying the location of the content to load.
- To stop this load, use the stopLoading method. To see whether the receiver is done loading the
- content, use the loading property.
+ To stop this load, use the stopLoading method. To see whether the receiver is done loading the content, use the loading
+ property.
@see request
@see stopLoading
@@ -94,7 +100,8 @@
*/
- (void)loadRequest:(NSURLRequest *)aRequest;
-/** Sets the main page content.
+/**
+ Sets the main page content.
@param string The content for the main page.
@@ -104,7 +111,8 @@
*/
- (void)loadHTMLString:(NSString *)string;
-/** Connects to a given URL by initiating an asynchronous client request.
+/**
+ Connects to a given URL by initiating an asynchronous client request.
@param aURL A URL identifying the location of the content to load.
@@ -120,7 +128,8 @@
*/
- (void)loadURL:(NSURL *)aURL;
-/** Connects to a given URL by initiating an asynchronous client request.
+/**
+ Connects to a given URL by initiating an asynchronous client request.
@param string A string containing a URL identifying the location of the content to load.
@@ -136,30 +145,34 @@
*/
- (void)loadURLString:(NSString *)string;
-/** The URL request identifying the location of the content to load. (read-only)
+/**
+ The URL request identifying the location of the content to load. (read-only)
*/
@property (nonatomic, readonly, retain) NSURLRequest *request;
-/** The last NSURLRequest that the web view loaded. (read-only)
+/**
+ The last NSURLRequest that the web view loaded. (read-only)
*/
@property (nonatomic, retain, readonly) NSURLRequest *lastRequest;
-/** A Boolean value indicating whether the receiver is done loading content. (read-only)
+/**
+ A Boolean value indicating whether the receiver is done loading content. (read-only)
If `YES`, the receiver is still loading content; otherwise, `NO`.
*/
@property (nonatomic, readonly, getter=isLoading) BOOL loading;
-/** Returns whether the web view is loading a page. (read-only)
+/**
+ Returns whether the web view is loading a page. (read-only)
- This will return `YES` when the first NSURLRequest starts and `NO` when there are no more
- requests loading.
+ This will return `YES` when the first NSURLRequest starts and `NO` when there are no more requests loading.
Note: Setting this isn't 100% reliable since it is very hacky underneath.
*/
@property (nonatomic, readonly, getter=isLoadingPage) BOOL loadingPage;
-/** Stops the loading of any web content managed by the receiver.
+/**
+ Stops the loading of any web content managed by the receiver.
Stops any content in the process of being loaded by the main frame or any of its children frames. Does nothing if no
content is being loaded.
@@ -179,23 +192,27 @@
/// @name Moving Back and Forward
///------------------------------
-/** A Boolean value indicating whether the receiver can move backward. (read-only)
+/**
+ A Boolean value indicating whether the receiver can move backward. (read-only)
If `YES`, able to move backward; otherwise, `NO`.
*/
@property (nonatomic, readonly) BOOL canGoBack;
-/** A Boolean value indicating whether the receiver can move forward. (read-only)
+/**
+ A Boolean value indicating whether the receiver can move forward. (read-only)
If `YES`, able to move forward; otherwise, `NO`.
*/
@property (nonatomic, readonly) BOOL canGoForward;
-/** Loads the previous location in the back-forward list.
+/**
+ Loads the previous location in the back-forward list.
*/
- (void)goBack;
-/** Loads the next location in the back-forward list.
+/**
+ Loads the next location in the back-forward list.
*/
- (void)goForward;
@@ -203,14 +220,16 @@
/// @name Setting Web Content Properties
///-------------------------------------
-/** A Boolean value determining whether the webpage scales to fit the view and the user can change the scale.
+/**
+ A Boolean value determining whether the webpage scales to fit the view and the user can change the scale.
If `YES`, the webpage is scaled to fit and the user can zoom in and zoom out. If `NO`, user
zooming is disabled. The default value is `NO`.
*/
@property (nonatomic, assign) BOOL scalesPageToFit;
-/** The scroll view associated with the web view. (read-only)
+/**
+ The scroll view associated with the web view. (read-only)
Your application can access the scroll view if it wants to customize the scrolling behavior of the web view.
*/
@@ -220,7 +239,8 @@
/// @name Running JavaScript
///-------------------------
-/** Returns the result of running a script.
+/**
+ Returns the result of running a script.
@param script The script to run.
@@ -240,11 +260,11 @@
/// @name Using the JavaScript Console
///-----------------------------------
-/** A Boolean value that controls whether `console.log` messages are intercepted.
+/**
+ A Boolean value that controls whether `console.log` messages are intercepted.
- If the value of this property is `YES`, the web view will inject some JavaScript after the DOM has loaded
- that replaces `console.log` with a custom implementation that will NSLog the `console.log`
- messages.
+ If the value of this property is `YES`, the web view will inject some JavaScript after the DOM has loaded that replaces
+ `console.log` with a custom implementation that will NSLog the `console.log` messages.
Note: This isn't 100% reliable since it is very hacky underneath.
*/
@@ -254,7 +274,8 @@
/// @name Detecting Types of Data
///------------------------------
-/** The types of data converted to clickable URLs in the web view's content.
+/**
+ The types of data converted to clickable URLs in the web view's content.
You can use this property to specify the types of data (phone numbers, http links, email address, and so on) that
should be automatically converted to clickable URLs in the web view. When clicked, the web view opens the application
@@ -266,13 +287,15 @@
/// @name Managing Media Playback
///------------------------------
-/** A Boolean value that determines whether HTML5 videos play inline or use the native full-screen controller.
+/**
+ A Boolean value that determines whether HTML5 videos play inline or use the native full-screen controller.
The default value on iPhone is `NO`.
*/
@property (nonatomic, assign) BOOL allowsInlineMediaPlayback;
-/** A Boolean value that determines whether HTML5 videos can play automatically or require the user to start playing them.
+/**
+ A Boolean value that determines whether HTML5 videos can play automatically or require the user to start playing them.
The default value on both iPad and iPhone is `YES`.
*/
@@ -299,7 +322,8 @@
/// @name Resetting State
///----------------------
-/** Destroys the internal `UIWebView` and recreates.
+/**
+ Destroys the internal `UIWebView` and recreates.
All of the properties are maintained across the reset.
*/
@@ -308,19 +332,108 @@
@end
+/**
+ The `SSWebViewDelegate` protocol defines methods that a delegate of a `SSWebView` object can optionally implement to
+ intervene when web content is loaded.
+
+ @warning **Important:** Before releasing an instance of `SSWebView` for which you have set a delegate, you must first
+ set the `SSWebView` delegate property to `nil` before disposing of the `SSWebView` instance. This can be done, for
+ example, in the `dealloc` method where you dispose of the `SSWebView`.
+ */
@protocol SSWebViewDelegate <NSObject>
@optional
-// SSWebViewDelegate
+///--------------------
+/// @name Loading Pages
+///--------------------
+
+/**
+ Sent before a web view begins loading a page.
+
+ @param aWebView The web view that started loading its page.
+
+ @see webViewDidFinishLoadingPage:
+ @see webViewDidLoadDOM:
+ @see webViewDidStartLoad:
+ */
- (void)webViewDidStartLoadingPage:(SSWebView *)aWebView;
+
+/**
+ Sent after a web view finishes loading its DOM.
+
+ Note: This isn't 100% reliable.
+
+ @param aWebView The web view that finished loading its DOM.
+
+ @see webViewDidStartLoadingPage:
+ @see webViewDidFinishLoadingPage:
+ */
- (void)webViewDidLoadDOM:(SSWebView *)aWebView;
+
+/**
+ Sent after a web view finishes loading a page.
+
+ @param aWebView The web view that finished loading its page.
+
+ @see webViewDidStartLoadingPage:
+ @see webViewDidLoadDOM:
+ @see webViewDidFinishLoad:
+ */
- (void)webViewDidFinishLoadingPage:(SSWebView *)aWebView;
-// UIWebViewDelegate
+///----------------------
+/// @name Loading Content
+///----------------------
+
+/**
+ Sent if a web view failed to load a frame.
+
+ @param aWebView The web view that failed to load a frame.
+
+ @param error The error that occurred during loading.
+
+ @see webView:shouldStartLoadWithRequest:navigationType:
+ @see webViewDidStartLoad:
+ @see webViewDidFinishLoad:
+ */
- (void)webView:(SSWebView *)aWebView didFailLoadWithError:(NSError *)error;
+
+/**
+ Sent before a web view begins loading a frame.
+
+ @param aWebView The web view that is about to load a new frame.
+
+ @param aRequest The content location.
+
+ @param navigationType The type of user action that started the load request.
+
+ @see webViewDidStartLoad:
+ @see webViewDidFinishLoad:
+ @see webView:didFailLoadWithError:
+ */
- (BOOL)webView:(SSWebView *)aWebView shouldStartLoadWithRequest:(NSURLRequest *)aRequest navigationType:(UIWebViewNavigationType)navigationType;
+
+/**
+ Sent after a web view finishes loading a frame.
+
+ @param aWebView The web view has finished loading.
+
+ @see webView:shouldStartLoadWithRequest:navigationType:
+ @see webViewDidStartLoad:
+ @see webView:didFailLoadWithError:
+ */
- (void)webViewDidFinishLoad:(SSWebView *)aWebView;
+
+/**
+ Sent after a web view starts loading a frame.
+
+ @param aWebView The web view that has begun loading a new frame.
+
+ @see webView:shouldStartLoadWithRequest:navigationType:
+ @see webViewDidFinishLoad:
+ @see webView:didFailLoadWithError:
+ */
- (void)webViewDidStartLoad:(SSWebView *)aWebView;
@end
View
19 SSToolkit/UIApplication+SSToolkitAdditions.h
@@ -6,10 +6,29 @@
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//
+/**
+ Provides extensions to `UIApplication` for various common tasks.
+ */
@interface UIApplication (SSToolkitAdditions)
+/** Checks for pirated application indicators.
+
+ This isn't bulletproof, but should catch a lot of cases. Thanks @marcoarment: http://twitter.com/marcoarment/status/27965461020
+
+ @return `YES` if the application may be pirated. `NO` if it is probably not pirated.
+ */
- (BOOL)isPirated;
+/**
+ Aggregates calls to settings `networkActivityIndicatorVisible` to avoid flashing of the indicator in the status bar.
+ Simply use `setNetworkActivity:` instead of `setNetworkActivityIndicatorVisible:`.
+
+ Specify `YES` if the application should show network activity and `NO` if it should not. The default value is `NO`.
+ A spinning indicator in the status bar shows network activity. The application may explicitly hide or show this
+ indicator.
+
+ @param inProgress A Boolean value that turns an indicator of network activity on or off.
+ */
- (void)setNetworkActivity:(BOOL)inProgress;
@end
View
2  SSToolkit/UIApplication+SSToolkitAdditions.m
@@ -11,8 +11,6 @@
@implementation UIApplication (SSToolkitAdditions)
- (BOOL)isPirated {
- // This isn't bulletproof, but should catch a lot of cases. Thanks @marcoarment:
- // http://twitter.com/marcoarment/status/27965461020
return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"SignerIdentity"] != nil;
}
View
3  SSToolkit/UIColor+SSToolkitAdditions.h
@@ -6,6 +6,9 @@
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//
+/**
+ Provides extensions to `UIColor` for various common tasks.
+ */
@interface UIColor (SSToolkitAdditions)
@property (nonatomic, assign, readonly) CGFloat alpha;
View
3  SSToolkit/UIControl+SSToolkitAdditions.h
@@ -6,6 +6,9 @@
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//
+/**
+ Provides extensions to `UIControl` for various common tasks.
+ */
@interface UIControl (SSToolkitAdditions)
- (void)removeAllTargets;
View
3  SSToolkit/UIDevice+SSToolkitAdditions.h
@@ -6,6 +6,9 @@
// Copyright 2009-2011 Sam Soffes. All rights reserved.
//
+/**
+ Provides extensions to `UIDevice` for various common tasks.
+ */
@interface UIDevice (SSToolkitAdditions)
- (BOOL)isSimulator;
View
65 SSToolkit/UIImage+SSToolkitAdditions.h
@@ -6,15 +6,72 @@
// Copyright 2009-2011 Sam Soffes. All rights reserved.
//
+/**
+ Provides extensions to `UIImage` for various common tasks.
+ */
@interface UIImage (SSToolkitAdditions)
-+ (UIImage *)imageNamed:(NSString *)imageName bundle:(NSString *)bundleName;
+///-------------------
+/// @name Initializing
+///-------------------
-- (UIImage *)initWithImage:(UIImage *)image croppedToRect:(CGRect)rect;
-- (