Navigation Menu

Skip to content

Commit

Permalink
Tidied up ivar whitespace and delegate declaration semantics.
Browse files Browse the repository at this point in the history
  • Loading branch information
followben committed Oct 17, 2011
1 parent b23f6a4 commit dde7826
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 28 deletions.
33 changes: 14 additions & 19 deletions TPScrollBarController/TPScrollBarController.h
Expand Up @@ -16,27 +16,22 @@
@interface TPScrollBarController : UIViewController {

@private
__unsafe_unretained id<TPScrollBarDelegate> delegate_;
UIScrollView *scrollBar_;
UIView *contentView_;
UIViewController *selectedViewController_;
NSArray *scrollBarPageArray_;
NSOrderedSet *scrollBarPageSet_;
NSSet *viewControllers_;
NSArray *barButtons_;
NSUInteger selectedScrollBarPage_;
NSArray *registry_;
NSObject<TPScrollBarDelegate> *delegate_;

UIScrollView *scrollBar_;
UIView *contentView_;
UIViewController *selectedViewController_;
NSArray *scrollBarPageArray_;
NSOrderedSet *scrollBarPageSet_;
NSSet *viewControllers_;
NSArray *barButtons_;
NSUInteger selectedScrollBarPage_;
NSArray *registry_;
}

@property(nonatomic, assign) id<TPScrollBarDelegate> delegate;

@property(nonatomic, readonly) UIScrollView *scrollBar;
@property(nonatomic, readonly) UIView *contentView;
@property(nonatomic, readonly) UIViewController *selectedViewController;
@property(nonatomic, readonly) NSOrderedSet *scrollBarPageSet;
@property(nonatomic, readonly) NSSet *viewControllers;
@property(nonatomic, readonly) NSArray *barButtons;
@property(nonatomic, readonly) NSUInteger selectedScrollBarPage;
@property(nonatomic, strong) NSObject<TPScrollBarDelegate> *delegate;
@property(nonatomic, readonly) UIViewController *selectedViewController;
@property(nonatomic, readonly) NSUInteger selectedScrollBarPage;

- (void)setViewControllers:(NSSet *)viewControllers
WithBarButtons:(NSArray *)barButtons
Expand Down
18 changes: 9 additions & 9 deletions TPScrollBarController/TPScrollBarController.m
Expand Up @@ -15,16 +15,16 @@
#pragma mark -
@interface TPScrollBarController ()

@property(nonatomic) UIScrollView *scrollBar;
@property(nonatomic) UIView *contentView;
@property(nonatomic) UIViewController *selectedViewController;
@property(nonatomic) NSOrderedSet *scrollBarPageSet;
@property(nonatomic) NSSet *viewControllers;
@property(nonatomic) NSArray *barButtons;
@property(nonatomic) NSUInteger selectedScrollBarPage;

@property(nonatomic, strong) NSArray *scrollBarPageArray;
@property(nonatomic, strong) NSArray *registry;
@property(nonatomic, strong) UIScrollView *scrollBar;
@property(nonatomic, strong) UIView *contentView;
@property(nonatomic, strong) NSOrderedSet *scrollBarPageSet;
@property(nonatomic, strong) NSSet *viewControllers;
@property(nonatomic, strong) NSArray *barButtons;
@property(nonatomic, strong) NSArray *scrollBarPageArray;
@property(nonatomic, strong) NSArray *registry;

- (void)performSelectorOnDelegate:(SEL)aSelector withObject:(id)param1 andObject:(id)param2;
- (void)initaliseContainerViews;
Expand Down Expand Up @@ -145,8 +145,8 @@ - (void)selectScrollBarPage:(NSUInteger)pageNumber animated:(BOOL)animated

- (void)performSelectorOnDelegate:(SEL)aSelector withObject:(id)param1 andObject:(id)param2;
{
if ([self.delegate respondsToSelector:aSelector])
objc_msgSend(self.delegate, aSelector, param1, param2); // performSelector: generates compiler warnings under ARC
if ([delegate_ respondsToSelector:aSelector])
objc_msgSend(delegate_, aSelector, param1, param2); // performSelector: generates compiler warnings under ARC
}

// Initialises an empty scrollBar and contentView and adds them as subviews.
Expand Down

0 comments on commit dde7826

Please sign in to comment.