├── Sample_Objective-C
├── DynamicScrollView
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── DynamicScrollView-Prefix.pch
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── ExampleView.h
│ ├── DynamicScrollView-Info.plist
│ ├── ExampleView.m
│ ├── Base.lproj
│ │ └── Main.storyboard
│ ├── AppDelegate.m
│ └── ViewController.m
└── DynamicScrollView.xcodeproj
│ ├── project.xcworkspace
│ └── contents.xcworkspacedata
│ └── project.pbxproj
├── GitHub Assets
└── DSDynamicScrollView_demo.gif
├── Sample_Swift
├── DynamicScrollView.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── project.pbxproj
└── DynamicScrollView
│ ├── Images.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Info.plist
│ ├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.xib
│ ├── ExampleView.swift
│ ├── AppDelegate.swift
│ └── ViewController.swift
├── Component_Objective-c
├── DSDynamicView.h
├── DSDynamicScrollView.h
├── DSDynamicView.m
└── DSDynamicScrollView.m
├── Component_Swift
├── DSDynamicView.swift
└── DSDynamicScrollView.swift
├── README.md
├── LICENSE.md
└── .gitignore
/Sample_Objective-C/DynamicScrollView/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/GitHub Assets/DSDynamicScrollView_demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damirstuhec/DSDynamicScrollView/HEAD/GitHub Assets/DSDynamicScrollView_demo.gif
--------------------------------------------------------------------------------
/Sample_Swift/DynamicScrollView.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Sample_Objective-C/DynamicScrollView.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Sample_Objective-C/DynamicScrollView/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 28/06/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Component_Objective-c/DSDynamicView.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSDynamicView.h
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 29/06/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSDynamicView : UIView
12 |
13 | - (NSComparisonResult)compareToObject:(id)object;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Sample_Objective-C/DynamicScrollView/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 28/06/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Sample_Objective-C/DynamicScrollView/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 28/06/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Sample_Objective-C/DynamicScrollView/DynamicScrollView-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_5_0
10 | #warning "This project uses features only available in iOS SDK 5.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/Component_Objective-c/DSDynamicScrollView.h:
--------------------------------------------------------------------------------
1 | //
2 | // DSDynamicScrollView.h
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 28/06/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DSDynamicScrollView : UIScrollView
12 |
13 | @property (nonatomic, assign) CGFloat maxNumberOfViewsPerPage;
14 | @property (nonatomic, assign) BOOL locked;
15 |
16 | - (void)updateViewsWithArray:(NSArray *)array;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Sample_Objective-C/DynamicScrollView/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/Sample_Objective-C/DynamicScrollView/ExampleView.h:
--------------------------------------------------------------------------------
1 | //
2 | // LicentiaVenueView.h
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 29/06/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | #import "DSDynamicView.h"
10 |
11 | @interface ExampleView : DSDynamicView
12 |
13 | @property (nonatomic, strong) UILabel *nameLabel;
14 | @property (nonatomic, assign) NSInteger uniqueNumber;
15 | @property (nonatomic, assign) NSInteger distance;
16 |
17 | - (id)initWithFrame:(CGRect)frame name:(NSString *)name;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Component_Swift/DSDynamicView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DSDynamicView.swift
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 03/10/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class DSDynamicView : UIScrollView
12 | {
13 | override func isEqual(object: AnyObject?) -> Bool
14 | {
15 | // override in subclass
16 | return super.isEqual(object)
17 | }
18 |
19 | func compareToObject(object: AnyObject?) -> Bool
20 | {
21 | // override in subclass
22 | return false
23 | }
24 | }
--------------------------------------------------------------------------------
/Sample_Objective-C/DynamicScrollView/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## DSDynamicScrollView
2 | iOS component for building dynamic and animated UIScrollView. **Both, Swift and Objective-C versions!**
3 |
4 | ## Demo
5 | See DSDynamicScrollView in action!
6 |
7 | 
8 |
9 | ## Contact
10 | Damir Štuhec
11 |
12 | - http://github.com/damirstuhec
13 | - http://twitter.com/stuhecdamir
14 | - http://si.linkedin.com/in/damirstuhec/
15 | - http://damirstuhec.github.io
16 | - damir.stuhec@gmail.com
17 |
18 | ## License
19 | DSDynamicScrollView is available under the MIT license. See the LICENSE file for more info.
--------------------------------------------------------------------------------
/Component_Objective-c/DSDynamicView.m:
--------------------------------------------------------------------------------
1 | //
2 | // DSDynamicView.m
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 29/06/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | #import "DSDynamicView.h"
10 |
11 | @implementation DSDynamicView
12 |
13 | - (id)initWithFrame:(CGRect)frame
14 | {
15 | self = [super initWithFrame:frame];
16 | if (self) {
17 | }
18 | return self;
19 | }
20 |
21 | - (BOOL)isEqual:(id)object
22 | {
23 | // override in subclass
24 | return [super isEqual:object];
25 | }
26 |
27 | - (NSComparisonResult)compareToObject:(id)object
28 | {
29 | // override in subclass
30 | return NSOrderedDescending;
31 | }
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/Sample_Swift/DynamicScrollView/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Damir Štuhec
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | <<<<<<< HEAD
2 | # Created by http://www.gitignore.io
3 |
4 | ### Objective-C ###
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 |
24 | =======
25 | >>>>>>> fb9b02658d1cb8a7801065287c28a05882137a20
26 | # CocoaPods
27 | #
28 | # We recommend against adding the Pods directory to your .gitignore. However
29 | # you should judge for yourself, the pros and cons are mentioned at:
30 | <<<<<<< HEAD
31 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
32 | #
33 | # Pods/
34 |
35 |
36 | ### Xcode ###
37 | build/
38 | .DS_Store
39 | */.DS_Store
40 | *.pbxuser
41 | !default.pbxuser
42 | *.mode1v3
43 | !default.mode1v3
44 | *.mode2v3
45 | !default.mode2v3
46 | *.perspectivev3
47 | !default.perspectivev3
48 | xcuserdata
49 | *.xccheckout
50 | *.moved-aside
51 | DerivedData
52 | *.xcuserstate
53 | =======
54 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control?
55 | #
56 | # Pods/
57 |
58 | >>>>>>> fb9b02658d1cb8a7801065287c28a05882137a20
59 |
--------------------------------------------------------------------------------
/Sample_Swift/DynamicScrollView/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.damirstuhec.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Sample_Objective-C/DynamicScrollView/DynamicScrollView-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.damirstuhec.${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 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Sample_Swift/DynamicScrollView/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Sample_Objective-C/DynamicScrollView/ExampleView.m:
--------------------------------------------------------------------------------
1 | //
2 | // LicentiaVenueView.m
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 29/06/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | #import "ExampleView.h"
10 |
11 | @implementation ExampleView
12 |
13 | - (id)initWithFrame:(CGRect)frame name:(NSString *)name
14 | {
15 | self = [super initWithFrame:frame];
16 | if (self) {
17 | CGFloat hue = ( arc4random() % 256 / 256.0 );
18 | CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.5;
19 | CGFloat brightness = ( arc4random() % 128 / 256.0 ) + 0.5;
20 |
21 | self.backgroundColor = [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:1];
22 |
23 | self.nameLabel = [[UILabel alloc] initWithFrame:frame];
24 | self.nameLabel.text = name;
25 | self.nameLabel.textAlignment = NSTextAlignmentCenter;
26 | self.nameLabel.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
27 |
28 | [self addSubview:self.nameLabel];
29 | }
30 | return self;
31 | }
32 |
33 | - (BOOL)isEqual:(id)object
34 | {
35 | ExampleView *anotherView = ([object isKindOfClass:[ExampleView class]]) ? (ExampleView *)object : nil;
36 | return self.uniqueNumber == anotherView.uniqueNumber;
37 | }
38 |
39 | - (NSComparisonResult)compareToObject:(id)object
40 | {
41 | ExampleView *anotherView = ([object isKindOfClass:[ExampleView class]]) ? (ExampleView *)object : nil;
42 |
43 | if (self.distance > anotherView.distance)
44 | {
45 | return NSOrderedDescending;
46 | }
47 | else
48 | {
49 | return NSOrderedAscending;
50 | }
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/Sample_Objective-C/DynamicScrollView/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Sample_Swift/DynamicScrollView/ExampleView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExampleView.swift
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 03/10/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import Darwin
11 |
12 | class ExampleView: DSDynamicView
13 | {
14 | var nameLabel: UILabel
15 | var uniqueNumber: Int
16 | var distance: Int
17 |
18 | init(frame: CGRect, name: String)
19 | {
20 | nameLabel = UILabel(frame: frame)
21 | nameLabel.autoresizingMask = .FlexibleHeight | .FlexibleWidth
22 | nameLabel.textAlignment = .Center
23 | nameLabel.text = name
24 | nameLabel.textColor = UIColor.whiteColor()
25 |
26 | uniqueNumber = 0
27 | distance = 0
28 |
29 | super.init(frame: frame)
30 |
31 | var hue = CGFloat(Float(arc4random() % 256) / 256.0)
32 | var saturation = CGFloat(Float(arc4random() % 128) / 256.0) + 0.5
33 | var brightness = CGFloat(Float(arc4random() % 128) / 256.0) + 0.5
34 |
35 | self.backgroundColor = UIColor(hue: CGFloat(hue), saturation: CGFloat(saturation), brightness: CGFloat(brightness), alpha: 1)
36 | self.addSubview(nameLabel)
37 | }
38 |
39 | override func isEqual(object: AnyObject?) -> Bool
40 | {
41 | if let anotherView = object as? ExampleView
42 | {
43 | return self.uniqueNumber == anotherView.uniqueNumber
44 | }
45 | else
46 | {
47 | return false
48 | }
49 | }
50 |
51 | override func compareToObject(object: AnyObject?) -> Bool
52 | {
53 | if let anotherView = object as? ExampleView
54 | {
55 | if self.distance > anotherView.distance
56 | {
57 | return false
58 | }
59 | else
60 | {
61 | return true
62 | }
63 | }
64 | else
65 | {
66 | return true
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/Sample_Objective-C/DynamicScrollView/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 28/06/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @implementation AppDelegate
12 |
13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
14 | {
15 | // Override point for customization after application launch.
16 | return YES;
17 | }
18 |
19 | - (void)applicationWillResignActive:(UIApplication *)application
20 | {
21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
23 | }
24 |
25 | - (void)applicationDidEnterBackground:(UIApplication *)application
26 | {
27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
29 | }
30 |
31 | - (void)applicationWillEnterForeground:(UIApplication *)application
32 | {
33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | - (void)applicationDidBecomeActive:(UIApplication *)application
37 | {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application
42 | {
43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Sample_Swift/DynamicScrollView/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 03/10/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(application: UIApplication) {
33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/Sample_Swift/DynamicScrollView/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Sample_Swift/DynamicScrollView/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 03/10/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController
12 | {
13 | var scrollView: DSDynamicScrollView
14 | var v1 = ExampleView(frame: CGRectZero, name: "View 1")
15 | var v2 = ExampleView(frame: CGRectZero, name: "View 2")
16 | var v3 = ExampleView(frame: CGRectZero, name: "View 3")
17 | var v4 = ExampleView(frame: CGRectZero, name: "View 4")
18 | var v5 = ExampleView(frame: CGRectZero, name: "View 5")
19 | var v6 = ExampleView(frame: CGRectZero, name: "View 6")
20 | var v7 = ExampleView(frame: CGRectZero, name: "View 7")
21 | var v8 = ExampleView(frame: CGRectZero, name: "View 8")
22 | var v9 = ExampleView(frame: CGRectZero, name: "View 9")
23 | var v10 = ExampleView(frame: CGRectZero, name: "View 10")
24 | var v11 = ExampleView(frame: CGRectZero, name: "View 11")
25 | var v12 = ExampleView(frame: CGRectZero, name: "View 12")
26 | var v13 = ExampleView(frame: CGRectZero, name: "View 13")
27 | var v14 = ExampleView(frame: CGRectZero, name: "View 14")
28 | var v15 = ExampleView(frame: CGRectZero, name: "View 15")
29 | var v16 = ExampleView(frame: CGRectZero, name: "View 16")
30 | var v17 = ExampleView(frame: CGRectZero, name: "View 17")
31 |
32 | required init(coder aDecoder: NSCoder)
33 | {
34 | self.scrollView = DSDynamicScrollView(frame: CGRectZero)
35 | super.init(coder: aDecoder)
36 | }
37 |
38 | override func viewDidLoad()
39 | {
40 | super.viewDidLoad()
41 |
42 | self.scrollView = DSDynamicScrollView(frame:CGRectMake(0.0, 0.0, self.view.frame.size.width, self.view.frame.size.height));
43 | self.view.addSubview(self.scrollView)
44 | }
45 |
46 | override func viewDidAppear(animated: Bool) {
47 | super.viewDidAppear(animated)
48 |
49 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), {
50 | self.v1.uniqueNumber = 1
51 | self.v1.distance = 10
52 | self.v2.uniqueNumber = 2
53 | self.v2.distance = 20
54 |
55 | self.scrollView.updateViewsWithArray([self.v1, self.v2])
56 | })
57 |
58 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(4 * NSEC_PER_SEC)), dispatch_get_main_queue(), {
59 | self.v3.uniqueNumber = 3
60 | self.v3.distance = 30
61 |
62 | self.scrollView.updateViewsWithArray([self.v2])
63 | })
64 |
65 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(6 * NSEC_PER_SEC)), dispatch_get_main_queue(), {
66 | self.v4.uniqueNumber = 4
67 | self.v4.distance = 4
68 | self.v5.uniqueNumber = 5
69 | self.v5.distance = 15
70 | self.v6.uniqueNumber = 6
71 | self.v6.distance = 25
72 | self.v7.uniqueNumber = 7
73 | self.v7.distance = 70
74 |
75 | self.scrollView.updateViewsWithArray([self.v4, self.v5, self.v6, self.v2])
76 | })
77 |
78 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(8 * NSEC_PER_SEC)), dispatch_get_main_queue(), {
79 | self.v8.uniqueNumber = 8;
80 | self.v8.distance = 80;
81 | self.v9.uniqueNumber = 9;
82 | self.v9.distance = 90;
83 | self.v10.uniqueNumber = 10;
84 | self.v10.distance = 100;
85 |
86 | self.scrollView.updateViewsWithArray([self.v8, self.v2, self.v5])
87 | })
88 |
89 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(10 * NSEC_PER_SEC)), dispatch_get_main_queue(), {
90 | self.v11.uniqueNumber = 11;
91 | self.v11.distance = 110;
92 | self.v12.uniqueNumber = 12;
93 | self.v12.distance = 120;
94 |
95 | self.scrollView.updateViewsWithArray([self.v5, self.v12])
96 | })
97 |
98 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(12 * NSEC_PER_SEC)), dispatch_get_main_queue(), {
99 | self.v13.uniqueNumber = 13;
100 | self.v13.distance = 130;
101 | self.v14.uniqueNumber = 14;
102 | self.v14.distance = 140;
103 | self.v15.uniqueNumber = 15;
104 | self.v15.distance = 150;
105 | self.v16.uniqueNumber = 16;
106 | self.v16.distance = 160;
107 | self.v17.uniqueNumber = 17;
108 | self.v17.distance = 170;
109 |
110 | self.scrollView.updateViewsWithArray([self.v13, self.v14, self.v15, self.v16, self.v12])
111 | })
112 | }
113 | }
114 |
--------------------------------------------------------------------------------
/Sample_Objective-C/DynamicScrollView/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 28/06/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "DSDynamicScrollView.h"
11 | #import "ExampleView.h"
12 |
13 | @interface ViewController ()
14 |
15 | @property (nonatomic, strong) DSDynamicScrollView *scrollView;
16 | @property (nonatomic, strong) ExampleView *v1;
17 | @property (nonatomic, strong) ExampleView *v2;
18 | @property (nonatomic, strong) ExampleView *v3;
19 | @property (nonatomic, strong) ExampleView *v4;
20 | @property (nonatomic, strong) ExampleView *v5;
21 | @property (nonatomic, strong) ExampleView *v6;
22 | @property (nonatomic, strong) ExampleView *v7;
23 | @property (nonatomic, strong) ExampleView *v8;
24 | @property (nonatomic, strong) ExampleView *v9;
25 | @property (nonatomic, strong) ExampleView *v10;
26 | @property (nonatomic, strong) ExampleView *v11;
27 | @property (nonatomic, strong) ExampleView *v12;
28 | @property (nonatomic, strong) ExampleView *v13;
29 | @property (nonatomic, strong) ExampleView *v14;
30 | @property (nonatomic, strong) ExampleView *v15;
31 | @property (nonatomic, strong) ExampleView *v16;
32 | @property (nonatomic, strong) ExampleView *v17;
33 |
34 | @end
35 |
36 | @implementation ViewController
37 |
38 | - (void)viewDidLoad
39 | {
40 | [super viewDidLoad];
41 |
42 | self.scrollView = [[DSDynamicScrollView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.view.frame.size.width, self.view.frame.size.height)];
43 | [self.view addSubview:self.scrollView];
44 | }
45 |
46 | - (void)viewDidAppear:(BOOL)animated
47 | {
48 | [super viewDidAppear:animated];
49 |
50 | self.v1 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 1"];
51 | self.v2 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 2"];
52 | self.v3 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 3"];
53 | self.v4 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 4"];
54 | self.v5 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 5"];
55 | self.v6 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 6"];
56 | self.v7 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 7"];
57 | self.v8 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 8"];
58 | self.v9 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 9"];
59 | self.v10 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 10"];
60 | self.v11 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 11"];
61 | self.v12 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 12"];
62 | self.v13 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 13"];
63 | self.v14 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 14"];
64 | self.v15 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 15"];
65 | self.v16 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 16"];
66 | self.v17 = [[ExampleView alloc] initWithFrame:CGRectZero name:@"View 17"];
67 |
68 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 2 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
69 | self.v1.uniqueNumber = 1;
70 | self.v1.distance = 10;
71 | self.v2.uniqueNumber = 2;
72 | self.v2.distance = 20;
73 |
74 | [self.scrollView updateViewsWithArray:@[self.v1, self.v2]];
75 | });
76 |
77 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 4 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
78 | self.v3.uniqueNumber = 3;
79 | self.v3.distance = 30;
80 |
81 | [self.scrollView updateViewsWithArray:@[self.v2]];
82 | });
83 |
84 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 6 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
85 | self.v4.uniqueNumber = 4;
86 | self.v4.distance = 4;
87 | self.v5.uniqueNumber = 5;
88 | self.v5.distance = 15;
89 | self.v6.uniqueNumber = 6;
90 | self.v6.distance = 25;
91 | self.v7.uniqueNumber = 7;
92 | self.v7.distance = 70;
93 |
94 | [self.scrollView updateViewsWithArray:@[self.v4, self.v5, self.v6, self.v2]];
95 | });
96 |
97 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 8 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
98 | self.v8.uniqueNumber = 8;
99 | self.v8.distance = 80;
100 | self.v9.uniqueNumber = 9;
101 | self.v9.distance = 90;
102 | self.v10.uniqueNumber = 10;
103 | self.v10.distance = 100;
104 |
105 | [self.scrollView updateViewsWithArray:@[self.v8, self.v2, self.v5]];
106 | });
107 |
108 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 10 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
109 | self.v11.uniqueNumber = 11;
110 | self.v11.distance = 110;
111 | self.v12.uniqueNumber = 12;
112 | self.v12.distance = 120;
113 |
114 | [self.scrollView updateViewsWithArray:@[self.v5, self.v12]];
115 | });
116 |
117 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 12 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
118 | self.v13.uniqueNumber = 13;
119 | self.v13.distance = 130;
120 | self.v14.uniqueNumber = 14;
121 | self.v14.distance = 140;
122 | self.v15.uniqueNumber = 15;
123 | self.v15.distance = 150;
124 | self.v16.uniqueNumber = 16;
125 | self.v16.distance = 160;
126 | self.v17.uniqueNumber = 17;
127 | self.v17.distance = 170;
128 |
129 | [self.scrollView updateViewsWithArray:@[self.v13, self.v14, self.v15, self.v16, self.v12]];
130 | });
131 | }
132 |
133 | @end
134 |
--------------------------------------------------------------------------------
/Component_Swift/DSDynamicScrollView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DSDynamicScrollView.swift
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 03/10/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class DSDynamicScrollView : UIScrollView
12 | {
13 | let defaultMargin: CGFloat = 15.0
14 | let smallMargin: CGFloat = 7.0
15 |
16 | var maxNumberOfViewsPerPage: Int = 5
17 | var locked: Bool = false
18 | var views = [DSDynamicView]()
19 | var viewSize: CGSize = CGSizeZero
20 |
21 | func updateViewsWithArray(var array: [DSDynamicView])
22 | {
23 | if !self.locked
24 | {
25 | var viewsToKeep = [DSDynamicView]()
26 | var viewsToAdd = [DSDynamicView]()
27 | var viewsToRemove = self.views
28 |
29 | for aView in array
30 | {
31 | if contains(viewsToRemove, aView)
32 | {
33 | if let index = find(viewsToRemove, aView)
34 | {
35 | viewsToRemove.removeAtIndex(index)
36 | }
37 |
38 | viewsToKeep.append(aView as DSDynamicView)
39 | }
40 | else
41 | {
42 | viewsToAdd.append(aView as DSDynamicView)
43 | }
44 | }
45 |
46 | self.views = sorted(array) {
47 | (obj1: DSDynamicView, obj2: DSDynamicView) -> Bool in
48 | return obj1.compareToObject(obj2)
49 | }
50 |
51 | self.calculateViewSize()
52 |
53 | self.updateRemovingViewsWithAnimation(viewsToRemove, animation:true, completionHandler: { () -> Void in
54 | self.repositionKeepingViewsWithAnimation(viewsToKeep, animation:true, completionHandler: { () -> Void in
55 | self.updateAddingViewsWithAnimation(viewsToAdd, animation:true, completionHandler: { () -> Void in
56 | })
57 | })
58 | })
59 | }
60 | }
61 |
62 | // MARK: Helper methods
63 |
64 | func updateRemovingViewsWithAnimation(var removingViews: [DSDynamicView], let animation: Bool, completionHandler:() -> Void)
65 | {
66 | if removingViews.count == 0
67 | {
68 | completionHandler()
69 | return
70 | }
71 |
72 | var counter = 0
73 |
74 | for aView in removingViews
75 | {
76 | UIView.animateWithDuration((animation) ? 0.2 : 0.0, animations: { () -> Void in
77 | aView.frame = CGRectMake(320.0, aView.frame.origin.y, aView.frame.size.width, aView.frame.size.height)
78 | }, completion: { (finished) -> Void in
79 | aView.removeFromSuperview()
80 | counter++
81 |
82 | if counter == removingViews.count
83 | {
84 | completionHandler()
85 | }
86 | })
87 | }
88 | }
89 |
90 | func repositionKeepingViewsWithAnimation(var keepingViews: [DSDynamicView], let animation: Bool, completionHandler:() -> Void)
91 | {
92 | if keepingViews.count == 0
93 | {
94 | completionHandler()
95 | return
96 | }
97 |
98 | var counter = 0
99 |
100 | for aView in keepingViews
101 | {
102 | let viewIndex = CGFloat(find(self.views, aView)!)
103 | let viewY = viewIndex * (self.viewSize.height + self.defaultMargin)
104 |
105 | UIView.animateWithDuration((animation) ? 0.2 : 0.0, animations: { () -> Void in
106 | aView.frame = CGRectMake(aView.frame.origin.x, viewY, self.viewSize.width, self.viewSize.height)
107 | }, completion: { (finished) -> Void in
108 | counter++
109 |
110 | if counter == keepingViews.count
111 | {
112 | completionHandler()
113 | }
114 | })
115 | }
116 | }
117 |
118 | func updateAddingViewsWithAnimation(var addingViews: [DSDynamicView], let animation: Bool, completionHandler:() -> Void)
119 | {
120 | if addingViews.count == 0
121 | {
122 | completionHandler()
123 | return
124 | }
125 |
126 | var counter = 0
127 |
128 | for aView in addingViews
129 | {
130 | let viewIndex = CGFloat(find(self.views, aView)!)
131 | let viewY = viewIndex * (self.viewSize.height + self.defaultMargin)
132 |
133 | aView.frame = CGRectMake(-320.0, viewY, self.viewSize.width, self.viewSize.height)
134 | self.addSubview(aView)
135 |
136 | UIView.animateWithDuration((animation) ? 0.2 : 0.0, animations: { () -> Void in
137 | aView.frame = CGRectMake(0.0, aView.frame.origin.y, aView.frame.size.width, aView.frame.size.height)
138 | }, completion: { (finished) -> Void in
139 | counter++
140 |
141 | if counter == addingViews.count
142 | {
143 | completionHandler()
144 | }
145 | })
146 | }
147 | }
148 |
149 | func calculateViewSize()
150 | {
151 | let viewsCountWithLimit = (self.views.count > maxNumberOfViewsPerPage) ? maxNumberOfViewsPerPage : self.views.count
152 | self.viewSize = CGSizeMake(self.frame.size.width, (self.frame.size.height - self.contentInset.top - self.contentInset.bottom - ((CGFloat(viewsCountWithLimit) - 1) * self.defaultMargin)) / CGFloat(viewsCountWithLimit))
153 | }
154 | }
155 |
--------------------------------------------------------------------------------
/Component_Objective-c/DSDynamicScrollView.m:
--------------------------------------------------------------------------------
1 | //
2 | // DSDynamicScrollView.m
3 | // DynamicScrollView
4 | //
5 | // Created by Damir Stuhec on 28/06/14.
6 | // Copyright (c) 2014 damirstuhec. All rights reserved.
7 | //
8 |
9 | #import "DSDynamicScrollView.h"
10 | #import "DSDynamicView.h"
11 |
12 | #define DEFAULT_MARGIN 15.0f
13 | #define SMALL_MARGIN 7.0f
14 | #define MAX_NUMBER_OF_VIEWS_PER_PAGE 5
15 |
16 | @interface DSDynamicScrollView()
17 |
18 | @property (nonatomic, strong) NSMutableArray *views;
19 | @property (nonatomic, assign) CGSize viewSize;
20 |
21 | @end
22 |
23 | @implementation DSDynamicScrollView
24 |
25 | #pragma mark - Initialization
26 |
27 | - (id)initWithFrame:(CGRect)frame
28 | {
29 | self = [super initWithFrame:frame];
30 | if (self) {
31 | self.views = NSMutableArray.new;
32 | self.maxNumberOfViewsPerPage = MAX_NUMBER_OF_VIEWS_PER_PAGE;
33 | }
34 | return self;
35 | }
36 |
37 | #pragma mark - Public methods
38 |
39 | - (void)updateViewsWithArray:(NSArray *)array
40 | {
41 | if (!self.locked)
42 | {
43 | NSMutableArray *viewsToKeep = NSMutableArray.new;
44 | NSMutableArray *viewsToAdd = NSMutableArray.new;
45 | NSMutableArray *viewsToRemove = self.views;
46 |
47 | for (DSDynamicView *view in array)
48 | {
49 | if ([viewsToRemove containsObject:view])
50 | {
51 | [viewsToRemove removeObject:view];
52 | [viewsToKeep addObject:view];
53 | }
54 | else
55 | {
56 | [viewsToAdd addObject:view];
57 | }
58 | }
59 |
60 | self.views = [[NSMutableArray alloc] initWithArray:array];
61 | self.views = [[self.views sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) {
62 | return [(DSDynamicView *)obj1 compareToObject:obj2];
63 | }] mutableCopy];
64 |
65 | [self calculateViewSize];
66 |
67 | [self updateRemovingViews:viewsToRemove withAnimation:YES completion:^{
68 | [self repositionKeepingViews:viewsToKeep withAnimation:YES completion:^{
69 | [self updateAddingViews:viewsToAdd withAnimation:YES completion:nil];
70 | }];
71 | }];
72 |
73 | self.contentSize = CGSizeMake(self.frame.size.width, self.views.count * (self.viewSize.height + DEFAULT_MARGIN));
74 | }
75 | }
76 |
77 | #pragma mark - Helper methods
78 |
79 | - (void)updateRemovingViews:(NSArray *)viewsToRemove withAnimation:(BOOL)animation completion:(void(^)())completion
80 | {
81 | if (viewsToRemove.count == 0)
82 | {
83 | if (completion) completion();
84 | return;
85 | }
86 |
87 | __block NSInteger counter = 0;
88 |
89 | for (DSDynamicView *viewToRemove in viewsToRemove)
90 | {
91 | [UIView animateWithDuration:((animation) ? 0.2f : 0.0f) animations:^{
92 | viewToRemove.frame = CGRectMake(320.0f, viewToRemove.frame.origin.y, viewToRemove.frame.size.width, viewToRemove.frame.size.height);
93 | } completion:^(BOOL finished) {
94 | [viewToRemove removeFromSuperview];
95 |
96 | counter++;
97 | if (counter == viewsToRemove.count)
98 | {
99 | if (completion) completion();
100 | }
101 | }];
102 | }
103 | }
104 |
105 | - (void)repositionKeepingViews:(NSArray *)viewsToKeep withAnimation:(BOOL)animation completion:(void(^)())completion
106 | {
107 | if (viewsToKeep.count == 0)
108 | {
109 | if (completion) completion();
110 | return;
111 | }
112 |
113 | __block NSInteger counter = 0;
114 |
115 | for (DSDynamicView *viewToKeep in viewsToKeep)
116 | {
117 | NSInteger viewToKeepIndex = [self.views indexOfObject:viewToKeep];
118 | CGFloat viewToKeepY = viewToKeepIndex * (self.viewSize.height + DEFAULT_MARGIN);
119 |
120 | [UIView animateWithDuration:((animation) ? 0.2f : 0.0f) animations:^{
121 | viewToKeep.frame = CGRectMake(viewToKeep.frame.origin.x, viewToKeepY, self.viewSize.width, self.viewSize.height);
122 | } completion:^(BOOL finished) {
123 |
124 | counter++;
125 | if (counter == viewsToKeep.count)
126 | {
127 | if (completion) completion();
128 | }
129 | }];
130 | }
131 | }
132 |
133 | - (void)updateAddingViews:(NSArray *)viewsToAdd withAnimation:(BOOL)animation completion:(void(^)())completion
134 | {
135 | if (viewsToAdd.count == 0)
136 | {
137 | if (completion) completion();
138 | return;
139 | }
140 |
141 | __block NSInteger counter = 0;
142 |
143 | for (DSDynamicView *viewToAdd in viewsToAdd)
144 | {
145 | viewToAdd.frame = CGRectMake(-320.0f, [self.views indexOfObject:viewToAdd] * (self.viewSize.height + DEFAULT_MARGIN), self.viewSize.width, self.viewSize.height);
146 |
147 | [self addSubview:viewToAdd];
148 |
149 | [UIView animateWithDuration:((animation) ? 0.2f : 0.0f) animations:^{
150 | viewToAdd.frame = CGRectMake(0.0f, viewToAdd.frame.origin.y, viewToAdd.frame.size.width, viewToAdd.frame.size.height);
151 | } completion:^(BOOL finished) {
152 |
153 | counter++;
154 | if (counter == viewsToAdd.count)
155 | {
156 | if (completion) completion();
157 | }
158 | }];
159 | }
160 | }
161 |
162 | - (void)calculateViewSize
163 | {
164 | NSInteger viewsCountWithLimit = (self.views.count > self.maxNumberOfViewsPerPage) ? self.maxNumberOfViewsPerPage : self.views.count;
165 | self.viewSize = CGSizeMake(self.frame.size.width, (self.frame.size.height - self.contentInset.top - self.contentInset.bottom - ((viewsCountWithLimit - 1) * DEFAULT_MARGIN)) / viewsCountWithLimit);
166 | }
167 |
168 | @end
169 |
--------------------------------------------------------------------------------
/Sample_Swift/DynamicScrollView.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 26323FF119DEF44C003EB271 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26323FF019DEF44C003EB271 /* AppDelegate.swift */; };
11 | 26323FF319DEF44C003EB271 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26323FF219DEF44C003EB271 /* ViewController.swift */; };
12 | 26323FF619DEF44C003EB271 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 26323FF419DEF44C003EB271 /* Main.storyboard */; };
13 | 26323FF819DEF44C003EB271 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 26323FF719DEF44C003EB271 /* Images.xcassets */; };
14 | 26323FFB19DEF44C003EB271 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 26323FF919DEF44C003EB271 /* LaunchScreen.xib */; };
15 | 2632400719DEF44C003EB271 /* DynamicScrollViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2632400619DEF44C003EB271 /* DynamicScrollViewTests.swift */; };
16 | 2632401619DF0F53003EB271 /* ExampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2632401519DF0F53003EB271 /* ExampleView.swift */; };
17 | 2632401B19DF42AB003EB271 /* DSDynamicScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2632401919DF42AB003EB271 /* DSDynamicScrollView.swift */; };
18 | 2632401C19DF42AB003EB271 /* DSDynamicView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2632401A19DF42AB003EB271 /* DSDynamicView.swift */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXContainerItemProxy section */
22 | 2632400119DEF44C003EB271 /* PBXContainerItemProxy */ = {
23 | isa = PBXContainerItemProxy;
24 | containerPortal = 26323FE319DEF44C003EB271 /* Project object */;
25 | proxyType = 1;
26 | remoteGlobalIDString = 26323FEA19DEF44C003EB271;
27 | remoteInfo = DynamicScrollView;
28 | };
29 | /* End PBXContainerItemProxy section */
30 |
31 | /* Begin PBXFileReference section */
32 | 26323FEB19DEF44C003EB271 /* DynamicScrollView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DynamicScrollView.app; sourceTree = BUILT_PRODUCTS_DIR; };
33 | 26323FEF19DEF44C003EB271 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
34 | 26323FF019DEF44C003EB271 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
35 | 26323FF219DEF44C003EB271 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
36 | 26323FF519DEF44C003EB271 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
37 | 26323FF719DEF44C003EB271 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
38 | 26323FFA19DEF44C003EB271 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
39 | 2632400019DEF44C003EB271 /* DynamicScrollViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DynamicScrollViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
40 | 2632400519DEF44C003EB271 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
41 | 2632400619DEF44C003EB271 /* DynamicScrollViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DynamicScrollViewTests.swift; sourceTree = ""; };
42 | 2632401519DF0F53003EB271 /* ExampleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleView.swift; sourceTree = ""; };
43 | 2632401919DF42AB003EB271 /* DSDynamicScrollView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DSDynamicScrollView.swift; path = ../Component_Swift/DSDynamicScrollView.swift; sourceTree = ""; };
44 | 2632401A19DF42AB003EB271 /* DSDynamicView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DSDynamicView.swift; path = ../Component_Swift/DSDynamicView.swift; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 26323FE819DEF44C003EB271 /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | 26323FFD19DEF44C003EB271 /* Frameworks */ = {
56 | isa = PBXFrameworksBuildPhase;
57 | buildActionMask = 2147483647;
58 | files = (
59 | );
60 | runOnlyForDeploymentPostprocessing = 0;
61 | };
62 | /* End PBXFrameworksBuildPhase section */
63 |
64 | /* Begin PBXGroup section */
65 | 26323FE219DEF44C003EB271 = {
66 | isa = PBXGroup;
67 | children = (
68 | 2632401019DEF482003EB271 /* Component */,
69 | 26323FED19DEF44C003EB271 /* DynamicScrollView */,
70 | 2632400319DEF44C003EB271 /* DynamicScrollViewTests */,
71 | 26323FEC19DEF44C003EB271 /* Products */,
72 | );
73 | sourceTree = "";
74 | };
75 | 26323FEC19DEF44C003EB271 /* Products */ = {
76 | isa = PBXGroup;
77 | children = (
78 | 26323FEB19DEF44C003EB271 /* DynamicScrollView.app */,
79 | 2632400019DEF44C003EB271 /* DynamicScrollViewTests.xctest */,
80 | );
81 | name = Products;
82 | sourceTree = "";
83 | };
84 | 26323FED19DEF44C003EB271 /* DynamicScrollView */ = {
85 | isa = PBXGroup;
86 | children = (
87 | 26323FF019DEF44C003EB271 /* AppDelegate.swift */,
88 | 26323FF219DEF44C003EB271 /* ViewController.swift */,
89 | 2632401519DF0F53003EB271 /* ExampleView.swift */,
90 | 26323FF419DEF44C003EB271 /* Main.storyboard */,
91 | 26323FF719DEF44C003EB271 /* Images.xcassets */,
92 | 26323FF919DEF44C003EB271 /* LaunchScreen.xib */,
93 | 26323FEE19DEF44C003EB271 /* Supporting Files */,
94 | );
95 | path = DynamicScrollView;
96 | sourceTree = "";
97 | };
98 | 26323FEE19DEF44C003EB271 /* Supporting Files */ = {
99 | isa = PBXGroup;
100 | children = (
101 | 26323FEF19DEF44C003EB271 /* Info.plist */,
102 | );
103 | name = "Supporting Files";
104 | sourceTree = "";
105 | };
106 | 2632400319DEF44C003EB271 /* DynamicScrollViewTests */ = {
107 | isa = PBXGroup;
108 | children = (
109 | 2632400619DEF44C003EB271 /* DynamicScrollViewTests.swift */,
110 | 2632400419DEF44C003EB271 /* Supporting Files */,
111 | );
112 | path = DynamicScrollViewTests;
113 | sourceTree = "";
114 | };
115 | 2632400419DEF44C003EB271 /* Supporting Files */ = {
116 | isa = PBXGroup;
117 | children = (
118 | 2632400519DEF44C003EB271 /* Info.plist */,
119 | );
120 | name = "Supporting Files";
121 | sourceTree = "";
122 | };
123 | 2632401019DEF482003EB271 /* Component */ = {
124 | isa = PBXGroup;
125 | children = (
126 | 2632401919DF42AB003EB271 /* DSDynamicScrollView.swift */,
127 | 2632401A19DF42AB003EB271 /* DSDynamicView.swift */,
128 | );
129 | name = Component;
130 | sourceTree = "";
131 | };
132 | /* End PBXGroup section */
133 |
134 | /* Begin PBXNativeTarget section */
135 | 26323FEA19DEF44C003EB271 /* DynamicScrollView */ = {
136 | isa = PBXNativeTarget;
137 | buildConfigurationList = 2632400A19DEF44C003EB271 /* Build configuration list for PBXNativeTarget "DynamicScrollView" */;
138 | buildPhases = (
139 | 26323FE719DEF44C003EB271 /* Sources */,
140 | 26323FE819DEF44C003EB271 /* Frameworks */,
141 | 26323FE919DEF44C003EB271 /* Resources */,
142 | );
143 | buildRules = (
144 | );
145 | dependencies = (
146 | );
147 | name = DynamicScrollView;
148 | productName = DynamicScrollView;
149 | productReference = 26323FEB19DEF44C003EB271 /* DynamicScrollView.app */;
150 | productType = "com.apple.product-type.application";
151 | };
152 | 26323FFF19DEF44C003EB271 /* DynamicScrollViewTests */ = {
153 | isa = PBXNativeTarget;
154 | buildConfigurationList = 2632400D19DEF44C003EB271 /* Build configuration list for PBXNativeTarget "DynamicScrollViewTests" */;
155 | buildPhases = (
156 | 26323FFC19DEF44C003EB271 /* Sources */,
157 | 26323FFD19DEF44C003EB271 /* Frameworks */,
158 | 26323FFE19DEF44C003EB271 /* Resources */,
159 | );
160 | buildRules = (
161 | );
162 | dependencies = (
163 | 2632400219DEF44C003EB271 /* PBXTargetDependency */,
164 | );
165 | name = DynamicScrollViewTests;
166 | productName = DynamicScrollViewTests;
167 | productReference = 2632400019DEF44C003EB271 /* DynamicScrollViewTests.xctest */;
168 | productType = "com.apple.product-type.bundle.unit-test";
169 | };
170 | /* End PBXNativeTarget section */
171 |
172 | /* Begin PBXProject section */
173 | 26323FE319DEF44C003EB271 /* Project object */ = {
174 | isa = PBXProject;
175 | attributes = {
176 | LastUpgradeCheck = 0600;
177 | ORGANIZATIONNAME = damirstuhec;
178 | TargetAttributes = {
179 | 26323FEA19DEF44C003EB271 = {
180 | CreatedOnToolsVersion = 6.0;
181 | };
182 | 26323FFF19DEF44C003EB271 = {
183 | CreatedOnToolsVersion = 6.0;
184 | TestTargetID = 26323FEA19DEF44C003EB271;
185 | };
186 | };
187 | };
188 | buildConfigurationList = 26323FE619DEF44C003EB271 /* Build configuration list for PBXProject "DynamicScrollView" */;
189 | compatibilityVersion = "Xcode 3.2";
190 | developmentRegion = English;
191 | hasScannedForEncodings = 0;
192 | knownRegions = (
193 | en,
194 | Base,
195 | );
196 | mainGroup = 26323FE219DEF44C003EB271;
197 | productRefGroup = 26323FEC19DEF44C003EB271 /* Products */;
198 | projectDirPath = "";
199 | projectRoot = "";
200 | targets = (
201 | 26323FEA19DEF44C003EB271 /* DynamicScrollView */,
202 | 26323FFF19DEF44C003EB271 /* DynamicScrollViewTests */,
203 | );
204 | };
205 | /* End PBXProject section */
206 |
207 | /* Begin PBXResourcesBuildPhase section */
208 | 26323FE919DEF44C003EB271 /* Resources */ = {
209 | isa = PBXResourcesBuildPhase;
210 | buildActionMask = 2147483647;
211 | files = (
212 | 26323FF619DEF44C003EB271 /* Main.storyboard in Resources */,
213 | 26323FFB19DEF44C003EB271 /* LaunchScreen.xib in Resources */,
214 | 26323FF819DEF44C003EB271 /* Images.xcassets in Resources */,
215 | );
216 | runOnlyForDeploymentPostprocessing = 0;
217 | };
218 | 26323FFE19DEF44C003EB271 /* Resources */ = {
219 | isa = PBXResourcesBuildPhase;
220 | buildActionMask = 2147483647;
221 | files = (
222 | );
223 | runOnlyForDeploymentPostprocessing = 0;
224 | };
225 | /* End PBXResourcesBuildPhase section */
226 |
227 | /* Begin PBXSourcesBuildPhase section */
228 | 26323FE719DEF44C003EB271 /* Sources */ = {
229 | isa = PBXSourcesBuildPhase;
230 | buildActionMask = 2147483647;
231 | files = (
232 | 2632401C19DF42AB003EB271 /* DSDynamicView.swift in Sources */,
233 | 26323FF319DEF44C003EB271 /* ViewController.swift in Sources */,
234 | 26323FF119DEF44C003EB271 /* AppDelegate.swift in Sources */,
235 | 2632401B19DF42AB003EB271 /* DSDynamicScrollView.swift in Sources */,
236 | 2632401619DF0F53003EB271 /* ExampleView.swift in Sources */,
237 | );
238 | runOnlyForDeploymentPostprocessing = 0;
239 | };
240 | 26323FFC19DEF44C003EB271 /* Sources */ = {
241 | isa = PBXSourcesBuildPhase;
242 | buildActionMask = 2147483647;
243 | files = (
244 | 2632400719DEF44C003EB271 /* DynamicScrollViewTests.swift in Sources */,
245 | );
246 | runOnlyForDeploymentPostprocessing = 0;
247 | };
248 | /* End PBXSourcesBuildPhase section */
249 |
250 | /* Begin PBXTargetDependency section */
251 | 2632400219DEF44C003EB271 /* PBXTargetDependency */ = {
252 | isa = PBXTargetDependency;
253 | target = 26323FEA19DEF44C003EB271 /* DynamicScrollView */;
254 | targetProxy = 2632400119DEF44C003EB271 /* PBXContainerItemProxy */;
255 | };
256 | /* End PBXTargetDependency section */
257 |
258 | /* Begin PBXVariantGroup section */
259 | 26323FF419DEF44C003EB271 /* Main.storyboard */ = {
260 | isa = PBXVariantGroup;
261 | children = (
262 | 26323FF519DEF44C003EB271 /* Base */,
263 | );
264 | name = Main.storyboard;
265 | sourceTree = "";
266 | };
267 | 26323FF919DEF44C003EB271 /* LaunchScreen.xib */ = {
268 | isa = PBXVariantGroup;
269 | children = (
270 | 26323FFA19DEF44C003EB271 /* Base */,
271 | );
272 | name = LaunchScreen.xib;
273 | sourceTree = "";
274 | };
275 | /* End PBXVariantGroup section */
276 |
277 | /* Begin XCBuildConfiguration section */
278 | 2632400819DEF44C003EB271 /* Debug */ = {
279 | isa = XCBuildConfiguration;
280 | buildSettings = {
281 | ALWAYS_SEARCH_USER_PATHS = NO;
282 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
283 | CLANG_CXX_LIBRARY = "libc++";
284 | CLANG_ENABLE_MODULES = YES;
285 | CLANG_ENABLE_OBJC_ARC = YES;
286 | CLANG_WARN_BOOL_CONVERSION = YES;
287 | CLANG_WARN_CONSTANT_CONVERSION = YES;
288 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
289 | CLANG_WARN_EMPTY_BODY = YES;
290 | CLANG_WARN_ENUM_CONVERSION = YES;
291 | CLANG_WARN_INT_CONVERSION = YES;
292 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
293 | CLANG_WARN_UNREACHABLE_CODE = YES;
294 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
295 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
296 | COPY_PHASE_STRIP = NO;
297 | ENABLE_STRICT_OBJC_MSGSEND = YES;
298 | GCC_C_LANGUAGE_STANDARD = gnu99;
299 | GCC_DYNAMIC_NO_PIC = NO;
300 | GCC_OPTIMIZATION_LEVEL = 0;
301 | GCC_PREPROCESSOR_DEFINITIONS = (
302 | "DEBUG=1",
303 | "$(inherited)",
304 | );
305 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
306 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
307 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
308 | GCC_WARN_UNDECLARED_SELECTOR = YES;
309 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
310 | GCC_WARN_UNUSED_FUNCTION = YES;
311 | GCC_WARN_UNUSED_VARIABLE = YES;
312 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
313 | MTL_ENABLE_DEBUG_INFO = YES;
314 | ONLY_ACTIVE_ARCH = YES;
315 | SDKROOT = iphoneos;
316 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
317 | };
318 | name = Debug;
319 | };
320 | 2632400919DEF44C003EB271 /* Release */ = {
321 | isa = XCBuildConfiguration;
322 | buildSettings = {
323 | ALWAYS_SEARCH_USER_PATHS = NO;
324 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
325 | CLANG_CXX_LIBRARY = "libc++";
326 | CLANG_ENABLE_MODULES = YES;
327 | CLANG_ENABLE_OBJC_ARC = YES;
328 | CLANG_WARN_BOOL_CONVERSION = YES;
329 | CLANG_WARN_CONSTANT_CONVERSION = YES;
330 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
331 | CLANG_WARN_EMPTY_BODY = YES;
332 | CLANG_WARN_ENUM_CONVERSION = YES;
333 | CLANG_WARN_INT_CONVERSION = YES;
334 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
335 | CLANG_WARN_UNREACHABLE_CODE = YES;
336 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
337 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
338 | COPY_PHASE_STRIP = YES;
339 | ENABLE_NS_ASSERTIONS = NO;
340 | ENABLE_STRICT_OBJC_MSGSEND = YES;
341 | GCC_C_LANGUAGE_STANDARD = gnu99;
342 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
343 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
344 | GCC_WARN_UNDECLARED_SELECTOR = YES;
345 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
346 | GCC_WARN_UNUSED_FUNCTION = YES;
347 | GCC_WARN_UNUSED_VARIABLE = YES;
348 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
349 | MTL_ENABLE_DEBUG_INFO = NO;
350 | SDKROOT = iphoneos;
351 | VALIDATE_PRODUCT = YES;
352 | };
353 | name = Release;
354 | };
355 | 2632400B19DEF44C003EB271 /* Debug */ = {
356 | isa = XCBuildConfiguration;
357 | buildSettings = {
358 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
359 | INFOPLIST_FILE = DynamicScrollView/Info.plist;
360 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
361 | PRODUCT_NAME = "$(TARGET_NAME)";
362 | };
363 | name = Debug;
364 | };
365 | 2632400C19DEF44C003EB271 /* Release */ = {
366 | isa = XCBuildConfiguration;
367 | buildSettings = {
368 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
369 | INFOPLIST_FILE = DynamicScrollView/Info.plist;
370 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
371 | PRODUCT_NAME = "$(TARGET_NAME)";
372 | };
373 | name = Release;
374 | };
375 | 2632400E19DEF44C003EB271 /* Debug */ = {
376 | isa = XCBuildConfiguration;
377 | buildSettings = {
378 | BUNDLE_LOADER = "$(TEST_HOST)";
379 | FRAMEWORK_SEARCH_PATHS = (
380 | "$(SDKROOT)/Developer/Library/Frameworks",
381 | "$(inherited)",
382 | );
383 | GCC_PREPROCESSOR_DEFINITIONS = (
384 | "DEBUG=1",
385 | "$(inherited)",
386 | );
387 | INFOPLIST_FILE = DynamicScrollViewTests/Info.plist;
388 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
389 | PRODUCT_NAME = "$(TARGET_NAME)";
390 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DynamicScrollView.app/DynamicScrollView";
391 | };
392 | name = Debug;
393 | };
394 | 2632400F19DEF44C003EB271 /* Release */ = {
395 | isa = XCBuildConfiguration;
396 | buildSettings = {
397 | BUNDLE_LOADER = "$(TEST_HOST)";
398 | FRAMEWORK_SEARCH_PATHS = (
399 | "$(SDKROOT)/Developer/Library/Frameworks",
400 | "$(inherited)",
401 | );
402 | INFOPLIST_FILE = DynamicScrollViewTests/Info.plist;
403 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
404 | PRODUCT_NAME = "$(TARGET_NAME)";
405 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DynamicScrollView.app/DynamicScrollView";
406 | };
407 | name = Release;
408 | };
409 | /* End XCBuildConfiguration section */
410 |
411 | /* Begin XCConfigurationList section */
412 | 26323FE619DEF44C003EB271 /* Build configuration list for PBXProject "DynamicScrollView" */ = {
413 | isa = XCConfigurationList;
414 | buildConfigurations = (
415 | 2632400819DEF44C003EB271 /* Debug */,
416 | 2632400919DEF44C003EB271 /* Release */,
417 | );
418 | defaultConfigurationIsVisible = 0;
419 | defaultConfigurationName = Release;
420 | };
421 | 2632400A19DEF44C003EB271 /* Build configuration list for PBXNativeTarget "DynamicScrollView" */ = {
422 | isa = XCConfigurationList;
423 | buildConfigurations = (
424 | 2632400B19DEF44C003EB271 /* Debug */,
425 | 2632400C19DEF44C003EB271 /* Release */,
426 | );
427 | defaultConfigurationIsVisible = 0;
428 | defaultConfigurationName = Release;
429 | };
430 | 2632400D19DEF44C003EB271 /* Build configuration list for PBXNativeTarget "DynamicScrollViewTests" */ = {
431 | isa = XCConfigurationList;
432 | buildConfigurations = (
433 | 2632400E19DEF44C003EB271 /* Debug */,
434 | 2632400F19DEF44C003EB271 /* Release */,
435 | );
436 | defaultConfigurationIsVisible = 0;
437 | defaultConfigurationName = Release;
438 | };
439 | /* End XCConfigurationList section */
440 | };
441 | rootObject = 26323FE319DEF44C003EB271 /* Project object */;
442 | }
443 |
--------------------------------------------------------------------------------
/Sample_Objective-C/DynamicScrollView.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 2616D1ED195F16E800901FFC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2616D1EC195F16E800901FFC /* Foundation.framework */; };
11 | 2616D1EF195F16E800901FFC /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2616D1EE195F16E800901FFC /* CoreGraphics.framework */; };
12 | 2616D1F1195F16E800901FFC /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2616D1F0195F16E800901FFC /* UIKit.framework */; };
13 | 2616D1F7195F16E800901FFC /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2616D1F5195F16E800901FFC /* InfoPlist.strings */; };
14 | 2616D1F9195F16E800901FFC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2616D1F8195F16E800901FFC /* main.m */; };
15 | 2616D1FD195F16E800901FFC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2616D1FC195F16E800901FFC /* AppDelegate.m */; };
16 | 2616D200195F16E800901FFC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2616D1FE195F16E800901FFC /* Main.storyboard */; };
17 | 2616D203195F16E800901FFC /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2616D202195F16E800901FFC /* ViewController.m */; };
18 | 2616D205195F16E800901FFC /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2616D204195F16E800901FFC /* Images.xcassets */; };
19 | 2616D20D195F16E800901FFC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2616D1EC195F16E800901FFC /* Foundation.framework */; };
20 | 2616D20E195F16E800901FFC /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2616D1F0195F16E800901FFC /* UIKit.framework */; };
21 | 26323FE019DEF40B003EB271 /* DSDynamicScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 26323FDD19DEF40B003EB271 /* DSDynamicScrollView.m */; };
22 | 26323FE119DEF40B003EB271 /* DSDynamicView.m in Sources */ = {isa = PBXBuildFile; fileRef = 26323FDF19DEF40B003EB271 /* DSDynamicView.m */; };
23 | 26DF1F9D19DEC164003F6807 /* ExampleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 26DF1F9C19DEC164003F6807 /* ExampleView.m */; };
24 | /* End PBXBuildFile section */
25 |
26 | /* Begin PBXContainerItemProxy section */
27 | 2616D20F195F16E800901FFC /* PBXContainerItemProxy */ = {
28 | isa = PBXContainerItemProxy;
29 | containerPortal = 2616D1E1195F16E800901FFC /* Project object */;
30 | proxyType = 1;
31 | remoteGlobalIDString = 2616D1E8195F16E800901FFC;
32 | remoteInfo = DynamicScrollView;
33 | };
34 | /* End PBXContainerItemProxy section */
35 |
36 | /* Begin PBXFileReference section */
37 | 2616D1E9195F16E800901FFC /* DynamicScrollView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DynamicScrollView.app; sourceTree = BUILT_PRODUCTS_DIR; };
38 | 2616D1EC195F16E800901FFC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
39 | 2616D1EE195F16E800901FFC /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
40 | 2616D1F0195F16E800901FFC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
41 | 2616D1F4195F16E800901FFC /* DynamicScrollView-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "DynamicScrollView-Info.plist"; sourceTree = ""; };
42 | 2616D1F6195F16E800901FFC /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
43 | 2616D1F8195F16E800901FFC /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
44 | 2616D1FA195F16E800901FFC /* DynamicScrollView-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "DynamicScrollView-Prefix.pch"; sourceTree = ""; };
45 | 2616D1FB195F16E800901FFC /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
46 | 2616D1FC195F16E800901FFC /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
47 | 2616D1FF195F16E800901FFC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
48 | 2616D201195F16E800901FFC /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
49 | 2616D202195F16E800901FFC /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
50 | 2616D204195F16E800901FFC /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
51 | 2616D20A195F16E800901FFC /* DynamicScrollViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DynamicScrollViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
52 | 26323FDC19DEF40B003EB271 /* DSDynamicScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DSDynamicScrollView.h; path = "../Component_Objective-C/DSDynamicScrollView.h"; sourceTree = ""; };
53 | 26323FDD19DEF40B003EB271 /* DSDynamicScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DSDynamicScrollView.m; path = "../Component_Objective-C/DSDynamicScrollView.m"; sourceTree = ""; };
54 | 26323FDE19DEF40B003EB271 /* DSDynamicView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DSDynamicView.h; path = "../Component_Objective-C/DSDynamicView.h"; sourceTree = ""; };
55 | 26323FDF19DEF40B003EB271 /* DSDynamicView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DSDynamicView.m; path = "../Component_Objective-C/DSDynamicView.m"; sourceTree = ""; };
56 | 26DF1F9B19DEC164003F6807 /* ExampleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExampleView.h; sourceTree = ""; };
57 | 26DF1F9C19DEC164003F6807 /* ExampleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExampleView.m; sourceTree = ""; };
58 | /* End PBXFileReference section */
59 |
60 | /* Begin PBXFrameworksBuildPhase section */
61 | 2616D1E6195F16E800901FFC /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | 2616D1EF195F16E800901FFC /* CoreGraphics.framework in Frameworks */,
66 | 2616D1F1195F16E800901FFC /* UIKit.framework in Frameworks */,
67 | 2616D1ED195F16E800901FFC /* Foundation.framework in Frameworks */,
68 | );
69 | runOnlyForDeploymentPostprocessing = 0;
70 | };
71 | 2616D207195F16E800901FFC /* Frameworks */ = {
72 | isa = PBXFrameworksBuildPhase;
73 | buildActionMask = 2147483647;
74 | files = (
75 | 2616D20E195F16E800901FFC /* UIKit.framework in Frameworks */,
76 | 2616D20D195F16E800901FFC /* Foundation.framework in Frameworks */,
77 | );
78 | runOnlyForDeploymentPostprocessing = 0;
79 | };
80 | /* End PBXFrameworksBuildPhase section */
81 |
82 | /* Begin PBXGroup section */
83 | 2616D1E0195F16E800901FFC = {
84 | isa = PBXGroup;
85 | children = (
86 | 26DF1F9419DEC123003F6807 /* Component */,
87 | 2616D1F2195F16E800901FFC /* DynamicScrollView */,
88 | 2616D1EB195F16E800901FFC /* Frameworks */,
89 | 2616D1EA195F16E800901FFC /* Products */,
90 | );
91 | sourceTree = "";
92 | };
93 | 2616D1EA195F16E800901FFC /* Products */ = {
94 | isa = PBXGroup;
95 | children = (
96 | 2616D1E9195F16E800901FFC /* DynamicScrollView.app */,
97 | 2616D20A195F16E800901FFC /* DynamicScrollViewTests.xctest */,
98 | );
99 | name = Products;
100 | sourceTree = "";
101 | };
102 | 2616D1EB195F16E800901FFC /* Frameworks */ = {
103 | isa = PBXGroup;
104 | children = (
105 | 2616D1EC195F16E800901FFC /* Foundation.framework */,
106 | 2616D1EE195F16E800901FFC /* CoreGraphics.framework */,
107 | 2616D1F0195F16E800901FFC /* UIKit.framework */,
108 | );
109 | name = Frameworks;
110 | sourceTree = "";
111 | };
112 | 2616D1F2195F16E800901FFC /* DynamicScrollView */ = {
113 | isa = PBXGroup;
114 | children = (
115 | 2616D1FB195F16E800901FFC /* AppDelegate.h */,
116 | 2616D1FC195F16E800901FFC /* AppDelegate.m */,
117 | 2616D1FE195F16E800901FFC /* Main.storyboard */,
118 | 2616D201195F16E800901FFC /* ViewController.h */,
119 | 2616D202195F16E800901FFC /* ViewController.m */,
120 | 26DF1F9B19DEC164003F6807 /* ExampleView.h */,
121 | 26DF1F9C19DEC164003F6807 /* ExampleView.m */,
122 | 2616D204195F16E800901FFC /* Images.xcassets */,
123 | 2616D1F3195F16E800901FFC /* Supporting Files */,
124 | );
125 | path = DynamicScrollView;
126 | sourceTree = "";
127 | };
128 | 2616D1F3195F16E800901FFC /* Supporting Files */ = {
129 | isa = PBXGroup;
130 | children = (
131 | 2616D1F4195F16E800901FFC /* DynamicScrollView-Info.plist */,
132 | 2616D1F5195F16E800901FFC /* InfoPlist.strings */,
133 | 2616D1F8195F16E800901FFC /* main.m */,
134 | 2616D1FA195F16E800901FFC /* DynamicScrollView-Prefix.pch */,
135 | );
136 | name = "Supporting Files";
137 | sourceTree = "";
138 | };
139 | 26DF1F9419DEC123003F6807 /* Component */ = {
140 | isa = PBXGroup;
141 | children = (
142 | 26323FDC19DEF40B003EB271 /* DSDynamicScrollView.h */,
143 | 26323FDD19DEF40B003EB271 /* DSDynamicScrollView.m */,
144 | 26323FDE19DEF40B003EB271 /* DSDynamicView.h */,
145 | 26323FDF19DEF40B003EB271 /* DSDynamicView.m */,
146 | );
147 | name = Component;
148 | sourceTree = "";
149 | };
150 | /* End PBXGroup section */
151 |
152 | /* Begin PBXNativeTarget section */
153 | 2616D1E8195F16E800901FFC /* DynamicScrollView */ = {
154 | isa = PBXNativeTarget;
155 | buildConfigurationList = 2616D21B195F16E800901FFC /* Build configuration list for PBXNativeTarget "DynamicScrollView" */;
156 | buildPhases = (
157 | 2616D1E5195F16E800901FFC /* Sources */,
158 | 2616D1E6195F16E800901FFC /* Frameworks */,
159 | 2616D1E7195F16E800901FFC /* Resources */,
160 | );
161 | buildRules = (
162 | );
163 | dependencies = (
164 | );
165 | name = DynamicScrollView;
166 | productName = DynamicScrollView;
167 | productReference = 2616D1E9195F16E800901FFC /* DynamicScrollView.app */;
168 | productType = "com.apple.product-type.application";
169 | };
170 | 2616D209195F16E800901FFC /* DynamicScrollViewTests */ = {
171 | isa = PBXNativeTarget;
172 | buildConfigurationList = 2616D21E195F16E800901FFC /* Build configuration list for PBXNativeTarget "DynamicScrollViewTests" */;
173 | buildPhases = (
174 | 2616D206195F16E800901FFC /* Sources */,
175 | 2616D207195F16E800901FFC /* Frameworks */,
176 | 2616D208195F16E800901FFC /* Resources */,
177 | );
178 | buildRules = (
179 | );
180 | dependencies = (
181 | 2616D210195F16E800901FFC /* PBXTargetDependency */,
182 | );
183 | name = DynamicScrollViewTests;
184 | productName = DynamicScrollViewTests;
185 | productReference = 2616D20A195F16E800901FFC /* DynamicScrollViewTests.xctest */;
186 | productType = "com.apple.product-type.bundle.unit-test";
187 | };
188 | /* End PBXNativeTarget section */
189 |
190 | /* Begin PBXProject section */
191 | 2616D1E1195F16E800901FFC /* Project object */ = {
192 | isa = PBXProject;
193 | attributes = {
194 | LastUpgradeCheck = 0510;
195 | ORGANIZATIONNAME = damirstuhec;
196 | TargetAttributes = {
197 | 2616D209195F16E800901FFC = {
198 | TestTargetID = 2616D1E8195F16E800901FFC;
199 | };
200 | };
201 | };
202 | buildConfigurationList = 2616D1E4195F16E800901FFC /* Build configuration list for PBXProject "DynamicScrollView" */;
203 | compatibilityVersion = "Xcode 3.2";
204 | developmentRegion = English;
205 | hasScannedForEncodings = 0;
206 | knownRegions = (
207 | en,
208 | Base,
209 | );
210 | mainGroup = 2616D1E0195F16E800901FFC;
211 | productRefGroup = 2616D1EA195F16E800901FFC /* Products */;
212 | projectDirPath = "";
213 | projectRoot = "";
214 | targets = (
215 | 2616D1E8195F16E800901FFC /* DynamicScrollView */,
216 | 2616D209195F16E800901FFC /* DynamicScrollViewTests */,
217 | );
218 | };
219 | /* End PBXProject section */
220 |
221 | /* Begin PBXResourcesBuildPhase section */
222 | 2616D1E7195F16E800901FFC /* Resources */ = {
223 | isa = PBXResourcesBuildPhase;
224 | buildActionMask = 2147483647;
225 | files = (
226 | 2616D205195F16E800901FFC /* Images.xcassets in Resources */,
227 | 2616D1F7195F16E800901FFC /* InfoPlist.strings in Resources */,
228 | 2616D200195F16E800901FFC /* Main.storyboard in Resources */,
229 | );
230 | runOnlyForDeploymentPostprocessing = 0;
231 | };
232 | 2616D208195F16E800901FFC /* Resources */ = {
233 | isa = PBXResourcesBuildPhase;
234 | buildActionMask = 2147483647;
235 | files = (
236 | );
237 | runOnlyForDeploymentPostprocessing = 0;
238 | };
239 | /* End PBXResourcesBuildPhase section */
240 |
241 | /* Begin PBXSourcesBuildPhase section */
242 | 2616D1E5195F16E800901FFC /* Sources */ = {
243 | isa = PBXSourcesBuildPhase;
244 | buildActionMask = 2147483647;
245 | files = (
246 | 26323FE019DEF40B003EB271 /* DSDynamicScrollView.m in Sources */,
247 | 2616D203195F16E800901FFC /* ViewController.m in Sources */,
248 | 2616D1FD195F16E800901FFC /* AppDelegate.m in Sources */,
249 | 2616D1F9195F16E800901FFC /* main.m in Sources */,
250 | 26DF1F9D19DEC164003F6807 /* ExampleView.m in Sources */,
251 | 26323FE119DEF40B003EB271 /* DSDynamicView.m in Sources */,
252 | );
253 | runOnlyForDeploymentPostprocessing = 0;
254 | };
255 | 2616D206195F16E800901FFC /* Sources */ = {
256 | isa = PBXSourcesBuildPhase;
257 | buildActionMask = 2147483647;
258 | files = (
259 | );
260 | runOnlyForDeploymentPostprocessing = 0;
261 | };
262 | /* End PBXSourcesBuildPhase section */
263 |
264 | /* Begin PBXTargetDependency section */
265 | 2616D210195F16E800901FFC /* PBXTargetDependency */ = {
266 | isa = PBXTargetDependency;
267 | target = 2616D1E8195F16E800901FFC /* DynamicScrollView */;
268 | targetProxy = 2616D20F195F16E800901FFC /* PBXContainerItemProxy */;
269 | };
270 | /* End PBXTargetDependency section */
271 |
272 | /* Begin PBXVariantGroup section */
273 | 2616D1F5195F16E800901FFC /* InfoPlist.strings */ = {
274 | isa = PBXVariantGroup;
275 | children = (
276 | 2616D1F6195F16E800901FFC /* en */,
277 | );
278 | name = InfoPlist.strings;
279 | sourceTree = "";
280 | };
281 | 2616D1FE195F16E800901FFC /* Main.storyboard */ = {
282 | isa = PBXVariantGroup;
283 | children = (
284 | 2616D1FF195F16E800901FFC /* Base */,
285 | );
286 | name = Main.storyboard;
287 | sourceTree = "";
288 | };
289 | /* End PBXVariantGroup section */
290 |
291 | /* Begin XCBuildConfiguration section */
292 | 2616D219195F16E800901FFC /* Debug */ = {
293 | isa = XCBuildConfiguration;
294 | buildSettings = {
295 | ALWAYS_SEARCH_USER_PATHS = NO;
296 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
297 | CLANG_CXX_LIBRARY = "libc++";
298 | CLANG_ENABLE_MODULES = YES;
299 | CLANG_ENABLE_OBJC_ARC = YES;
300 | CLANG_WARN_BOOL_CONVERSION = YES;
301 | CLANG_WARN_CONSTANT_CONVERSION = YES;
302 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
303 | CLANG_WARN_EMPTY_BODY = YES;
304 | CLANG_WARN_ENUM_CONVERSION = YES;
305 | CLANG_WARN_INT_CONVERSION = YES;
306 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
307 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
308 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
309 | COPY_PHASE_STRIP = NO;
310 | GCC_C_LANGUAGE_STANDARD = gnu99;
311 | GCC_DYNAMIC_NO_PIC = NO;
312 | GCC_OPTIMIZATION_LEVEL = 0;
313 | GCC_PREPROCESSOR_DEFINITIONS = (
314 | "DEBUG=1",
315 | "$(inherited)",
316 | );
317 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
318 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
319 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
320 | GCC_WARN_UNDECLARED_SELECTOR = YES;
321 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
322 | GCC_WARN_UNUSED_FUNCTION = YES;
323 | GCC_WARN_UNUSED_VARIABLE = YES;
324 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
325 | ONLY_ACTIVE_ARCH = YES;
326 | SDKROOT = iphoneos;
327 | };
328 | name = Debug;
329 | };
330 | 2616D21A195F16E800901FFC /* Release */ = {
331 | isa = XCBuildConfiguration;
332 | buildSettings = {
333 | ALWAYS_SEARCH_USER_PATHS = NO;
334 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
335 | CLANG_CXX_LIBRARY = "libc++";
336 | CLANG_ENABLE_MODULES = YES;
337 | CLANG_ENABLE_OBJC_ARC = YES;
338 | CLANG_WARN_BOOL_CONVERSION = YES;
339 | CLANG_WARN_CONSTANT_CONVERSION = YES;
340 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
341 | CLANG_WARN_EMPTY_BODY = YES;
342 | CLANG_WARN_ENUM_CONVERSION = YES;
343 | CLANG_WARN_INT_CONVERSION = YES;
344 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
345 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
346 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
347 | COPY_PHASE_STRIP = YES;
348 | ENABLE_NS_ASSERTIONS = NO;
349 | GCC_C_LANGUAGE_STANDARD = gnu99;
350 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
351 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
352 | GCC_WARN_UNDECLARED_SELECTOR = YES;
353 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
354 | GCC_WARN_UNUSED_FUNCTION = YES;
355 | GCC_WARN_UNUSED_VARIABLE = YES;
356 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
357 | SDKROOT = iphoneos;
358 | VALIDATE_PRODUCT = YES;
359 | };
360 | name = Release;
361 | };
362 | 2616D21C195F16E800901FFC /* Debug */ = {
363 | isa = XCBuildConfiguration;
364 | buildSettings = {
365 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
366 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
367 | CLANG_ENABLE_MODULES = YES;
368 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
369 | GCC_PREFIX_HEADER = "DynamicScrollView/DynamicScrollView-Prefix.pch";
370 | INFOPLIST_FILE = "DynamicScrollView/DynamicScrollView-Info.plist";
371 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
372 | PRODUCT_NAME = "$(TARGET_NAME)";
373 | SWIFT_OBJC_BRIDGING_HEADER = "DynamicScrollView-Bridging-Header.h";
374 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
375 | WRAPPER_EXTENSION = app;
376 | };
377 | name = Debug;
378 | };
379 | 2616D21D195F16E800901FFC /* Release */ = {
380 | isa = XCBuildConfiguration;
381 | buildSettings = {
382 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
383 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
384 | CLANG_ENABLE_MODULES = YES;
385 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
386 | GCC_PREFIX_HEADER = "DynamicScrollView/DynamicScrollView-Prefix.pch";
387 | INFOPLIST_FILE = "DynamicScrollView/DynamicScrollView-Info.plist";
388 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
389 | PRODUCT_NAME = "$(TARGET_NAME)";
390 | SWIFT_OBJC_BRIDGING_HEADER = "DynamicScrollView-Bridging-Header.h";
391 | WRAPPER_EXTENSION = app;
392 | };
393 | name = Release;
394 | };
395 | 2616D21F195F16E800901FFC /* Debug */ = {
396 | isa = XCBuildConfiguration;
397 | buildSettings = {
398 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/DynamicScrollView.app/DynamicScrollView";
399 | FRAMEWORK_SEARCH_PATHS = (
400 | "$(SDKROOT)/Developer/Library/Frameworks",
401 | "$(inherited)",
402 | "$(DEVELOPER_FRAMEWORKS_DIR)",
403 | );
404 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
405 | GCC_PREFIX_HEADER = "DynamicScrollView/DynamicScrollView-Prefix.pch";
406 | GCC_PREPROCESSOR_DEFINITIONS = (
407 | "DEBUG=1",
408 | "$(inherited)",
409 | );
410 | INFOPLIST_FILE = "DynamicScrollViewTests/DynamicScrollViewTests-Info.plist";
411 | PRODUCT_NAME = "$(TARGET_NAME)";
412 | TEST_HOST = "$(BUNDLE_LOADER)";
413 | WRAPPER_EXTENSION = xctest;
414 | };
415 | name = Debug;
416 | };
417 | 2616D220195F16E800901FFC /* Release */ = {
418 | isa = XCBuildConfiguration;
419 | buildSettings = {
420 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/DynamicScrollView.app/DynamicScrollView";
421 | FRAMEWORK_SEARCH_PATHS = (
422 | "$(SDKROOT)/Developer/Library/Frameworks",
423 | "$(inherited)",
424 | "$(DEVELOPER_FRAMEWORKS_DIR)",
425 | );
426 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
427 | GCC_PREFIX_HEADER = "DynamicScrollView/DynamicScrollView-Prefix.pch";
428 | INFOPLIST_FILE = "DynamicScrollViewTests/DynamicScrollViewTests-Info.plist";
429 | PRODUCT_NAME = "$(TARGET_NAME)";
430 | TEST_HOST = "$(BUNDLE_LOADER)";
431 | WRAPPER_EXTENSION = xctest;
432 | };
433 | name = Release;
434 | };
435 | /* End XCBuildConfiguration section */
436 |
437 | /* Begin XCConfigurationList section */
438 | 2616D1E4195F16E800901FFC /* Build configuration list for PBXProject "DynamicScrollView" */ = {
439 | isa = XCConfigurationList;
440 | buildConfigurations = (
441 | 2616D219195F16E800901FFC /* Debug */,
442 | 2616D21A195F16E800901FFC /* Release */,
443 | );
444 | defaultConfigurationIsVisible = 0;
445 | defaultConfigurationName = Release;
446 | };
447 | 2616D21B195F16E800901FFC /* Build configuration list for PBXNativeTarget "DynamicScrollView" */ = {
448 | isa = XCConfigurationList;
449 | buildConfigurations = (
450 | 2616D21C195F16E800901FFC /* Debug */,
451 | 2616D21D195F16E800901FFC /* Release */,
452 | );
453 | defaultConfigurationIsVisible = 0;
454 | defaultConfigurationName = Release;
455 | };
456 | 2616D21E195F16E800901FFC /* Build configuration list for PBXNativeTarget "DynamicScrollViewTests" */ = {
457 | isa = XCConfigurationList;
458 | buildConfigurations = (
459 | 2616D21F195F16E800901FFC /* Debug */,
460 | 2616D220195F16E800901FFC /* Release */,
461 | );
462 | defaultConfigurationIsVisible = 0;
463 | defaultConfigurationName = Release;
464 | };
465 | /* End XCConfigurationList section */
466 | };
467 | rootObject = 2616D1E1195F16E800901FFC /* Project object */;
468 | }
469 |
--------------------------------------------------------------------------------