Skip to content

Commit c97f694

Browse files
committed
循环scrollView
0 parents  commit c97f694

File tree

22 files changed

+1129
-0
lines changed

22 files changed

+1129
-0
lines changed

循环scrollView.xcodeproj/project.pbxproj

Lines changed: 451 additions & 0 deletions
Large diffs are not rendered by default.

循环scrollView.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Bucket
3+
type = "1"
4+
version = "2.0">
5+
<Breakpoints>
6+
<BreakpointProxy
7+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
8+
<BreakpointContent
9+
shouldBeEnabled = "No"
10+
ignoreCount = "0"
11+
continueAfterRunningActions = "No"
12+
filePath = "&#x5faa;&#x73af;scrollView/ViewController.m"
13+
timestampString = "460545382.566999"
14+
startingColumnNumber = "9223372036854775807"
15+
endingColumnNumber = "9223372036854775807"
16+
startingLineNumber = "88"
17+
endingLineNumber = "88"
18+
landmarkName = "-addScrollImageViews"
19+
landmarkType = "5">
20+
</BreakpointContent>
21+
</BreakpointProxy>
22+
<BreakpointProxy
23+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
24+
<BreakpointContent
25+
shouldBeEnabled = "No"
26+
ignoreCount = "0"
27+
continueAfterRunningActions = "No"
28+
filePath = "&#x5faa;&#x73af;scrollView/ViewController.m"
29+
timestampString = "460545351.359418"
30+
startingColumnNumber = "9223372036854775807"
31+
endingColumnNumber = "9223372036854775807"
32+
startingLineNumber = "55"
33+
endingLineNumber = "55"
34+
landmarkName = "-viewWillAppear:"
35+
landmarkType = "5">
36+
</BreakpointContent>
37+
</BreakpointProxy>
38+
</Breakpoints>
39+
</Bucket>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>循环scrollView.xcscheme</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
<key>SuppressBuildableAutocreation</key>
14+
<dict>
15+
<key>18DDB8F51B6F6C19008ACD5A</key>
16+
<dict>
17+
<key>primary</key>
18+
<true/>
19+
</dict>
20+
<key>18DDB90E1B6F6C19008ACD5A</key>
21+
<dict>
22+
<key>primary</key>
23+
<true/>
24+
</dict>
25+
</dict>
26+
</dict>
27+
</plist>
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0630"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "18DDB8F51B6F6C19008ACD5A"
18+
BuildableName = "&#x5faa;&#x73af;scrollView.app"
19+
BlueprintName = "&#x5faa;&#x73af;scrollView"
20+
ReferencedContainer = "container:&#x5faa;&#x73af;scrollView.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "NO"
27+
buildForArchiving = "NO"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "18DDB90E1B6F6C19008ACD5A"
32+
BuildableName = "&#x5faa;&#x73af;scrollViewTests.xctest"
33+
BlueprintName = "&#x5faa;&#x73af;scrollViewTests"
34+
ReferencedContainer = "container:&#x5faa;&#x73af;scrollView.xcodeproj">
35+
</BuildableReference>
36+
</BuildActionEntry>
37+
</BuildActionEntries>
38+
</BuildAction>
39+
<TestAction
40+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
41+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
42+
shouldUseLaunchSchemeArgsEnv = "YES"
43+
buildConfiguration = "Debug">
44+
<Testables>
45+
<TestableReference
46+
skipped = "NO">
47+
<BuildableReference
48+
BuildableIdentifier = "primary"
49+
BlueprintIdentifier = "18DDB90E1B6F6C19008ACD5A"
50+
BuildableName = "&#x5faa;&#x73af;scrollViewTests.xctest"
51+
BlueprintName = "&#x5faa;&#x73af;scrollViewTests"
52+
ReferencedContainer = "container:&#x5faa;&#x73af;scrollView.xcodeproj">
53+
</BuildableReference>
54+
</TestableReference>
55+
</Testables>
56+
<MacroExpansion>
57+
<BuildableReference
58+
BuildableIdentifier = "primary"
59+
BlueprintIdentifier = "18DDB8F51B6F6C19008ACD5A"
60+
BuildableName = "&#x5faa;&#x73af;scrollView.app"
61+
BlueprintName = "&#x5faa;&#x73af;scrollView"
62+
ReferencedContainer = "container:&#x5faa;&#x73af;scrollView.xcodeproj">
63+
</BuildableReference>
64+
</MacroExpansion>
65+
</TestAction>
66+
<LaunchAction
67+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
68+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
69+
launchStyle = "0"
70+
useCustomWorkingDirectory = "NO"
71+
buildConfiguration = "Debug"
72+
ignoresPersistentStateOnLaunch = "NO"
73+
debugDocumentVersioning = "YES"
74+
allowLocationSimulation = "YES">
75+
<BuildableProductRunnable
76+
runnableDebuggingMode = "0">
77+
<BuildableReference
78+
BuildableIdentifier = "primary"
79+
BlueprintIdentifier = "18DDB8F51B6F6C19008ACD5A"
80+
BuildableName = "&#x5faa;&#x73af;scrollView.app"
81+
BlueprintName = "&#x5faa;&#x73af;scrollView"
82+
ReferencedContainer = "container:&#x5faa;&#x73af;scrollView.xcodeproj">
83+
</BuildableReference>
84+
</BuildableProductRunnable>
85+
<AdditionalOptions>
86+
</AdditionalOptions>
87+
</LaunchAction>
88+
<ProfileAction
89+
shouldUseLaunchSchemeArgsEnv = "YES"
90+
savedToolIdentifier = ""
91+
useCustomWorkingDirectory = "NO"
92+
buildConfiguration = "Release"
93+
debugDocumentVersioning = "YES">
94+
<BuildableProductRunnable
95+
runnableDebuggingMode = "0">
96+
<BuildableReference
97+
BuildableIdentifier = "primary"
98+
BlueprintIdentifier = "18DDB8F51B6F6C19008ACD5A"
99+
BuildableName = "&#x5faa;&#x73af;scrollView.app"
100+
BlueprintName = "&#x5faa;&#x73af;scrollView"
101+
ReferencedContainer = "container:&#x5faa;&#x73af;scrollView.xcodeproj">
102+
</BuildableReference>
103+
</BuildableProductRunnable>
104+
</ProfileAction>
105+
<AnalyzeAction
106+
buildConfiguration = "Debug">
107+
</AnalyzeAction>
108+
<ArchiveAction
109+
buildConfiguration = "Release"
110+
revealArchiveInOrganizer = "YES">
111+
</ArchiveAction>
112+
</Scheme>

循环scrollView/AppDelegate.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// AppDelegate.h
3+
// 循环scrollView
4+
//
5+
// Created by apple on 15/8/3.
6+
// Copyright (c) 2015年 wubangjun. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
@interface AppDelegate : UIResponder <UIApplicationDelegate>
12+
13+
@property (strong, nonatomic) UIWindow *window;
14+
15+
16+
@end
17+

循环scrollView/AppDelegate.m

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
//
2+
// AppDelegate.m
3+
// 循环scrollView
4+
//
5+
// Created by apple on 15/8/3.
6+
// Copyright (c) 2015年 wubangjun. All rights reserved.
7+
//
8+
9+
#import "AppDelegate.h"
10+
11+
@interface AppDelegate ()
12+
13+
@end
14+
15+
@implementation AppDelegate
16+
17+
18+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19+
// Override point for customization after application launch.
20+
return YES;
21+
}
22+
23+
- (void)applicationWillResignActive:(UIApplication *)application {
24+
// 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.
25+
// 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.
26+
}
27+
28+
- (void)applicationDidEnterBackground:(UIApplication *)application {
29+
// 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.
30+
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31+
}
32+
33+
- (void)applicationWillEnterForeground:(UIApplication *)application {
34+
// 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.
35+
}
36+
37+
- (void)applicationDidBecomeActive:(UIApplication *)application {
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+
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43+
}
44+
45+
@end
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
5+
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
6+
</dependencies>
7+
<objects>
8+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
9+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
10+
<view contentMode="scaleToFill" id="iN0-l3-epB">
11+
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
12+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
13+
<subviews>
14+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015年 wubangjun. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
15+
<rect key="frame" x="20" y="439" width="441" height="21"/>
16+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
17+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
18+
<nil key="highlightedColor"/>
19+
</label>
20+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="循环scrollView" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
21+
<rect key="frame" x="20" y="140" width="441" height="43"/>
22+
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
23+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
24+
<nil key="highlightedColor"/>
25+
</label>
26+
</subviews>
27+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
28+
<constraints>
29+
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
30+
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
31+
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
32+
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
33+
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
34+
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
35+
</constraints>
36+
<nil key="simulatedStatusBarMetrics"/>
37+
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
38+
<point key="canvasLocation" x="548" y="455"/>
39+
</view>
40+
</objects>
41+
</document>
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
5+
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
6+
</dependencies>
7+
<scenes>
8+
<!--View Controller-->
9+
<scene sceneID="ufC-wZ-h7g">
10+
<objects>
11+
<viewController id="vXZ-lx-hvc" customClass="ViewController" sceneMemberID="viewController">
12+
<layoutGuides>
13+
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
14+
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
15+
</layoutGuides>
16+
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
17+
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
18+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
19+
<subviews>
20+
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vxF-7a-mhf">
21+
<rect key="frame" x="0.0" y="0.0" width="320" height="200"/>
22+
<color key="backgroundColor" red="0.87843137250000003" green="0.87843137250000003" blue="0.87843137250000003" alpha="1" colorSpace="calibratedRGB"/>
23+
<constraints>
24+
<constraint firstAttribute="height" constant="200" id="2mR-bv-HG6"/>
25+
<constraint firstAttribute="height" constant="200" id="JkP-3N-ImK"/>
26+
</constraints>
27+
<variation key="default">
28+
<mask key="constraints">
29+
<exclude reference="2mR-bv-HG6"/>
30+
</mask>
31+
</variation>
32+
<connections>
33+
<outlet property="delegate" destination="vXZ-lx-hvc" id="B2L-YC-RpL"/>
34+
</connections>
35+
</scrollView>
36+
<pageControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="3" translatesAutoresizingMaskIntoConstraints="NO" id="onW-1w-Wj2">
37+
<rect key="frame" x="0.0" y="180" width="320" height="20"/>
38+
<constraints>
39+
<constraint firstAttribute="height" constant="20" id="EJi-h4-0ks"/>
40+
</constraints>
41+
<color key="pageIndicatorTintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
42+
<color key="currentPageIndicatorTintColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
43+
</pageControl>
44+
</subviews>
45+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
46+
<constraints>
47+
<constraint firstAttribute="trailing" secondItem="vxF-7a-mhf" secondAttribute="trailing" id="7pA-vh-03Z"/>
48+
<constraint firstAttribute="trailingMargin" secondItem="vxF-7a-mhf" secondAttribute="trailing" id="AZE-kc-3ET"/>
49+
<constraint firstItem="vxF-7a-mhf" firstAttribute="top" secondItem="kh9-bI-dsS" secondAttribute="top" id="KFR-tK-nEh"/>
50+
<constraint firstAttribute="trailing" secondItem="onW-1w-Wj2" secondAttribute="trailing" id="QKS-aF-EGL"/>
51+
<constraint firstItem="onW-1w-Wj2" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leading" id="UQ8-CC-wZA"/>
52+
<constraint firstItem="vxF-7a-mhf" firstAttribute="top" secondItem="kh9-bI-dsS" secondAttribute="topMargin" id="VPN-Tt-jGi"/>
53+
<constraint firstItem="vxF-7a-mhf" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leading" id="b4V-aG-H6F"/>
54+
<constraint firstItem="onW-1w-Wj2" firstAttribute="top" secondItem="kh9-bI-dsS" secondAttribute="top" constant="180" id="vPo-nG-W0K"/>
55+
<constraint firstItem="vxF-7a-mhf" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leadingMargin" id="wu9-BN-PhX"/>
56+
</constraints>
57+
<variation key="default">
58+
<mask key="constraints">
59+
<exclude reference="AZE-kc-3ET"/>
60+
<exclude reference="VPN-Tt-jGi"/>
61+
<exclude reference="wu9-BN-PhX"/>
62+
</mask>
63+
</variation>
64+
</view>
65+
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
66+
<connections>
67+
<outlet property="pageControl" destination="onW-1w-Wj2" id="OFl-b4-a9Z"/>
68+
<outlet property="scrollView" destination="vxF-7a-mhf" id="jEy-6N-rCA"/>
69+
</connections>
70+
</viewController>
71+
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
72+
</objects>
73+
</scene>
74+
</scenes>
75+
</document>

0 commit comments

Comments
 (0)