forked from twitter-archive/twui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More scrolling tweaks; adding 2-axis scrolling view to example project
- Loading branch information
Brian William Wolter
committed
Sep 27, 2011
1 parent
91c7aa9
commit d434ab9
Showing
8 changed files
with
320 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
Copyright 2011 Twitter, Inc. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this work except in compliance with the License. | ||
You may obtain a copy of the License in the LICENSE file, or at: | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
#import "TUIKit.h" | ||
#import "ExampleTabBar.h" | ||
|
||
@interface ExampleScrollView : TUIView | ||
{ | ||
TUIScrollView * _scrollView; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
Copyright 2011 Twitter, Inc. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this work except in compliance with the License. | ||
You may obtain a copy of the License in the LICENSE file, or at: | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
#import "ExampleScrollView.h" | ||
|
||
@implementation ExampleScrollView | ||
|
||
- (id)initWithFrame:(CGRect)frame | ||
{ | ||
if((self = [super initWithFrame:frame])) { | ||
self.backgroundColor = [TUIColor colorWithWhite:0.9 alpha:1.0]; | ||
|
||
_scrollView = [[TUIScrollView alloc] initWithFrame:self.bounds]; | ||
_scrollView.autoresizingMask = TUIViewAutoresizingFlexibleSize; | ||
_scrollView.scrollIndicatorStyle = TUIScrollViewIndicatorStyleDark; | ||
[self addSubview:_scrollView]; | ||
|
||
TUIImageView *imageView = [[TUIImageView alloc] initWithImage:[TUIImage imageNamed:@"large-image.jpeg"]]; | ||
[_scrollView addSubview:imageView]; | ||
[_scrollView setContentSize:imageView.frame.size]; | ||
[imageView release]; | ||
|
||
} | ||
return self; | ||
} | ||
|
||
- (void)dealloc | ||
{ | ||
[_scrollView release]; | ||
[super dealloc]; | ||
} | ||
|
||
@end |
Oops, something went wrong.