mirror of
https://github.com/zhigang1992/WLPageViewController.git
synced 2026-01-12 17:53:20 +08:00
Reborn as a standalone project.
This commit is contained in:
360
WLPageViewController.xcodeproj/project.pbxproj
Normal file
360
WLPageViewController.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,360 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
C952C46817626F490021A0BA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C952C46717626F490021A0BA /* UIKit.framework */; };
|
||||
C952C46A17626F490021A0BA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C952C46917626F490021A0BA /* Foundation.framework */; };
|
||||
C952C46C17626F490021A0BA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C952C46B17626F490021A0BA /* CoreGraphics.framework */; };
|
||||
C952C47217626F490021A0BA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C952C47017626F490021A0BA /* InfoPlist.strings */; };
|
||||
C952C47417626F490021A0BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C952C47317626F490021A0BA /* main.m */; };
|
||||
C952C47817626F490021A0BA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C952C47717626F490021A0BA /* AppDelegate.m */; };
|
||||
C952C47A17626F490021A0BA /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = C952C47917626F490021A0BA /* Default.png */; };
|
||||
C952C47C17626F490021A0BA /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C952C47B17626F490021A0BA /* Default@2x.png */; };
|
||||
C952C47E17626F490021A0BA /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C952C47D17626F490021A0BA /* Default-568h@2x.png */; };
|
||||
C952C48717626F620021A0BA /* WLPageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C952C48617626F620021A0BA /* WLPageViewController.m */; };
|
||||
C952C4951762709C0021A0BA /* PageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C952C48E1762709C0021A0BA /* PageViewController.m */; };
|
||||
C952C4961762709C0021A0BA /* DataViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C952C4901762709C0021A0BA /* DataViewController.m */; };
|
||||
C952C4971762709C0021A0BA /* ModelController.m in Sources */ = {isa = PBXBuildFile; fileRef = C952C4921762709C0021A0BA /* ModelController.m */; };
|
||||
C952C4981762709C0021A0BA /* PageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C952C4931762709C0021A0BA /* PageViewController.xib */; };
|
||||
C952C4991762709C0021A0BA /* DataViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C952C4941762709C0021A0BA /* DataViewController.xib */; };
|
||||
C952C4D417629FFB0021A0BA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C952C4D317629FFB0021A0BA /* QuartzCore.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
C952C46417626F490021A0BA /* WLPageViewController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WLPageViewController.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C952C46717626F490021A0BA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
C952C46917626F490021A0BA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
C952C46B17626F490021A0BA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
C952C46F17626F490021A0BA /* WLPageViewController-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "WLPageViewController-Info.plist"; sourceTree = "<group>"; };
|
||||
C952C47117626F490021A0BA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
C952C47317626F490021A0BA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
C952C47517626F490021A0BA /* WLPageViewController-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WLPageViewController-Prefix.pch"; sourceTree = "<group>"; };
|
||||
C952C47617626F490021A0BA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
C952C47717626F490021A0BA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
C952C47917626F490021A0BA /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
|
||||
C952C47B17626F490021A0BA /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
|
||||
C952C47D17626F490021A0BA /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
|
||||
C952C48517626F620021A0BA /* WLPageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WLPageViewController.h; sourceTree = "<group>"; };
|
||||
C952C48617626F620021A0BA /* WLPageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WLPageViewController.m; sourceTree = "<group>"; };
|
||||
C952C48D1762709C0021A0BA /* PageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageViewController.h; sourceTree = "<group>"; };
|
||||
C952C48E1762709C0021A0BA /* PageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PageViewController.m; sourceTree = "<group>"; };
|
||||
C952C48F1762709C0021A0BA /* DataViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataViewController.h; sourceTree = "<group>"; };
|
||||
C952C4901762709C0021A0BA /* DataViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DataViewController.m; sourceTree = "<group>"; };
|
||||
C952C4911762709C0021A0BA /* ModelController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModelController.h; sourceTree = "<group>"; };
|
||||
C952C4921762709C0021A0BA /* ModelController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModelController.m; sourceTree = "<group>"; };
|
||||
C952C4931762709C0021A0BA /* PageViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PageViewController.xib; sourceTree = "<group>"; };
|
||||
C952C4941762709C0021A0BA /* DataViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DataViewController.xib; sourceTree = "<group>"; };
|
||||
C952C4D317629FFB0021A0BA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
C952C46117626F490021A0BA /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C952C4D417629FFB0021A0BA /* QuartzCore.framework in Frameworks */,
|
||||
C952C46817626F490021A0BA /* UIKit.framework in Frameworks */,
|
||||
C952C46A17626F490021A0BA /* Foundation.framework in Frameworks */,
|
||||
C952C46C17626F490021A0BA /* CoreGraphics.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
C952C45B17626F490021A0BA = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C952C46D17626F490021A0BA /* WLPageViewController */,
|
||||
C952C48417626F4E0021A0BA /* Demo */,
|
||||
C952C46617626F490021A0BA /* Frameworks */,
|
||||
C952C46517626F490021A0BA /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C952C46517626F490021A0BA /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C952C46417626F490021A0BA /* WLPageViewController.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C952C46617626F490021A0BA /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C952C46717626F490021A0BA /* UIKit.framework */,
|
||||
C952C46917626F490021A0BA /* Foundation.framework */,
|
||||
C952C46B17626F490021A0BA /* CoreGraphics.framework */,
|
||||
C952C4D317629FFB0021A0BA /* QuartzCore.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C952C46D17626F490021A0BA /* WLPageViewController */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C952C48C17626FD60021A0BA /* Dependence */,
|
||||
C952C48517626F620021A0BA /* WLPageViewController.h */,
|
||||
C952C48617626F620021A0BA /* WLPageViewController.m */,
|
||||
);
|
||||
path = WLPageViewController;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C952C46E17626F490021A0BA /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C952C46F17626F490021A0BA /* WLPageViewController-Info.plist */,
|
||||
C952C47017626F490021A0BA /* InfoPlist.strings */,
|
||||
C952C47317626F490021A0BA /* main.m */,
|
||||
C952C47517626F490021A0BA /* WLPageViewController-Prefix.pch */,
|
||||
C952C47917626F490021A0BA /* Default.png */,
|
||||
C952C47B17626F490021A0BA /* Default@2x.png */,
|
||||
C952C47D17626F490021A0BA /* Default-568h@2x.png */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C952C48417626F4E0021A0BA /* Demo */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C952C47617626F490021A0BA /* AppDelegate.h */,
|
||||
C952C47717626F490021A0BA /* AppDelegate.m */,
|
||||
C952C48D1762709C0021A0BA /* PageViewController.h */,
|
||||
C952C48E1762709C0021A0BA /* PageViewController.m */,
|
||||
C952C48F1762709C0021A0BA /* DataViewController.h */,
|
||||
C952C4901762709C0021A0BA /* DataViewController.m */,
|
||||
C952C4911762709C0021A0BA /* ModelController.h */,
|
||||
C952C4921762709C0021A0BA /* ModelController.m */,
|
||||
C952C4931762709C0021A0BA /* PageViewController.xib */,
|
||||
C952C4941762709C0021A0BA /* DataViewController.xib */,
|
||||
C952C46E17626F490021A0BA /* Supporting Files */,
|
||||
);
|
||||
name = Demo;
|
||||
path = WLPageViewController;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C952C48C17626FD60021A0BA /* Dependence */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C9F06006177A4F7900978AF2 /* WLContainerControllers */,
|
||||
);
|
||||
name = Dependence;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
C9F06006177A4F7900978AF2 /* WLContainerControllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = WLContainerControllers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
C952C46317626F490021A0BA /* WLPageViewController */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = C952C48117626F490021A0BA /* Build configuration list for PBXNativeTarget "WLPageViewController" */;
|
||||
buildPhases = (
|
||||
C952C46017626F490021A0BA /* Sources */,
|
||||
C952C46117626F490021A0BA /* Frameworks */,
|
||||
C952C46217626F490021A0BA /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = WLPageViewController;
|
||||
productName = WLPageViewController;
|
||||
productReference = C952C46417626F490021A0BA /* WLPageViewController.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
C952C45C17626F490021A0BA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0460;
|
||||
ORGANIZATIONNAME = Moke;
|
||||
};
|
||||
buildConfigurationList = C952C45F17626F490021A0BA /* Build configuration list for PBXProject "WLPageViewController" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = C952C45B17626F490021A0BA;
|
||||
productRefGroup = C952C46517626F490021A0BA /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
C952C46317626F490021A0BA /* WLPageViewController */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
C952C46217626F490021A0BA /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C952C47217626F490021A0BA /* InfoPlist.strings in Resources */,
|
||||
C952C47A17626F490021A0BA /* Default.png in Resources */,
|
||||
C952C47C17626F490021A0BA /* Default@2x.png in Resources */,
|
||||
C952C47E17626F490021A0BA /* Default-568h@2x.png in Resources */,
|
||||
C952C4981762709C0021A0BA /* PageViewController.xib in Resources */,
|
||||
C952C4991762709C0021A0BA /* DataViewController.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
C952C46017626F490021A0BA /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
C952C47417626F490021A0BA /* main.m in Sources */,
|
||||
C952C47817626F490021A0BA /* AppDelegate.m in Sources */,
|
||||
C952C48717626F620021A0BA /* WLPageViewController.m in Sources */,
|
||||
C952C4951762709C0021A0BA /* PageViewController.m in Sources */,
|
||||
C952C4961762709C0021A0BA /* DataViewController.m in Sources */,
|
||||
C952C4971762709C0021A0BA /* ModelController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
C952C47017626F490021A0BA /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
C952C47117626F490021A0BA /* en */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
C952C47F17626F490021A0BA /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_WARN_STRICT_SELECTOR_MATCH = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_CFLAGS = (
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Wno-unused-parameter",
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C952C48017626F490021A0BA /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_WARN_STRICT_SELECTOR_MATCH = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 6.1;
|
||||
OTHER_CFLAGS = (
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Wno-unused-parameter",
|
||||
);
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
C952C48217626F490021A0BA /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "WLPageViewController/WLPageViewController-Prefix.pch";
|
||||
INFOPLIST_FILE = "WLPageViewController/WLPageViewController-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
C952C48317626F490021A0BA /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "WLPageViewController/WLPageViewController-Prefix.pch";
|
||||
INFOPLIST_FILE = "WLPageViewController/WLPageViewController-Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
C952C45F17626F490021A0BA /* Build configuration list for PBXProject "WLPageViewController" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C952C47F17626F490021A0BA /* Debug */,
|
||||
C952C48017626F490021A0BA /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
C952C48117626F490021A0BA /* Build configuration list for PBXNativeTarget "WLPageViewController" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
C952C48217626F490021A0BA /* Debug */,
|
||||
C952C48317626F490021A0BA /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = C952C45C17626F490021A0BA /* Project object */;
|
||||
}
|
||||
15
WLPageViewController/AppDelegate.h
Normal file
15
WLPageViewController/AppDelegate.h
Normal file
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// AppDelegate.h
|
||||
// WLPageViewController
|
||||
//
|
||||
// Created by Ling Wang on 6/7/13.
|
||||
// Copyright (c) 2013 Moke. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
|
||||
@end
|
||||
52
WLPageViewController/AppDelegate.m
Normal file
52
WLPageViewController/AppDelegate.m
Normal file
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// AppDelegate.m
|
||||
// WLPageViewController
|
||||
//
|
||||
// Created by Ling Wang on 6/7/13.
|
||||
// Copyright (c) 2013 Moke. All rights reserved.
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
#import "PageViewController.h"
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
PageViewController *papeViewController = [PageViewController new];
|
||||
|
||||
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
||||
self.window.backgroundColor = [UIColor whiteColor];
|
||||
self.window.rootViewController = papeViewController;
|
||||
[self.window makeKeyAndVisible];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application
|
||||
{
|
||||
// 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.
|
||||
// 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.
|
||||
}
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication *)application
|
||||
{
|
||||
// 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.
|
||||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application
|
||||
{
|
||||
// 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.
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application
|
||||
{
|
||||
// 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.
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application
|
||||
{
|
||||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
||||
}
|
||||
|
||||
@end
|
||||
14
WLPageViewController/DataViewController.h
Normal file
14
WLPageViewController/DataViewController.h
Normal file
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// DataViewController.h
|
||||
// WLPageViewController
|
||||
//
|
||||
// Created by Ling Wang on 7/7/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface DataViewController : UIViewController
|
||||
@property (strong, nonatomic) IBOutlet UILabel *dataLabel;
|
||||
@property (strong, nonatomic) id dataObject;
|
||||
@end
|
||||
37
WLPageViewController/DataViewController.m
Normal file
37
WLPageViewController/DataViewController.m
Normal file
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// DataViewController.m
|
||||
// WLPageViewController
|
||||
//
|
||||
// Created by Ling Wang on 7/7/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DataViewController.h"
|
||||
|
||||
@implementation DataViewController
|
||||
|
||||
@synthesize dataLabel = _dataLabel;
|
||||
@synthesize dataObject = _dataObject;
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
[super didReceiveMemoryWarning];
|
||||
// Release any cached data, images, etc that aren't in use.
|
||||
}
|
||||
|
||||
#pragma mark - View lifecycle
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view, typically from a nib.
|
||||
self.title = [self.dataObject description];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
self.dataLabel.text = [self.dataObject description];
|
||||
}
|
||||
|
||||
@end
|
||||
236
WLPageViewController/DataViewController.xib
Normal file
236
WLPageViewController/DataViewController.xib
Normal file
@@ -0,0 +1,236 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1280</int>
|
||||
<string key="IBDocument.SystemVersion">10J869</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">1845</string>
|
||||
<string key="IBDocument.AppKitVersion">1038.35</string>
|
||||
<string key="IBDocument.HIToolboxVersion">461.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">845</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>IBProxyObject</string>
|
||||
<string>IBUIView</string>
|
||||
<string>IBUILabel</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBProxyObject" id="372490531">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="975951072">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="191373211">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBUIView" id="517227778">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{8, 37}, {304, 415}}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
<object class="NSColorSpace" key="NSCustomColorSpace">
|
||||
<int key="NSID">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUILabel" id="638883310">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{8, 8}, {304, 21}}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="517227778"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<int key="IBUIContentMode">7</int>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<string key="IBUIText">Label</string>
|
||||
<object class="NSColor" key="IBUITextColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MCAwIDAAA</bytes>
|
||||
</object>
|
||||
<nil key="IBUIHighlightedColor"/>
|
||||
<int key="IBUIBaselineAdjustment">1</int>
|
||||
<float key="IBUIMinimumFontSize">10</float>
|
||||
<int key="IBUITextAlignment">1</int>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
||||
<int key="type">1</int>
|
||||
<int key="size">4</int>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica-Light</string>
|
||||
<double key="NSSize">14</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="638883310"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC45NzgyNjA4Njk2IDAuOTE4NDgxMzEwOCAwLjczOTE0MjYzNDQAA</bytes>
|
||||
</object>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="191373211"/>
|
||||
</object>
|
||||
<int key="connectionID">3</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">dataLabel</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="638883310"/>
|
||||
</object>
|
||||
<int key="connectionID">6</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<reference key="object" ref="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1</int>
|
||||
<reference key="object" ref="191373211"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="638883310"/>
|
||||
<reference ref="517227778"/>
|
||||
</object>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="372490531"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="975951072"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">4</int>
|
||||
<reference key="object" ref="517227778"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">5</int>
|
||||
<reference key="object" ref="638883310"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.CustomClassName</string>
|
||||
<string>-2.CustomClassName</string>
|
||||
<string>1.IBEditorWindowLastContentRect</string>
|
||||
<string>1.IBPluginDependency</string>
|
||||
<string>4.IBPluginDependency</string>
|
||||
<string>5.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>DataViewController</string>
|
||||
<string>UIResponder</string>
|
||||
<string>{{354, 412}, {320, 480}}</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">6</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">DataViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<string key="NS.key.0">dataLabel</string>
|
||||
<string key="NS.object.0">UILabel</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<string key="NS.key.0">dataLabel</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">dataLabel</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/DataViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||
<integer value="3100" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<string key="IBCocoaTouchPluginVersion">845</string>
|
||||
</data>
|
||||
</archive>
|
||||
BIN
WLPageViewController/Default-568h@2x.png
Normal file
BIN
WLPageViewController/Default-568h@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
WLPageViewController/Default.png
Normal file
BIN
WLPageViewController/Default.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
BIN
WLPageViewController/Default@2x.png
Normal file
BIN
WLPageViewController/Default@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
17
WLPageViewController/ModelController.h
Normal file
17
WLPageViewController/ModelController.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// ModelController.h
|
||||
// WLPageViewController
|
||||
//
|
||||
// Created by Ling Wang on 7/7/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "WLPageViewController.h"
|
||||
|
||||
@class DataViewController;
|
||||
|
||||
@interface ModelController : NSObject <WLPageViewControllerDataSource>
|
||||
- (DataViewController *)viewControllerAtIndex:(NSUInteger)index;
|
||||
- (NSUInteger)indexOfViewController:(DataViewController *)viewController;
|
||||
@end
|
||||
89
WLPageViewController/ModelController.m
Normal file
89
WLPageViewController/ModelController.m
Normal file
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// ModelController.m
|
||||
// WLPageViewController
|
||||
//
|
||||
// Created by Ling Wang on 7/7/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ModelController.h"
|
||||
|
||||
#import "DataViewController.h"
|
||||
|
||||
/*
|
||||
A controller object that manages a simple model -- a collection of month names.
|
||||
|
||||
The controller serves as the data source for the page view controller; it therefore implements pageViewController:viewControllerBeforeViewController: and pageViewController:viewControllerAfterViewController:.
|
||||
It also implements a custom method, viewControllerAtIndex: which is useful in the implementation of the data source methods, and in the initial configuration of the application.
|
||||
|
||||
There is no need to actually create view controllers for each page in advance -- indeed doing so incurs unnecessary overhead. Given the data model, these methods create, configure, and return a new view controller on demand.
|
||||
*/
|
||||
|
||||
@interface ModelController()
|
||||
@property (readonly, strong, nonatomic) NSArray *pageData;
|
||||
@end
|
||||
|
||||
@implementation ModelController
|
||||
|
||||
@synthesize pageData = _pageData;
|
||||
|
||||
- (id)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
// Create the data model.
|
||||
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
|
||||
_pageData = [[dateFormatter monthSymbols] copy];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (DataViewController *)viewControllerAtIndex:(NSUInteger)index
|
||||
{
|
||||
// Return the data view controller for the given index.
|
||||
if (([self.pageData count] == 0) || (index >= [self.pageData count])) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Create a new view controller and pass suitable data.
|
||||
DataViewController *dataViewController = [[DataViewController alloc] initWithNibName:@"DataViewController" bundle:nil];
|
||||
dataViewController.dataObject = [self.pageData objectAtIndex:index];
|
||||
return dataViewController;
|
||||
}
|
||||
|
||||
- (NSUInteger)indexOfViewController:(DataViewController *)viewController
|
||||
{
|
||||
/*
|
||||
Return the index of the given data view controller.
|
||||
For simplicity, this implementation uses a static array of model objects and the view controller stores the model object; you can therefore use the model object to identify the index.
|
||||
*/
|
||||
return [self.pageData indexOfObject:viewController.dataObject];
|
||||
}
|
||||
|
||||
#pragma mark - Page View Controller Data Source
|
||||
|
||||
- (UIViewController *)pageViewController:(WLPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController
|
||||
{
|
||||
NSUInteger index = [self indexOfViewController:(DataViewController *)viewController];
|
||||
if (index == NSNotFound) {
|
||||
return nil;
|
||||
}
|
||||
// NSUInteger count = [self.pageData count];
|
||||
// index = (index - 1 + count) % count;
|
||||
if (index == 0) return nil;
|
||||
return [self viewControllerAtIndex:index - 1];
|
||||
}
|
||||
|
||||
- (UIViewController *)pageViewController:(WLPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController
|
||||
{
|
||||
NSUInteger index = [self indexOfViewController:(DataViewController *)viewController];
|
||||
if (index == NSNotFound) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
// index = (index + 1) % [self.pageData count];
|
||||
if (index == [self.pageData count] - 1) return nil;
|
||||
return [self viewControllerAtIndex:index + 1];
|
||||
}
|
||||
|
||||
@end
|
||||
16
WLPageViewController/PageViewController.h
Normal file
16
WLPageViewController/PageViewController.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// PageViewController.h
|
||||
// WLPageViewController
|
||||
//
|
||||
// Created by Ling Wang on 7/7/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "WLPageViewController.h"
|
||||
|
||||
@interface PageViewController : UIViewController <WLPageViewControllerDelegate>
|
||||
|
||||
@property (strong, nonatomic) WLPageViewController *pageViewController;
|
||||
|
||||
@end
|
||||
68
WLPageViewController/PageViewController.m
Normal file
68
WLPageViewController/PageViewController.m
Normal file
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// PageViewController.m
|
||||
// WLPageViewController
|
||||
//
|
||||
// Created by Ling Wang on 7/7/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "PageViewController.h"
|
||||
|
||||
#import "ModelController.h"
|
||||
|
||||
#import "DataViewController.h"
|
||||
|
||||
@interface PageViewController ()
|
||||
@property (readonly, strong, nonatomic) ModelController *modelController;
|
||||
@end
|
||||
|
||||
@implementation PageViewController
|
||||
|
||||
@synthesize pageViewController = _pageViewController;
|
||||
@synthesize modelController = _modelController;
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
[super didReceiveMemoryWarning];
|
||||
// Release any cached data, images, etc that aren't in use.
|
||||
}
|
||||
|
||||
#pragma mark - View lifecycle
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
// Configure the page view controller and add it as a child view controller.
|
||||
DataViewController *startingViewController = [self.modelController viewControllerAtIndex:0];
|
||||
self.pageViewController = [[WLPageViewController alloc] initWithViewController:startingViewController];
|
||||
// self.pageViewController.enableTapPageTurning = YES;
|
||||
self.pageViewController.dataSource = self.modelController;
|
||||
self.pageViewController.delegate = self;
|
||||
|
||||
[self addChildViewController:self.pageViewController];
|
||||
[self.view addSubview:self.pageViewController.view];
|
||||
|
||||
// Set the page view controller's bounds using an inset rect so that self's view is visible around the edges of the pages.
|
||||
CGRect pageViewRect = self.view.bounds;
|
||||
self.pageViewController.view.frame = pageViewRect;
|
||||
|
||||
[self.pageViewController didMoveToParentViewController:self];
|
||||
|
||||
// Add the page view controller's gesture recognizers to the book view controller's view so that the gestures are started more easily.
|
||||
// self.view.gestureRecognizers = self.pageViewController.gestureRecognizers;
|
||||
}
|
||||
|
||||
- (ModelController *)modelController
|
||||
{
|
||||
/*
|
||||
Return the model controller object, creating it if necessary.
|
||||
In more complex implementations, the model controller may be passed to the view controller.
|
||||
*/
|
||||
if (!_modelController) {
|
||||
_modelController = [[ModelController alloc] init];
|
||||
}
|
||||
return _modelController;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
133
WLPageViewController/PageViewController.xib
Normal file
133
WLPageViewController/PageViewController.xib
Normal file
@@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1536</int>
|
||||
<string key="IBDocument.SystemVersion">12C60</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">2843</string>
|
||||
<string key="IBDocument.AppKitVersion">1187.34</string>
|
||||
<string key="IBDocument.HIToolboxVersion">625.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">1929</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>IBProxyObject</string>
|
||||
<string>IBUIView</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBProxyObject" id="372490531">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="975951072">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="191373211">
|
||||
<nil key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC42MDAwMDAwMjM4IDAuNDAwMDAwMDA2IDAuMjAwMDAwMDAzAA</bytes>
|
||||
</object>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="191373211"/>
|
||||
</object>
|
||||
<int key="connectionID">6</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<object class="NSArray" key="object" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1</int>
|
||||
<reference key="object" ref="191373211"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="372490531"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="975951072"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.CustomClassName</string>
|
||||
<string>-1.IBPluginDependency</string>
|
||||
<string>-2.CustomClassName</string>
|
||||
<string>-2.IBPluginDependency</string>
|
||||
<string>1.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>PageViewController</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>UIResponder</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">6</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
|
||||
<integer value="3100" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<string key="IBCocoaTouchPluginVersion">1929</string>
|
||||
</data>
|
||||
</archive>
|
||||
45
WLPageViewController/WLPageViewController-Info.plist
Normal file
45
WLPageViewController/WLPageViewController-Info.plist
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.moke.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
29
WLPageViewController/WLPageViewController-Prefix.pch
Normal file
29
WLPageViewController/WLPageViewController-Prefix.pch
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// Prefix header for all source files of the 'WLPageViewController' target in the 'WLPageViewController' project
|
||||
//
|
||||
|
||||
#import <Availability.h>
|
||||
|
||||
#ifndef __IPHONE_3_0
|
||||
#warning "This project uses features only available in iOS SDK 3.0 and later."
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
// DLog is almost a drop-in replacement for NSLog
|
||||
// DLog();
|
||||
// DLog(@"here");
|
||||
// DLog(@"value: %d", x);
|
||||
#ifdef DEBUG
|
||||
#define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
|
||||
#else
|
||||
#define DLog(...)
|
||||
#endif
|
||||
|
||||
#define DDLogError DLog
|
||||
|
||||
// ALog always displays output regardless of the DEBUG setting
|
||||
#define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
|
||||
48
WLPageViewController/WLPageViewController.h
Normal file
48
WLPageViewController/WLPageViewController.h
Normal file
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// WLPageViewController.h
|
||||
// WLPageViewController
|
||||
//
|
||||
// Created by Ling Wang on 7/8/11.
|
||||
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "WLContainerController.h"
|
||||
|
||||
@protocol WLPageViewControllerDataSource;
|
||||
@protocol WLPageViewControllerDelegate;
|
||||
|
||||
|
||||
@interface WLPageViewController : WLContainerController
|
||||
|
||||
#pragma mark Creating Page View Controllers
|
||||
- (id)initWithViewController:(UIViewController *)viewController;
|
||||
- (void)turnForward;
|
||||
- (void)turnBackward;
|
||||
|
||||
@property(nonatomic, weak) id <WLPageViewControllerDataSource> dataSource;
|
||||
@property(nonatomic, weak) id <WLPageViewControllerDelegate> delegate;
|
||||
|
||||
#pragma mark Configuration
|
||||
@property(nonatomic, assign) BOOL enableTapPageTurning;
|
||||
|
||||
#pragma mark Customizing Appearance
|
||||
@property(nonatomic, copy) NSDictionary *titleTextAttributes;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@protocol WLPageViewControllerDataSource <NSObject>
|
||||
|
||||
- (UIViewController *)pageViewController:(WLPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController;
|
||||
- (UIViewController *)pageViewController:(WLPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@protocol WLPageViewControllerDelegate <NSObject>
|
||||
@optional
|
||||
- (void)pageViewController:(WLPageViewController *)pageViewController willBeginPagingViewController:(UIViewController *)viewController;
|
||||
- (void)pageViewController:(WLPageViewController *)pageViewController didEndPagingViewController:(UIViewController *)viewController;
|
||||
|
||||
@end
|
||||
|
||||
1098
WLPageViewController/WLPageViewController.m
Normal file
1098
WLPageViewController/WLPageViewController.m
Normal file
File diff suppressed because it is too large
Load Diff
53
WLPageViewController/damping.m
Normal file
53
WLPageViewController/damping.m
Normal file
@@ -0,0 +1,53 @@
|
||||
## k = 80
|
||||
## m = 125
|
||||
## c = 200
|
||||
|
||||
t = 0:0.1:10;
|
||||
|
||||
## w_0 = sqrt(k / m)
|
||||
## zeta = c / (2 * sqrt(m * k))
|
||||
## zeta_w_0 = c / (2 * m)
|
||||
w_0 = .7
|
||||
zeta = 1
|
||||
|
||||
if abs(zeta - 1) < 0.001
|
||||
# critical damping
|
||||
printf('Critical damping\n');
|
||||
A = x_0
|
||||
B = v_0 + w_0 * x_0
|
||||
x = (A + B * t) .* power(e, -w_0 * t);
|
||||
t_max = 1 / w_0 - A / B
|
||||
x_max = (v_0 + w_0 * x_0) / w_0 * e^(-v_0 / (v_0 + w_0 * x_0))
|
||||
elseif zeta < 1
|
||||
# under-damping
|
||||
printf('Under-damping\n');
|
||||
w_d = w_0 * sqrt(1 - zeta * zeta)
|
||||
A = x_0
|
||||
B = (zeta * x_0 + v_0) / w_d
|
||||
x = power(e, -zeta * w_0 * t) .* (A * cos(w_d * t) + B * sin(w_d * t));
|
||||
a = B * w_d - A * zeta * w_0
|
||||
b = A * w_d + B * zeta * w_0
|
||||
sin_max = sqrt(a^2 / (a^2 + b^2))
|
||||
if a * b > 0
|
||||
theta_max = asin(sin_max)
|
||||
theta_max = [theta_max, theta_max + pi, theta_max + 2 * pi]
|
||||
else
|
||||
theta_max = pi - asin(sin_max)
|
||||
theta_max = [theta_max, theta_max + pi]
|
||||
end
|
||||
t_max = theta_max / w_d
|
||||
x_max = power(e, -zeta * w_0 * t_max) .* (A * cos(w_d * t_max) + B * sin(w_d * t_max))
|
||||
else
|
||||
# over-damping
|
||||
printf('Over-damping\n');
|
||||
g_b = 2 * zeta * w_0;
|
||||
g_c = w_0 * w_0;
|
||||
g_delta = sqrt(g_b * g_b - 4 * g_a * g_c);
|
||||
gamma_1 = (-g_b + g_delta) / 2;
|
||||
gamma_2 = (-g_b - g_delta) / 2;
|
||||
A = x_0 + (gamma_1 * x_0 - v_0) / (gamma_2 - gamma_1);
|
||||
B = -(gamma_1 * x_0 - v_0) / (gamma_2 - gamma_1);
|
||||
x = A * power(e, gamma_1 * t) + B * power(e, gamma_2 * t);
|
||||
end
|
||||
|
||||
plot(t, x)
|
||||
2
WLPageViewController/en.lproj/InfoPlist.strings
Normal file
2
WLPageViewController/en.lproj/InfoPlist.strings
Normal file
@@ -0,0 +1,2 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
||||
18
WLPageViewController/main.m
Normal file
18
WLPageViewController/main.m
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// main.m
|
||||
// WLPageViewController
|
||||
//
|
||||
// Created by Ling Wang on 6/7/13.
|
||||
// Copyright (c) 2013 Moke. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user