├── PSTCenteredScrollView ├── en.lproj │ └── InfoPlist.strings ├── Default.png ├── Default@2x.png ├── Default-568h@2x.png ├── PSTContentInsetCenteredScrollView.h ├── PSTContentOffsetCenteredScrollView.h ├── PSTLayoutSubviewCenteredScrollView.h ├── PSTViewController.h ├── PSTAppDelegate.h ├── PSTCenteredScrollView.h ├── PSTCenteredScrollView-Prefix.pch ├── main.m ├── PSTContentOffsetCenteredScrollView.m ├── PSTLayoutSubviewCenteredScrollView.m ├── PSTContentInsetCenteredScrollView.m ├── PSTAppDelegate.m ├── PSTViewController.m ├── PSTCenteredScrollView-Info.plist └── PSTCenteredScrollView.m ├── README.md ├── .gitignore ├── LICENSE └── PSTCenteredScrollView.xcodeproj └── project.pbxproj /PSTCenteredScrollView/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steipete/PSTCenteredScrollView/HEAD/PSTCenteredScrollView/Default.png -------------------------------------------------------------------------------- /PSTCenteredScrollView/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steipete/PSTCenteredScrollView/HEAD/PSTCenteredScrollView/Default@2x.png -------------------------------------------------------------------------------- /PSTCenteredScrollView/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/steipete/PSTCenteredScrollView/HEAD/PSTCenteredScrollView/Default-568h@2x.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | PSTCenteredScrollView 2 | ===================== 3 | 4 | Shows off different ways to center content in a UIScrollView. 5 | 6 | See my [blog post](http://petersteinberger.com/blog/2013/how-to-center-uiscrollview/) for details. 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | *.xcworkspace 13 | !default.xcworkspace 14 | xcuserdata 15 | profile 16 | *.moved-aside 17 | DerivedData 18 | .idea/ 19 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/PSTContentInsetCenteredScrollView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSTContentInsetCenteredScrollView.h 3 | // PSTCenteredScrollView 4 | // 5 | // Created by Peter Steinberger on 2/21/13. 6 | // Copyright (c) 2013 PSPDFKit. All rights reserved. 7 | // 8 | 9 | #import "PSTCenteredScrollView.h" 10 | 11 | @interface PSTContentInsetCenteredScrollView : PSTCenteredScrollView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/PSTContentOffsetCenteredScrollView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSTContentOffsetCenteredScrollView.h 3 | // PSTCenteredScrollView 4 | // 5 | // Created by Peter Steinberger on 2/21/13. 6 | // Copyright (c) 2013 PSPDFKit. All rights reserved. 7 | // 8 | 9 | #import "PSTCenteredScrollView.h" 10 | 11 | @interface PSTContentOffsetCenteredScrollView : PSTCenteredScrollView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/PSTLayoutSubviewCenteredScrollView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSTLayoutSubviewCenteredScrollView.h 3 | // PSTCenteredScrollView 4 | // 5 | // Created by Peter Steinberger on 2/21/13. 6 | // Copyright (c) 2013 PSPDFKit. All rights reserved. 7 | // 8 | 9 | #import "PSTCenteredScrollView.h" 10 | 11 | @interface PSTLayoutSubviewCenteredScrollView : PSTCenteredScrollView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/PSTViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSTViewController.h 3 | // PSTCenteredScrollView 4 | // 5 | // Created by Peter Steinberger on 2/21/13. 6 | // Copyright (c) 2013 PSPDFKit. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PSTViewController : UIViewController 12 | 13 | - (id)initWithScrollViewClass:(Class)scrollViewClass; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/PSTAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSTAppDelegate.h 3 | // PSTCenteredScrollView 4 | // 5 | // Created by Peter Steinberger on 2/21/13. 6 | // Copyright (c) 2013 PSPDFKit. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PSTAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/PSTCenteredScrollView.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSTCenteredScrollView.h 3 | // PSTCenteredScrollView 4 | // 5 | // Created by Peter Steinberger on 2/21/13. 6 | // Copyright (c) 2013 PSPDFKit. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PSTCenteredScrollView : UIScrollView 12 | 13 | @property (nonatomic, strong) UIView *containerView; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/PSTCenteredScrollView-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'PSTCenteredScrollView' target in the 'PSTCenteredScrollView' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_4_0 8 | #warning "This project uses features only available in iOS SDK 4.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // PSTCenteredScrollView 4 | // 5 | // Created by Peter Steinberger on 2/21/13. 6 | // Copyright (c) 2013 PSPDFKit. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "PSTAppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([PSTAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/PSTContentOffsetCenteredScrollView.m: -------------------------------------------------------------------------------- 1 | // 2 | // PSTContentOffsetCenteredScrollView.m 3 | // PSTCenteredScrollView 4 | // 5 | // Created by Peter Steinberger on 2/21/13. 6 | // Copyright (c) 2013 PSPDFKit. All rights reserved. 7 | // 8 | 9 | #import "PSTContentOffsetCenteredScrollView.h" 10 | 11 | @implementation PSTContentOffsetCenteredScrollView 12 | 13 | - (void)setContentOffset:(CGPoint)anOffset { 14 | if(self.containerView != nil) { 15 | CGSize zoomViewSize = self.containerView.frame.size; 16 | CGSize scrollViewSize = self.bounds.size; 17 | 18 | if(zoomViewSize.width < scrollViewSize.width) { 19 | anOffset.x = -(scrollViewSize.width - zoomViewSize.width) / 2.0; 20 | } 21 | 22 | if(zoomViewSize.height < scrollViewSize.height) { 23 | anOffset.y = -(scrollViewSize.height - zoomViewSize.height) / 2.0; 24 | } 25 | } 26 | super.contentOffset = anOffset; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/PSTLayoutSubviewCenteredScrollView.m: -------------------------------------------------------------------------------- 1 | // 2 | // PSTLayoutSubviewCenteredScrollView.m 3 | // PSTCenteredScrollView 4 | // 5 | // Created by Peter Steinberger on 2/21/13. 6 | // Copyright (c) 2013 PSPDFKit. All rights reserved. 7 | // 8 | 9 | #import "PSTLayoutSubviewCenteredScrollView.h" 10 | 11 | @implementation PSTLayoutSubviewCenteredScrollView 12 | 13 | - (void)layoutSubviews { 14 | [super layoutSubviews]; 15 | 16 | CGSize boundsSize = self.bounds.size; 17 | UIView *centerView = self.containerView; 18 | CGRect frameToCenter = centerView.frame; 19 | 20 | if (frameToCenter.size.width < boundsSize.width) { 21 | frameToCenter.origin.x = (boundsSize.width - frameToCenter.size.width) * 0.5f; 22 | } else { 23 | frameToCenter.origin.x = 0; 24 | } 25 | 26 | if (frameToCenter.size.height < boundsSize.height) { 27 | frameToCenter.origin.y = (boundsSize.height - frameToCenter.size.height) * 0.5f; 28 | } else { 29 | frameToCenter.origin.y = 0; 30 | } 31 | 32 | centerView.frame = frameToCenter; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Peter Steinberger 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/PSTContentInsetCenteredScrollView.m: -------------------------------------------------------------------------------- 1 | // 2 | // PSTContentInsetCenteredScrollView.m 3 | // PSTCenteredScrollView 4 | // 5 | // Created by Peter Steinberger on 2/21/13. 6 | // Copyright (c) 2013 PSPDFKit. All rights reserved. 7 | // 8 | 9 | #import "PSTContentInsetCenteredScrollView.h" 10 | 11 | @implementation PSTContentInsetCenteredScrollView 12 | 13 | - (void)centerContent { 14 | CGFloat top = 0, left = 0; 15 | if (self.contentSize.width < self.bounds.size.width) { 16 | left = (self.bounds.size.width-self.contentSize.width) * 0.5f; 17 | } 18 | if (self.contentSize.height < self.bounds.size.height) { 19 | top = (self.bounds.size.height-self.contentSize.height) * 0.5f; 20 | } 21 | self.contentInset = UIEdgeInsetsMake(top, left, top, left); 22 | } 23 | 24 | - (void)didAddSubview:(UIView *)subview { 25 | [super didAddSubview:subview]; 26 | [self centerContent]; 27 | } 28 | 29 | - (void)scrollViewDidZoom:(__unused UIScrollView *)scrollView { 30 | [self centerContent]; 31 | } 32 | 33 | - (void)setFrame:(CGRect)frame { 34 | [super setFrame:frame]; 35 | [self centerContent]; 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/PSTAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // PSTAppDelegate.m 3 | // PSTCenteredScrollView 4 | // 5 | // Created by Peter Steinberger on 2/21/13. 6 | // Copyright (c) 2013 PSPDFKit. All rights reserved. 7 | // 8 | 9 | #import "PSTAppDelegate.h" 10 | #import "PSTViewController.h" 11 | #import "PSTContentInsetCenteredScrollView.h" 12 | #import "PSTLayoutSubviewCenteredScrollView.h" 13 | #import "PSTContentOffsetCenteredScrollView.h" 14 | 15 | @implementation PSTAppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 18 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 19 | UITabBarController *tabController = [[UITabBarController alloc] initWithNibName:nil bundle:nil]; 20 | 21 | tabController.viewControllers = @[[[PSTViewController alloc] initWithScrollViewClass:PSTLayoutSubviewCenteredScrollView.class], 22 | [[PSTViewController alloc] initWithScrollViewClass:PSTContentOffsetCenteredScrollView.class], 23 | [[PSTViewController alloc] initWithScrollViewClass:PSTContentInsetCenteredScrollView.class]]; 24 | 25 | self.window.rootViewController = tabController; 26 | [self.window makeKeyAndVisible]; 27 | return YES; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/PSTViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PSTViewController.m 3 | // PSTCenteredScrollView 4 | // 5 | // Created by Peter Steinberger on 2/21/13. 6 | // Copyright (c) 2013 PSPDFKit. All rights reserved. 7 | // 8 | 9 | #import "PSTViewController.h" 10 | #import "PSTCenteredScrollView.h" 11 | 12 | @interface PSTViewController () 13 | @property (nonatomic, strong) Class scrollViewClass; 14 | @end 15 | 16 | @implementation PSTViewController 17 | 18 | - (id)initWithScrollViewClass:(Class)scrollViewClass { 19 | if (self = [super initWithNibName:nil bundle:nil]) { 20 | _scrollViewClass = scrollViewClass; 21 | self.tabBarItem = [[UITabBarItem alloc] initWithTitle:[[NSStringFromClass(scrollViewClass) stringByReplacingOccurrencesOfString:@"CenteredScrollView" withString:@""] stringByReplacingOccurrencesOfString:@"PST" withString:@""] image:nil tag:0]; 22 | } 23 | return self; 24 | } 25 | 26 | - (void)viewDidLoad { 27 | [super viewDidLoad]; 28 | 29 | PSTCenteredScrollView *scrollView = [[self.scrollViewClass alloc] initWithFrame:self.view.bounds]; 30 | scrollView.backgroundColor = [UIColor colorWithRed:1.000 green:0.992 blue:0.841 alpha:1.000]; 31 | scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; 32 | [self.view addSubview:scrollView]; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/PSTCenteredScrollView-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.pspdfkit.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /PSTCenteredScrollView/PSTCenteredScrollView.m: -------------------------------------------------------------------------------- 1 | // 2 | // PSTCenteredScrollView.m 3 | // PSTCenteredScrollView 4 | // 5 | // Created by Peter Steinberger on 2/21/13. 6 | // Copyright (c) 2013 PSPDFKit. All rights reserved. 7 | // 8 | 9 | #import "PSTCenteredScrollView.h" 10 | #import 11 | 12 | @interface PSTCenteredScrollView () 13 | @property (nonatomic, strong) UIView *testView; 14 | @end 15 | 16 | @implementation PSTCenteredScrollView 17 | 18 | - (id)initWithFrame:(CGRect)frame { 19 | if (self = [super initWithFrame:frame]) { 20 | self.delegate = self; 21 | 22 | self.maximumZoomScale = 20; 23 | 24 | self.containerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 400, 900)]; 25 | self.containerView.backgroundColor = [UIColor blueColor]; 26 | self.containerView.layer.borderColor = [UIColor darkGrayColor].CGColor; 27 | self.containerView.layer.borderWidth = 2.f; 28 | 29 | [self addSubview:self.containerView]; 30 | self.contentSize = self.containerView.frame.size; 31 | 32 | self.testView = [[UIView alloc] initWithFrame:CGRectMake(270, 170, 50, 50)]; 33 | self.testView.backgroundColor = [UIColor greenColor]; 34 | [self.containerView addSubview:self.testView]; 35 | 36 | UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(doubleTapped:)]; 37 | tapGesture.numberOfTapsRequired = 2; 38 | [self addGestureRecognizer:tapGesture]; 39 | } 40 | return self; 41 | } 42 | 43 | - (void)doubleTapped:(UITapGestureRecognizer *)tapGesture { 44 | if (self.zoomScale == 1) { 45 | [self zoomToRect:CGRectInset(self.testView.frame, -1, -1) animated:YES]; 46 | }else { 47 | [self setZoomScale:1 animated:YES]; 48 | } 49 | } 50 | 51 | - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { 52 | return self.containerView; 53 | } 54 | 55 | 56 | /* 57 | - (void)layoutSubviews { 58 | [super layoutSubviews]; 59 | 60 | CGSize boundsSize = self.bounds.size; 61 | UIView *centerView = self.containerView; 62 | CGRect frameToCenter = centerView.frame; 63 | 64 | if (frameToCenter.size.width < boundsSize.width) { 65 | frameToCenter.origin.x = (boundsSize.width - frameToCenter.size.width) * 0.5f; 66 | } else { 67 | frameToCenter.origin.x = 0; 68 | } 69 | 70 | if (frameToCenter.size.height < boundsSize.height) { 71 | frameToCenter.origin.y = (boundsSize.height - frameToCenter.size.height) * 0.5f; 72 | } else { 73 | frameToCenter.origin.y = 0; 74 | } 75 | 76 | centerView.frame = frameToCenter; 77 | }*/ 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /PSTCenteredScrollView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 7832D66B16D60306006EAA5D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7832D66A16D60306006EAA5D /* UIKit.framework */; }; 11 | 7832D66D16D60306006EAA5D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7832D66C16D60306006EAA5D /* Foundation.framework */; }; 12 | 7832D66F16D60306006EAA5D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7832D66E16D60306006EAA5D /* CoreGraphics.framework */; }; 13 | 7832D67516D60306006EAA5D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7832D67316D60306006EAA5D /* InfoPlist.strings */; }; 14 | 7832D67716D60306006EAA5D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7832D67616D60306006EAA5D /* main.m */; }; 15 | 7832D67B16D60306006EAA5D /* PSTAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7832D67A16D60306006EAA5D /* PSTAppDelegate.m */; }; 16 | 7832D67D16D60306006EAA5D /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 7832D67C16D60306006EAA5D /* Default.png */; }; 17 | 7832D67F16D60306006EAA5D /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7832D67E16D60306006EAA5D /* Default@2x.png */; }; 18 | 7832D68116D60306006EAA5D /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7832D68016D60306006EAA5D /* Default-568h@2x.png */; }; 19 | 7832D68416D60306006EAA5D /* PSTViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7832D68316D60306006EAA5D /* PSTViewController.m */; }; 20 | 7832D69216D60327006EAA5D /* PSTCenteredScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7832D69116D60327006EAA5D /* PSTCenteredScrollView.m */; }; 21 | 785C581F16D62AC300196B38 /* PSTLayoutSubviewCenteredScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 785C581E16D62AC300196B38 /* PSTLayoutSubviewCenteredScrollView.m */; }; 22 | 785C582216D62B2400196B38 /* PSTContentInsetCenteredScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 785C582116D62B2400196B38 /* PSTContentInsetCenteredScrollView.m */; }; 23 | 785C582516D635E700196B38 /* PSTContentOffsetCenteredScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 785C582416D635E700196B38 /* PSTContentOffsetCenteredScrollView.m */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXFileReference section */ 27 | 7832D66716D60306006EAA5D /* PSTCenteredScrollView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PSTCenteredScrollView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 28 | 7832D66A16D60306006EAA5D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 29 | 7832D66C16D60306006EAA5D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 30 | 7832D66E16D60306006EAA5D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 31 | 7832D67216D60306006EAA5D /* PSTCenteredScrollView-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PSTCenteredScrollView-Info.plist"; sourceTree = ""; }; 32 | 7832D67416D60306006EAA5D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 33 | 7832D67616D60306006EAA5D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 34 | 7832D67816D60306006EAA5D /* PSTCenteredScrollView-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PSTCenteredScrollView-Prefix.pch"; sourceTree = ""; }; 35 | 7832D67916D60306006EAA5D /* PSTAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PSTAppDelegate.h; sourceTree = ""; }; 36 | 7832D67A16D60306006EAA5D /* PSTAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PSTAppDelegate.m; sourceTree = ""; }; 37 | 7832D67C16D60306006EAA5D /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 38 | 7832D67E16D60306006EAA5D /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 39 | 7832D68016D60306006EAA5D /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 40 | 7832D68216D60306006EAA5D /* PSTViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PSTViewController.h; sourceTree = ""; }; 41 | 7832D68316D60306006EAA5D /* PSTViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PSTViewController.m; sourceTree = ""; }; 42 | 7832D69016D60327006EAA5D /* PSTCenteredScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSTCenteredScrollView.h; sourceTree = ""; }; 43 | 7832D69116D60327006EAA5D /* PSTCenteredScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSTCenteredScrollView.m; sourceTree = ""; }; 44 | 785C581D16D62AC300196B38 /* PSTLayoutSubviewCenteredScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSTLayoutSubviewCenteredScrollView.h; sourceTree = ""; }; 45 | 785C581E16D62AC300196B38 /* PSTLayoutSubviewCenteredScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSTLayoutSubviewCenteredScrollView.m; sourceTree = ""; }; 46 | 785C582016D62B2400196B38 /* PSTContentInsetCenteredScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSTContentInsetCenteredScrollView.h; sourceTree = ""; }; 47 | 785C582116D62B2400196B38 /* PSTContentInsetCenteredScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSTContentInsetCenteredScrollView.m; sourceTree = ""; }; 48 | 785C582316D635E600196B38 /* PSTContentOffsetCenteredScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PSTContentOffsetCenteredScrollView.h; sourceTree = ""; }; 49 | 785C582416D635E700196B38 /* PSTContentOffsetCenteredScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSTContentOffsetCenteredScrollView.m; sourceTree = ""; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 7832D66416D60306006EAA5D /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | 7832D66B16D60306006EAA5D /* UIKit.framework in Frameworks */, 58 | 7832D66D16D60306006EAA5D /* Foundation.framework in Frameworks */, 59 | 7832D66F16D60306006EAA5D /* CoreGraphics.framework in Frameworks */, 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | /* End PBXFrameworksBuildPhase section */ 64 | 65 | /* Begin PBXGroup section */ 66 | 7832D65E16D60306006EAA5D = { 67 | isa = PBXGroup; 68 | children = ( 69 | 7832D67016D60306006EAA5D /* PSTCenteredScrollView */, 70 | 7832D66916D60306006EAA5D /* Frameworks */, 71 | 7832D66816D60306006EAA5D /* Products */, 72 | ); 73 | sourceTree = ""; 74 | }; 75 | 7832D66816D60306006EAA5D /* Products */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 7832D66716D60306006EAA5D /* PSTCenteredScrollView.app */, 79 | ); 80 | name = Products; 81 | sourceTree = ""; 82 | }; 83 | 7832D66916D60306006EAA5D /* Frameworks */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 7832D66A16D60306006EAA5D /* UIKit.framework */, 87 | 7832D66C16D60306006EAA5D /* Foundation.framework */, 88 | 7832D66E16D60306006EAA5D /* CoreGraphics.framework */, 89 | ); 90 | name = Frameworks; 91 | sourceTree = ""; 92 | }; 93 | 7832D67016D60306006EAA5D /* PSTCenteredScrollView */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 7832D67916D60306006EAA5D /* PSTAppDelegate.h */, 97 | 7832D67A16D60306006EAA5D /* PSTAppDelegate.m */, 98 | 7832D68216D60306006EAA5D /* PSTViewController.h */, 99 | 7832D68316D60306006EAA5D /* PSTViewController.m */, 100 | 7832D69016D60327006EAA5D /* PSTCenteredScrollView.h */, 101 | 7832D69116D60327006EAA5D /* PSTCenteredScrollView.m */, 102 | 785C582016D62B2400196B38 /* PSTContentInsetCenteredScrollView.h */, 103 | 785C582116D62B2400196B38 /* PSTContentInsetCenteredScrollView.m */, 104 | 785C581D16D62AC300196B38 /* PSTLayoutSubviewCenteredScrollView.h */, 105 | 785C581E16D62AC300196B38 /* PSTLayoutSubviewCenteredScrollView.m */, 106 | 785C582316D635E600196B38 /* PSTContentOffsetCenteredScrollView.h */, 107 | 785C582416D635E700196B38 /* PSTContentOffsetCenteredScrollView.m */, 108 | 7832D67116D60306006EAA5D /* Supporting Files */, 109 | ); 110 | path = PSTCenteredScrollView; 111 | sourceTree = ""; 112 | }; 113 | 7832D67116D60306006EAA5D /* Supporting Files */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 7832D67216D60306006EAA5D /* PSTCenteredScrollView-Info.plist */, 117 | 7832D67316D60306006EAA5D /* InfoPlist.strings */, 118 | 7832D67616D60306006EAA5D /* main.m */, 119 | 7832D67816D60306006EAA5D /* PSTCenteredScrollView-Prefix.pch */, 120 | 7832D67C16D60306006EAA5D /* Default.png */, 121 | 7832D67E16D60306006EAA5D /* Default@2x.png */, 122 | 7832D68016D60306006EAA5D /* Default-568h@2x.png */, 123 | ); 124 | name = "Supporting Files"; 125 | sourceTree = ""; 126 | }; 127 | /* End PBXGroup section */ 128 | 129 | /* Begin PBXNativeTarget section */ 130 | 7832D66616D60306006EAA5D /* PSTCenteredScrollView */ = { 131 | isa = PBXNativeTarget; 132 | buildConfigurationList = 7832D68D16D60306006EAA5D /* Build configuration list for PBXNativeTarget "PSTCenteredScrollView" */; 133 | buildPhases = ( 134 | 7832D66316D60306006EAA5D /* Sources */, 135 | 7832D66416D60306006EAA5D /* Frameworks */, 136 | 7832D66516D60306006EAA5D /* Resources */, 137 | ); 138 | buildRules = ( 139 | ); 140 | dependencies = ( 141 | ); 142 | name = PSTCenteredScrollView; 143 | productName = PSTCenteredScrollView; 144 | productReference = 7832D66716D60306006EAA5D /* PSTCenteredScrollView.app */; 145 | productType = "com.apple.product-type.application"; 146 | }; 147 | /* End PBXNativeTarget section */ 148 | 149 | /* Begin PBXProject section */ 150 | 7832D65F16D60306006EAA5D /* Project object */ = { 151 | isa = PBXProject; 152 | attributes = { 153 | CLASSPREFIX = PST; 154 | LastUpgradeCheck = 0460; 155 | ORGANIZATIONNAME = PSPDFKit; 156 | }; 157 | buildConfigurationList = 7832D66216D60306006EAA5D /* Build configuration list for PBXProject "PSTCenteredScrollView" */; 158 | compatibilityVersion = "Xcode 3.2"; 159 | developmentRegion = English; 160 | hasScannedForEncodings = 0; 161 | knownRegions = ( 162 | en, 163 | ); 164 | mainGroup = 7832D65E16D60306006EAA5D; 165 | productRefGroup = 7832D66816D60306006EAA5D /* Products */; 166 | projectDirPath = ""; 167 | projectRoot = ""; 168 | targets = ( 169 | 7832D66616D60306006EAA5D /* PSTCenteredScrollView */, 170 | ); 171 | }; 172 | /* End PBXProject section */ 173 | 174 | /* Begin PBXResourcesBuildPhase section */ 175 | 7832D66516D60306006EAA5D /* Resources */ = { 176 | isa = PBXResourcesBuildPhase; 177 | buildActionMask = 2147483647; 178 | files = ( 179 | 7832D67516D60306006EAA5D /* InfoPlist.strings in Resources */, 180 | 7832D67D16D60306006EAA5D /* Default.png in Resources */, 181 | 7832D67F16D60306006EAA5D /* Default@2x.png in Resources */, 182 | 7832D68116D60306006EAA5D /* Default-568h@2x.png in Resources */, 183 | ); 184 | runOnlyForDeploymentPostprocessing = 0; 185 | }; 186 | /* End PBXResourcesBuildPhase section */ 187 | 188 | /* Begin PBXSourcesBuildPhase section */ 189 | 7832D66316D60306006EAA5D /* Sources */ = { 190 | isa = PBXSourcesBuildPhase; 191 | buildActionMask = 2147483647; 192 | files = ( 193 | 7832D67716D60306006EAA5D /* main.m in Sources */, 194 | 7832D67B16D60306006EAA5D /* PSTAppDelegate.m in Sources */, 195 | 7832D68416D60306006EAA5D /* PSTViewController.m in Sources */, 196 | 7832D69216D60327006EAA5D /* PSTCenteredScrollView.m in Sources */, 197 | 785C581F16D62AC300196B38 /* PSTLayoutSubviewCenteredScrollView.m in Sources */, 198 | 785C582216D62B2400196B38 /* PSTContentInsetCenteredScrollView.m in Sources */, 199 | 785C582516D635E700196B38 /* PSTContentOffsetCenteredScrollView.m in Sources */, 200 | ); 201 | runOnlyForDeploymentPostprocessing = 0; 202 | }; 203 | /* End PBXSourcesBuildPhase section */ 204 | 205 | /* Begin PBXVariantGroup section */ 206 | 7832D67316D60306006EAA5D /* InfoPlist.strings */ = { 207 | isa = PBXVariantGroup; 208 | children = ( 209 | 7832D67416D60306006EAA5D /* en */, 210 | ); 211 | name = InfoPlist.strings; 212 | sourceTree = ""; 213 | }; 214 | /* End PBXVariantGroup section */ 215 | 216 | /* Begin XCBuildConfiguration section */ 217 | 7832D68B16D60306006EAA5D /* Debug */ = { 218 | isa = XCBuildConfiguration; 219 | buildSettings = { 220 | ALWAYS_SEARCH_USER_PATHS = NO; 221 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 222 | CLANG_CXX_LIBRARY = "libc++"; 223 | CLANG_ENABLE_OBJC_ARC = YES; 224 | CLANG_WARN_CONSTANT_CONVERSION = YES; 225 | CLANG_WARN_EMPTY_BODY = YES; 226 | CLANG_WARN_ENUM_CONVERSION = YES; 227 | CLANG_WARN_INT_CONVERSION = YES; 228 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 229 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 230 | COPY_PHASE_STRIP = NO; 231 | GCC_C_LANGUAGE_STANDARD = gnu99; 232 | GCC_DYNAMIC_NO_PIC = NO; 233 | GCC_OPTIMIZATION_LEVEL = 0; 234 | GCC_PREPROCESSOR_DEFINITIONS = ( 235 | "DEBUG=1", 236 | "$(inherited)", 237 | ); 238 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 239 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 240 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 241 | GCC_WARN_UNUSED_VARIABLE = YES; 242 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 243 | ONLY_ACTIVE_ARCH = YES; 244 | SDKROOT = iphoneos; 245 | TARGETED_DEVICE_FAMILY = "1,2"; 246 | }; 247 | name = Debug; 248 | }; 249 | 7832D68C16D60306006EAA5D /* Release */ = { 250 | isa = XCBuildConfiguration; 251 | buildSettings = { 252 | ALWAYS_SEARCH_USER_PATHS = NO; 253 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 254 | CLANG_CXX_LIBRARY = "libc++"; 255 | CLANG_ENABLE_OBJC_ARC = YES; 256 | CLANG_WARN_CONSTANT_CONVERSION = YES; 257 | CLANG_WARN_EMPTY_BODY = YES; 258 | CLANG_WARN_ENUM_CONVERSION = YES; 259 | CLANG_WARN_INT_CONVERSION = YES; 260 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 261 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 262 | COPY_PHASE_STRIP = YES; 263 | GCC_C_LANGUAGE_STANDARD = gnu99; 264 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 265 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 266 | GCC_WARN_UNUSED_VARIABLE = YES; 267 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 268 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 269 | SDKROOT = iphoneos; 270 | TARGETED_DEVICE_FAMILY = "1,2"; 271 | VALIDATE_PRODUCT = YES; 272 | }; 273 | name = Release; 274 | }; 275 | 7832D68E16D60306006EAA5D /* Debug */ = { 276 | isa = XCBuildConfiguration; 277 | buildSettings = { 278 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 279 | GCC_PREFIX_HEADER = "PSTCenteredScrollView/PSTCenteredScrollView-Prefix.pch"; 280 | INFOPLIST_FILE = "PSTCenteredScrollView/PSTCenteredScrollView-Info.plist"; 281 | PRODUCT_NAME = "$(TARGET_NAME)"; 282 | WRAPPER_EXTENSION = app; 283 | }; 284 | name = Debug; 285 | }; 286 | 7832D68F16D60306006EAA5D /* Release */ = { 287 | isa = XCBuildConfiguration; 288 | buildSettings = { 289 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 290 | GCC_PREFIX_HEADER = "PSTCenteredScrollView/PSTCenteredScrollView-Prefix.pch"; 291 | INFOPLIST_FILE = "PSTCenteredScrollView/PSTCenteredScrollView-Info.plist"; 292 | PRODUCT_NAME = "$(TARGET_NAME)"; 293 | WRAPPER_EXTENSION = app; 294 | }; 295 | name = Release; 296 | }; 297 | /* End XCBuildConfiguration section */ 298 | 299 | /* Begin XCConfigurationList section */ 300 | 7832D66216D60306006EAA5D /* Build configuration list for PBXProject "PSTCenteredScrollView" */ = { 301 | isa = XCConfigurationList; 302 | buildConfigurations = ( 303 | 7832D68B16D60306006EAA5D /* Debug */, 304 | 7832D68C16D60306006EAA5D /* Release */, 305 | ); 306 | defaultConfigurationIsVisible = 0; 307 | defaultConfigurationName = Release; 308 | }; 309 | 7832D68D16D60306006EAA5D /* Build configuration list for PBXNativeTarget "PSTCenteredScrollView" */ = { 310 | isa = XCConfigurationList; 311 | buildConfigurations = ( 312 | 7832D68E16D60306006EAA5D /* Debug */, 313 | 7832D68F16D60306006EAA5D /* Release */, 314 | ); 315 | defaultConfigurationIsVisible = 0; 316 | defaultConfigurationName = Release; 317 | }; 318 | /* End XCConfigurationList section */ 319 | }; 320 | rootObject = 7832D65F16D60306006EAA5D /* Project object */; 321 | } 322 | --------------------------------------------------------------------------------