Skip to content

Commit

Permalink
ATPagingView: Make the controller IB-friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
andreyvit committed Apr 19, 2011
1 parent 256bfac commit eda8621
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
6 changes: 4 additions & 2 deletions ATPagingView/ATPagingView.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@
@end


@interface ATPagingViewController : UIViewController <ATPagingViewDelegate>
@interface ATPagingViewController : UIViewController <ATPagingViewDelegate> {
ATPagingView *_pagingView;
}

@property(nonatomic, readonly) ATPagingView *pagingView;
@property(nonatomic, retain) IBOutlet ATPagingView *pagingView;

@end
13 changes: 4 additions & 9 deletions ATPagingView/ATPagingView.m
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,14 @@ - (void)knownToBeIdle {

@implementation ATPagingViewController

@synthesize pagingView=_pagingView;


#pragma mark -
#pragma mark init/dealloc

- (void)dealloc {
[_pagingView release], _pagingView = nil;
[super dealloc];
}

Expand All @@ -405,7 +408,7 @@ - (void)dealloc {
#pragma mark View Loading

- (void)loadView {
self.view = [[[ATPagingView alloc] init] autorelease];
self.view = self.pagingView = [[[ATPagingView alloc] init] autorelease];
}

- (void)viewDidLoad {
Expand All @@ -423,14 +426,6 @@ - (void)viewWillAppear:(BOOL)animated {
}


#pragma mark -
#pragma mark View Access

- (ATPagingView *)pagingView {
return (ATPagingView *)self.view;
}


#pragma mark -
#pragma mark Rotation

Expand Down

0 comments on commit eda8621

Please sign in to comment.