-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexander Repty
committed
Feb 12, 2010
0 parents
commit 850fa58
Showing
22 changed files
with
1,257 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// ARScrollViewEnhancer.h | ||
// ScrollViewPagingExample | ||
// | ||
// Created by Alexander Repty on 12.02.10. | ||
// Copyright 2010 Enough Software. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface ARScrollViewEnhancer : UIView { | ||
IBOutlet UIScrollView *_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,31 @@ | ||
// | ||
// ARScrollViewEnhancer.m | ||
// ScrollViewPagingExample | ||
// | ||
// Created by Alexander Repty on 12.02.10. | ||
// Copyright 2010 Enough Software. All rights reserved. | ||
// | ||
|
||
#import "ARScrollViewEnhancer.h" | ||
|
||
@implementation ARScrollViewEnhancer | ||
|
||
#pragma mark - | ||
#pragma mark Construction & Destruction | ||
|
||
- (void)dealloc { | ||
[_scrollView release]; | ||
[super dealloc]; | ||
} | ||
|
||
#pragma mark - | ||
#pragma mark UIView methods | ||
|
||
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { | ||
if ([self pointInside:point withEvent:event]) { | ||
return _scrollView; | ||
} | ||
return nil; | ||
} | ||
|
||
@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,22 @@ | ||
// | ||
// ScrollViewPagingExampleAppDelegate.h | ||
// ScrollViewPagingExample | ||
// | ||
// Created by Alexander Repty on 12.02.10. | ||
// Copyright Enough Software 2010. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@class ScrollViewPagingExampleViewController; | ||
|
||
@interface ScrollViewPagingExampleAppDelegate : NSObject <UIApplicationDelegate> { | ||
UIWindow *window; | ||
ScrollViewPagingExampleViewController *viewController; | ||
} | ||
|
||
@property (nonatomic, retain) IBOutlet UIWindow *window; | ||
@property (nonatomic, retain) IBOutlet ScrollViewPagingExampleViewController *viewController; | ||
|
||
@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,33 @@ | ||
// | ||
// ScrollViewPagingExampleAppDelegate.m | ||
// ScrollViewPagingExample | ||
// | ||
// Created by Alexander Repty on 12.02.10. | ||
// Copyright Enough Software 2010. All rights reserved. | ||
// | ||
|
||
#import "ScrollViewPagingExampleAppDelegate.h" | ||
#import "ScrollViewPagingExampleViewController.h" | ||
|
||
@implementation ScrollViewPagingExampleAppDelegate | ||
|
||
@synthesize window; | ||
@synthesize viewController; | ||
|
||
|
||
- (void)applicationDidFinishLaunching:(UIApplication *)application { | ||
|
||
// Override point for customization after app launch | ||
[window addSubview:viewController.view]; | ||
[window makeKeyAndVisible]; | ||
} | ||
|
||
|
||
- (void)dealloc { | ||
[viewController release]; | ||
[window release]; | ||
[super dealloc]; | ||
} | ||
|
||
|
||
@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,16 @@ | ||
// | ||
// ScrollViewPagingExampleViewController.h | ||
// ScrollViewPagingExample | ||
// | ||
// Created by Alexander Repty on 12.02.10. | ||
// Copyright Enough Software 2010. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface ScrollViewPagingExampleViewController : UIViewController { | ||
IBOutlet UIScrollView *_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,54 @@ | ||
// | ||
// ScrollViewPagingExampleViewController.m | ||
// ScrollViewPagingExample | ||
// | ||
// Created by Alexander Repty on 12.02.10. | ||
// Copyright Enough Software 2010. All rights reserved. | ||
// | ||
|
||
#import "ScrollViewPagingExampleViewController.h" | ||
|
||
@implementation ScrollViewPagingExampleViewController | ||
|
||
#pragma mark - | ||
#pragma mark Construction & Destruction | ||
|
||
- (void)dealloc { | ||
[_scrollView release]; | ||
[super dealloc]; | ||
} | ||
|
||
#pragma mark - | ||
#pragma mark UIViewController methods | ||
|
||
- (void)viewDidLoad { | ||
_scrollView.clipsToBounds = NO; | ||
_scrollView.pagingEnabled = YES; | ||
_scrollView.showsHorizontalScrollIndicator = NO; | ||
|
||
CGFloat contentOffset = 0.0f; | ||
NSArray *imageFilenames = [NSArray arrayWithObjects:@"mborsten.jpg", | ||
@"arepty.jpg", | ||
@"bmf.jpg", | ||
@"mgprot.jpg", | ||
@"sgaw.jpg", | ||
@"tarasis.jpg", | ||
@"uliwitness.jpg", | ||
@"cgodefroy.jpg", | ||
nil]; | ||
|
||
for (NSString *singleImageFilename in imageFilenames) { | ||
CGRect imageViewFrame = CGRectMake(contentOffset, 0.0f, _scrollView.frame.size.width, _scrollView.frame.size.height); | ||
|
||
UIImageView *imageView = [[UIImageView alloc] initWithFrame:imageViewFrame]; | ||
imageView.image = [UIImage imageNamed:singleImageFilename]; | ||
imageView.contentMode = UIViewContentModeCenter; | ||
[_scrollView addSubview:imageView]; | ||
[imageView release]; | ||
|
||
contentOffset += imageView.frame.size.width; | ||
_scrollView.contentSize = CGSizeMake(contentOffset, _scrollView.frame.size.height); | ||
} | ||
} | ||
|
||
@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,219 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10"> | ||
<data> | ||
<int key="IBDocument.SystemTarget">784</int> | ||
<string key="IBDocument.SystemVersion">10A394</string> | ||
<string key="IBDocument.InterfaceBuilderVersion">732</string> | ||
<string key="IBDocument.AppKitVersion">1027.1</string> | ||
<string key="IBDocument.HIToolboxVersion">430.00</string> | ||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions"> | ||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
<string key="NS.object.0">60</string> | ||
</object> | ||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
<integer value="10"/> | ||
</object> | ||
<object class="NSArray" key="IBDocument.PluginDependencies"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
</object> | ||
<object class="NSMutableDictionary" key="IBDocument.Metadata"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
<object class="NSArray" key="dict.sortedKeys" id="0"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
</object> | ||
<object class="NSMutableArray" key="dict.values"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
</object> | ||
</object> | ||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
<object class="IBProxyObject" id="841351856"> | ||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string> | ||
</object> | ||
<object class="IBProxyObject" id="427554174"> | ||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string> | ||
</object> | ||
<object class="IBUICustomObject" id="664661524"/> | ||
<object class="IBUIViewController" id="943309135"> | ||
<string key="IBUINibName">ScrollViewPagingExampleViewController</string> | ||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/> | ||
</object> | ||
<object class="IBUIWindow" id="117978783"> | ||
<nil key="NSNextResponder"/> | ||
<int key="NSvFlags">292</int> | ||
<string key="NSFrameSize">{320, 480}</string> | ||
<object class="NSColor" key="IBUIBackgroundColor"> | ||
<int key="NSColorSpace">1</int> | ||
<bytes key="NSRGB">MSAxIDEAA</bytes> | ||
</object> | ||
<bool key="IBUIOpaque">NO</bool> | ||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool> | ||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/> | ||
</object> | ||
</object> | ||
<object class="IBObjectContainer" key="IBDocument.Objects"> | ||
<object class="NSMutableArray" key="connectionRecords"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
<object class="IBConnectionRecord"> | ||
<object class="IBCocoaTouchOutletConnection" key="connection"> | ||
<string key="label">delegate</string> | ||
<reference key="source" ref="841351856"/> | ||
<reference key="destination" ref="664661524"/> | ||
</object> | ||
<int key="connectionID">4</int> | ||
</object> | ||
<object class="IBConnectionRecord"> | ||
<object class="IBCocoaTouchOutletConnection" key="connection"> | ||
<string key="label">viewController</string> | ||
<reference key="source" ref="664661524"/> | ||
<reference key="destination" ref="943309135"/> | ||
</object> | ||
<int key="connectionID">11</int> | ||
</object> | ||
<object class="IBConnectionRecord"> | ||
<object class="IBCocoaTouchOutletConnection" key="connection"> | ||
<string key="label">window</string> | ||
<reference key="source" ref="664661524"/> | ||
<reference key="destination" ref="117978783"/> | ||
</object> | ||
<int key="connectionID">14</int> | ||
</object> | ||
</object> | ||
<object class="IBMutableOrderedSet" key="objectRecords"> | ||
<object class="NSArray" key="orderedObjects"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
<object class="IBObjectRecord"> | ||
<int key="objectID">0</int> | ||
<reference key="object" ref="0"/> | ||
<reference key="children" ref="1000"/> | ||
<nil key="parent"/> | ||
</object> | ||
<object class="IBObjectRecord"> | ||
<int key="objectID">-1</int> | ||
<reference key="object" ref="841351856"/> | ||
<reference key="parent" ref="0"/> | ||
<string key="objectName">File's Owner</string> | ||
</object> | ||
<object class="IBObjectRecord"> | ||
<int key="objectID">3</int> | ||
<reference key="object" ref="664661524"/> | ||
<reference key="parent" ref="0"/> | ||
<string key="objectName">ScrollViewPagingExample App Delegate</string> | ||
</object> | ||
<object class="IBObjectRecord"> | ||
<int key="objectID">-2</int> | ||
<reference key="object" ref="427554174"/> | ||
<reference key="parent" ref="0"/> | ||
</object> | ||
<object class="IBObjectRecord"> | ||
<int key="objectID">10</int> | ||
<reference key="object" ref="943309135"/> | ||
<reference key="parent" ref="0"/> | ||
</object> | ||
<object class="IBObjectRecord"> | ||
<int key="objectID">12</int> | ||
<reference key="object" ref="117978783"/> | ||
<reference key="parent" ref="0"/> | ||
</object> | ||
</object> | ||
</object> | ||
<object class="NSMutableDictionary" key="flattenedProperties"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
<object class="NSArray" key="dict.sortedKeys"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
<string>-1.CustomClassName</string> | ||
<string>-2.CustomClassName</string> | ||
<string>10.CustomClassName</string> | ||
<string>10.IBEditorWindowLastContentRect</string> | ||
<string>10.IBPluginDependency</string> | ||
<string>12.IBEditorWindowLastContentRect</string> | ||
<string>12.IBPluginDependency</string> | ||
<string>3.CustomClassName</string> | ||
<string>3.IBPluginDependency</string> | ||
</object> | ||
<object class="NSMutableArray" key="dict.values"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
<string>UIApplication</string> | ||
<string>UIResponder</string> | ||
<string>ScrollViewPagingExampleViewController</string> | ||
<string>{{512, 351}, {320, 480}}</string> | ||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
<string>{{525, 346}, {320, 480}}</string> | ||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
<string>ScrollViewPagingExampleAppDelegate</string> | ||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
</object> | ||
</object> | ||
<object class="NSMutableDictionary" key="unlocalizedProperties"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
<reference key="dict.sortedKeys" ref="0"/> | ||
<object class="NSMutableArray" key="dict.values"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
</object> | ||
</object> | ||
<nil key="activeLocalization"/> | ||
<object class="NSMutableDictionary" key="localizations"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
<reference key="dict.sortedKeys" ref="0"/> | ||
<object class="NSMutableArray" key="dict.values"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
</object> | ||
</object> | ||
<nil key="sourceID"/> | ||
<int key="maxID">14</int> | ||
</object> | ||
<object class="IBClassDescriber" key="IBDocument.Classes"> | ||
<object class="NSMutableArray" key="referencedPartialClassDescriptions"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
<object class="IBPartialClassDescription"> | ||
<string key="className">ScrollViewPagingExampleAppDelegate</string> | ||
<string key="superclassName">NSObject</string> | ||
<object class="NSMutableDictionary" key="outlets"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
<object class="NSArray" key="dict.sortedKeys"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
<string>viewController</string> | ||
<string>window</string> | ||
</object> | ||
<object class="NSMutableArray" key="dict.values"> | ||
<bool key="EncodedWithXMLCoder">YES</bool> | ||
<string>ScrollViewPagingExampleViewController</string> | ||
<string>UIWindow</string> | ||
</object> | ||
</object> | ||
<object class="IBClassDescriptionSource" key="sourceIdentifier"> | ||
<string key="majorKey">IBProjectSource</string> | ||
<string key="minorKey">Classes/ScrollViewPagingExampleAppDelegate.h</string> | ||
</object> | ||
</object> | ||
<object class="IBPartialClassDescription"> | ||
<string key="className">ScrollViewPagingExampleAppDelegate</string> | ||
<string key="superclassName">NSObject</string> | ||
<object class="IBClassDescriptionSource" key="sourceIdentifier"> | ||
<string key="majorKey">IBUserSource</string> | ||
<string key="minorKey"/> | ||
</object> | ||
</object> | ||
<object class="IBPartialClassDescription"> | ||
<string key="className">ScrollViewPagingExampleViewController</string> | ||
<string key="superclassName">UIViewController</string> | ||
<object class="IBClassDescriptionSource" key="sourceIdentifier"> | ||
<string key="majorKey">IBProjectSource</string> | ||
<string key="minorKey">Classes/ScrollViewPagingExampleViewController.h</string> | ||
</object> | ||
</object> | ||
</object> | ||
</object> | ||
<int key="IBDocument.localizationMode">0</int> | ||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> | ||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string> | ||
<integer value="3100" key="NS.object.0"/> | ||
</object> | ||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> | ||
<string key="IBDocument.LastKnownRelativeProjectPath">ScrollViewPagingExample.xcodeproj</string> | ||
<int key="IBDocument.defaultPropertyAccessControl">3</int> | ||
<string key="IBCocoaTouchPluginVersion">3.1</string> | ||
</data> | ||
</archive> |
Empty file.
Oops, something went wrong.