├── OneNote.sketch ├── OneNoteScroll ├── simpleMenuButton.png ├── Others │ ├── QMBTabs │ │ ├── 归档.zip │ │ ├── QMBTab.h │ │ ├── QMBTabBar.h │ │ ├── QMBTabsAppearance.h │ │ ├── QMBTabsAppearance.m │ │ ├── QMBTabViewController.h │ │ ├── QMBTabBar.m │ │ ├── QMBTabViewController.m │ │ └── QMBTab.m │ ├── publicSettings.m │ └── publicSettings.h ├── simpleMenuButton@2x.png ├── Images.xcassets │ ├── 061.imageset │ │ ├── 061.png │ │ └── Contents.json │ ├── 062.imageset │ │ ├── 062.png │ │ └── Contents.json │ ├── 063.imageset │ │ ├── 063.png │ │ └── Contents.json │ ├── LaunchImage.launchimage │ │ ├── 1.png │ │ ├── 1副本.png │ │ ├── 1ios8 47.png │ │ ├── 1ios8 55.png │ │ └── Contents.json │ ├── desktop.imageset │ │ ├── desktop.png │ │ └── Contents.json │ ├── 1ios8 47.imageset │ │ ├── 1ios8 47.png │ │ └── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── startPageViewCtl.h ├── Controller │ ├── LoginAndRegister │ │ ├── LoginViewCtl.h │ │ └── LoginViewCtl.m │ ├── docPreviewCtl.h │ └── docPreviewCtl.m ├── AppDelegate.h ├── main.m ├── oneNoteMainViewCtl.h ├── Views │ ├── DocContentCell.h │ └── DocContentCell.m ├── Model │ ├── DocContentModel.h │ └── DocContentModel.m ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── Info.plist ├── AppDelegate.m ├── oneNoteMainViewCtl.m └── startPageViewCtl.m ├── OneNoteScroll.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── northtower.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings ├── xcuserdata │ └── northtower.xcuserdatad │ │ ├── xcschemes │ │ ├── xcschememanagement.plist │ │ └── OneNoteScroll.xcscheme │ │ └── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist └── project.pbxproj ├── OneNoteScrollTests ├── Info.plist └── OneNoteScrollTests.m └── README.md /OneNote.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/northtower/OneNoteScroll/HEAD/OneNote.sketch -------------------------------------------------------------------------------- /OneNoteScroll/simpleMenuButton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/northtower/OneNoteScroll/HEAD/OneNoteScroll/simpleMenuButton.png -------------------------------------------------------------------------------- /OneNoteScroll/Others/QMBTabs/归档.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/northtower/OneNoteScroll/HEAD/OneNoteScroll/Others/QMBTabs/归档.zip -------------------------------------------------------------------------------- /OneNoteScroll/simpleMenuButton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/northtower/OneNoteScroll/HEAD/OneNoteScroll/simpleMenuButton@2x.png -------------------------------------------------------------------------------- /OneNoteScroll/Images.xcassets/061.imageset/061.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/northtower/OneNoteScroll/HEAD/OneNoteScroll/Images.xcassets/061.imageset/061.png -------------------------------------------------------------------------------- /OneNoteScroll/Images.xcassets/062.imageset/062.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/northtower/OneNoteScroll/HEAD/OneNoteScroll/Images.xcassets/062.imageset/062.png -------------------------------------------------------------------------------- /OneNoteScroll/Images.xcassets/063.imageset/063.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/northtower/OneNoteScroll/HEAD/OneNoteScroll/Images.xcassets/063.imageset/063.png -------------------------------------------------------------------------------- /OneNoteScroll/Images.xcassets/LaunchImage.launchimage/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/northtower/OneNoteScroll/HEAD/OneNoteScroll/Images.xcassets/LaunchImage.launchimage/1.png -------------------------------------------------------------------------------- /OneNoteScroll/Images.xcassets/desktop.imageset/desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/northtower/OneNoteScroll/HEAD/OneNoteScroll/Images.xcassets/desktop.imageset/desktop.png -------------------------------------------------------------------------------- /OneNoteScroll/Images.xcassets/1ios8 47.imageset/1ios8 47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/northtower/OneNoteScroll/HEAD/OneNoteScroll/Images.xcassets/1ios8 47.imageset/1ios8 47.png -------------------------------------------------------------------------------- /OneNoteScroll/Images.xcassets/LaunchImage.launchimage/1副本.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/northtower/OneNoteScroll/HEAD/OneNoteScroll/Images.xcassets/LaunchImage.launchimage/1副本.png -------------------------------------------------------------------------------- /OneNoteScroll/Images.xcassets/LaunchImage.launchimage/1ios8 47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/northtower/OneNoteScroll/HEAD/OneNoteScroll/Images.xcassets/LaunchImage.launchimage/1ios8 47.png -------------------------------------------------------------------------------- /OneNoteScroll/Images.xcassets/LaunchImage.launchimage/1ios8 55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/northtower/OneNoteScroll/HEAD/OneNoteScroll/Images.xcassets/LaunchImage.launchimage/1ios8 55.png -------------------------------------------------------------------------------- /OneNoteScroll.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /OneNoteScroll.xcodeproj/project.xcworkspace/xcuserdata/northtower.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/northtower/OneNoteScroll/HEAD/OneNoteScroll.xcodeproj/project.xcworkspace/xcuserdata/northtower.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /OneNoteScroll/Others/publicSettings.m: -------------------------------------------------------------------------------- 1 | // 2 | // publicSettings.m 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/19. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import "publicSettings.h" 10 | 11 | @implementation publicSettings 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /OneNoteScroll/startPageViewCtl.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/3. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface startPageViewCtl : UIViewController 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /OneNoteScroll/Controller/LoginAndRegister/LoginViewCtl.h: -------------------------------------------------------------------------------- 1 | // 2 | // LoginViewCtl.h 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/11. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LoginViewCtl : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /OneNoteScroll/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/3. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /OneNoteScroll/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/3. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /OneNoteScroll/Images.xcassets/061.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "061.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /OneNoteScroll/Images.xcassets/062.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "062.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /OneNoteScroll/Images.xcassets/063.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "063.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /OneNoteScroll/oneNoteMainViewCtl.h: -------------------------------------------------------------------------------- 1 | // 2 | // testViewCtl.h 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/11. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "QMBTabViewController.h" 11 | 12 | 13 | //#import "Controller/ONTabViewCtl/ONTabViewCtl.h" 14 | 15 | 16 | @interface oneNoteMainViewCtl : QMBTabViewController 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /OneNoteScroll/Images.xcassets/1ios8 47.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "1ios8 47.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /OneNoteScroll/Images.xcassets/desktop.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "desktop.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /OneNoteScroll/Controller/docPreviewCtl.h: -------------------------------------------------------------------------------- 1 | // 2 | // docPreviewCtl.h 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/19. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /** 12 | * 文档预览控制器,实现多标签切换时,文档预览界面得到正常响应 13 | */ 14 | @interface docPreviewCtl : UITableViewController 15 | 16 | @property(nonatomic , assign) NSUInteger nsPage; 17 | - (void) createTableContent; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /OneNoteScroll.xcodeproj/project.xcworkspace/xcuserdata/northtower.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /OneNoteScroll/Views/DocContentCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // DocContentCell.h 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/19. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "DocContentModel.h" 12 | 13 | @interface DocContentCell : UITableViewCell 14 | 15 | @property(nonatomic , strong) DocContentModel * currentCell; 16 | 17 | -(void) putDocTitle:(NSString *)nsTitle withContent:(NSString *)nsContent; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /OneNoteScroll/Others/publicSettings.h: -------------------------------------------------------------------------------- 1 | // 2 | // publicSettings.h 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/19. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | 13 | #define separaterColor RGB(200, 199, 204) 14 | 15 | #define screen_width [UIScreen mainScreen].bounds.size.width 16 | #define screen_height [UIScreen mainScreen].bounds.size.height 17 | 18 | 19 | 20 | @interface publicSettings : NSObject 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /OneNoteScroll/Model/DocContentModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // DocContentModel.h 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/19. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DocContentModel : NSObject 12 | 13 | #pragma mark - 属性 14 | @property (nonatomic, strong) NSString * nsDocHead; 15 | @property (nonatomic, strong) NSString * nsDocBody; 16 | 17 | 18 | /** 19 | * 初始化文档正文 20 | * @param oHead 21 | * @param oBody 22 | * 23 | */ 24 | - (DocContentModel *)initDocument:(NSString *)oHead WithBody:(NSString *) oBody; 25 | 26 | 27 | #pragma mark - 静态方法 28 | 29 | + (DocContentModel *)createDocHead:(NSString *)oHead withDocBody:(NSString *)oBody ; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /OneNoteScroll/Model/DocContentModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // DocContentModel.m 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/19. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import "DocContentModel.h" 10 | 11 | @implementation DocContentModel 12 | 13 | 14 | - (DocContentModel *)initDocument:(NSString *)oHead WithBody:(NSString *) oBody{ 15 | 16 | if (self=[super init]) { 17 | self.nsDocHead =oHead; 18 | self.nsDocBody=oBody; 19 | } 20 | return self; 21 | } 22 | 23 | 24 | + (DocContentModel *)createDocHead:(NSString *)oHead withDocBody:(NSString *)oBody { 25 | 26 | DocContentModel * status = [[DocContentModel alloc]initDocument:oHead WithBody:oBody]; 27 | return status; 28 | } 29 | 30 | @end -------------------------------------------------------------------------------- /OneNoteScroll.xcodeproj/xcuserdata/northtower.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | OneNoteScroll.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 42D76D771B6F0ADA00AEDFDF 16 | 17 | primary 18 | 19 | 20 | 42D76D901B6F0ADA00AEDFDF 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /OneNoteScroll/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 | } -------------------------------------------------------------------------------- /OneNoteScrollTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | northtower.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /OneNoteScrollTests/OneNoteScrollTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // OneNoteScrollTests.m 3 | // OneNoteScrollTests 4 | // 5 | // Created by 北塔 on 15/8/3. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface OneNoteScrollTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation OneNoteScrollTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /OneNoteScroll/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /OneNoteScroll/Others/QMBTabs/QMBTab.h: -------------------------------------------------------------------------------- 1 | // 2 | // QMBTab.h 3 | // QMBTabs Demo 4 | // 5 | // Created by Toni Möckel on 29.06.13. 6 | // Copyright (c) 2013 Toni Möckel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "QMBTabsAppearance.h" 12 | 13 | @class QMBTab; 14 | 15 | @protocol QMBTabDelegate 16 | 17 | - (void) didSelectTab:(QMBTab *)tab; 18 | - (void) tab:(QMBTab *)tab didSelectCloseButton:(UIButton *)button; 19 | 20 | @end 21 | 22 | @interface QMBTab : UIView 23 | @property (nonatomic, assign) id delegate; 24 | 25 | @property (nonatomic, assign, setter = setHighlighted:) BOOL highlighted; 26 | @property (nonatomic, assign) CGRect orgFrame; 27 | 28 | @property (nonatomic, weak) UILabel *titleLabel; 29 | @property (nonatomic, weak) UIButton *closeButton; 30 | @property (nonatomic, weak) UIImageView *iconImageView; 31 | 32 | @property (strong, nonatomic) UIColor *innerBackgroundColor; 33 | @property (strong, nonatomic) UIColor *foregroundColor; 34 | 35 | @property (nonatomic, strong) UIColor *highlightColor; 36 | @property (nonatomic, strong) UIColor *normalColor; 37 | 38 | @property (nonatomic, strong) QMBTabsAppearance *appearance; 39 | 40 | @property (nonatomic) BOOL closable; 41 | @property (nonatomic, weak) UIImage *iconImage; 42 | @property (nonatomic, weak) UIImage *iconHighlightedImage; 43 | 44 | 45 | - (void) setHighlighted:(BOOL)highlighted; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /OneNoteScroll/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | northtower.$(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 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIStatusBarHidden 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UIViewControllerBasedStatusBarAppearance 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /OneNoteScroll/Controller/LoginAndRegister/LoginViewCtl.m: -------------------------------------------------------------------------------- 1 | // 2 | // LoginViewCtl.m 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/11. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | 10 | #import "LoginViewCtl.h" 11 | 12 | @interface LoginViewCtl () 13 | @property (strong, nonatomic) IBOutlet UITextField *TFUserName; 14 | @property (strong, nonatomic) IBOutlet UITextField *TFPassword; 15 | @property (strong, nonatomic) IBOutlet UIBarButtonItem *BBCancelButton; 16 | 17 | 18 | @end 19 | 20 | @implementation LoginViewCtl 21 | 22 | - (void)viewDidLoad { 23 | [super viewDidLoad]; 24 | 25 | // Do any additional setup after loading the view. 26 | } 27 | 28 | - (void)didReceiveMemoryWarning { 29 | [super didReceiveMemoryWarning]; 30 | // Dispose of any resources that can be recreated. 31 | } 32 | 33 | - (IBAction)loginAction:(UIButton *)sender { 34 | 35 | UIStoryboard *storyboard = self.storyboard; 36 | UIViewController * svc; 37 | svc =[storyboard instantiateViewControllerWithIdentifier:@"SBID_OneNoteMain"]; 38 | // [self.navigationController pushViewController:svc animated:YES]; 39 | [self presentModalViewController:svc animated:YES]; 40 | 41 | } 42 | 43 | /* 44 | #pragma mark - Navigation 45 | 46 | // In a storyboard-based application, you will often want to do a little preparation before navigation 47 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 48 | // Get the new view controller using [segue destinationViewController]. 49 | // Pass the selected object to the new view controller. 50 | } 51 | */ 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /OneNoteScroll/Others/QMBTabs/QMBTabBar.h: -------------------------------------------------------------------------------- 1 | // 2 | // QMBTabBar.h 3 | // QMBTabs Demo 4 | // 5 | // Created by Toni Möckel on 29.06.13. 6 | // Copyright (c) 2013 Toni Möckel. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "QMBTab.h" 11 | #import "QMBTabsAppearance.h" 12 | 13 | @class QMBTabBar; 14 | 15 | @protocol QMBTabBarDelegate 16 | 17 | - (void) tabBar:(QMBTabBar *)tabBar didChangeTabItem:(QMBTab *)tab; 18 | 19 | - (void) tabBar:(QMBTabBar *)tabBar willRemoveTabItem:(QMBTab *)tab; 20 | - (void) tabBar:(QMBTabBar *)tabBar didRemoveTabItem:(QMBTab *)tab; 21 | 22 | @end 23 | 24 | @interface QMBTabBar : UIScrollView 25 | 26 | @property (nonatomic, assign) id tabBarDelegeate; 27 | @property (nonatomic, strong, readonly) NSMutableArray *items; 28 | @property (nonatomic, strong) UIColor *highlightColor; 29 | @property (nonatomic, strong) UIColor *normalColor; 30 | @property (nonatomic, strong) QMBTabsAppearance *appearance; 31 | 32 | /* 33 | * > 0.0 stacks : tabs to the right, at the end of the last tab 34 | * 35 | * < 0.0 stacks : tabs to the left, on the right side of the last tab 36 | * 37 | * Default is 2.0, which looks nice on iPhone non-retina and iPad retina 38 | * 39 | */ 40 | @property (nonatomic) CGFloat stackedTabOffset; 41 | 42 | - (void) addTabItemWithCompletition:(void (^)(QMBTab *tabItem))completition; 43 | - (void) selectTab:(QMBTab *)tab; 44 | - (void) removeTabItem:(QMBTab *)tab; 45 | 46 | - (NSUInteger) indexForTabItem:(QMBTab *)tabItem; 47 | - (QMBTab *) tabItemForIndex:(int)index; 48 | - (void) rearrangeTabs; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /OneNoteScroll/Views/DocContentCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // DocContentCell.m 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/19. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import "DocContentCell.h" 10 | #import "publicSettings.h" 11 | 12 | @implementation DocContentCell{ 13 | 14 | UILabel * _titleLabel; 15 | UILabel * _bodyLabel; 16 | } 17 | 18 | - (void)awakeFromNib { 19 | // Initialization code 20 | } 21 | 22 | -(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ 23 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 24 | 25 | _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 2, screen_width - 25, 20)]; 26 | // _titleLabel.font = [UIFont systemFontOfSize:15]; 27 | [_titleLabel setFont:[UIFont fontWithName:@"Helvetica-Bold" size:15]]; 28 | [self addSubview:_titleLabel]; 29 | 30 | _bodyLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 22, screen_width - 25, 40)]; 31 | _bodyLabel.font = [UIFont systemFontOfSize:15]; 32 | //自动折行设置 33 | _bodyLabel.lineBreakMode = UILineBreakModeTailTruncation; 34 | _bodyLabel.numberOfLines = 2; 35 | 36 | [self addSubview:_bodyLabel]; 37 | 38 | 39 | return self; 40 | } 41 | 42 | -(void) putDocTitle:(NSString *)nsTitle withContent:(NSString *)nsContent{ 43 | 44 | _titleLabel.text = nsTitle; 45 | _bodyLabel.text = nsContent; 46 | } 47 | 48 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 49 | [super setSelected:selected animated:animated]; 50 | 51 | // Configure the view for the selected state 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /OneNoteScroll/Others/QMBTabs/QMBTabsAppearance.h: -------------------------------------------------------------------------------- 1 | // 2 | // QMBTabsAppearance.h 3 | // VSM 4 | // 5 | // Created by Toni Möckel on 03.07.13. 6 | // Copyright (c) 2013 DREEBIT GmbH. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface QMBTabsAppearance : NSObject 12 | 13 | //Tabs 14 | @property (nonatomic,strong) UIColor *tabLabelColorDisabled; 15 | @property (nonatomic,strong) UIColor *tabLabelColorEnabled; 16 | @property (nonatomic,strong) UIColor *tabLabelColorHighlighted; 17 | 18 | @property (nonatomic,strong) UIFont *tabLabelFontDisabled; 19 | @property (nonatomic,strong) UIFont *tabLabelFontEnabled; 20 | @property (nonatomic,strong) UIFont *tabLabelFontHighlighted; 21 | 22 | @property (nonatomic) NSTextAlignment tabLabelAlignment; 23 | 24 | @property (nonatomic,strong) UIColor *tabBackgroundColorEnabled; 25 | @property (nonatomic,strong) UIColor *tabBackgroundColorHighlighted; // = tabBarHighlightColor 26 | @property (nonatomic,strong) UIColor *tabBackgroundColorDisabled; 27 | 28 | @property (nonatomic,strong) UIImage *tabCloseButtonImage; 29 | @property (nonatomic,strong) UIImage *tabCloseButtonHighlightedImage; 30 | 31 | @property (nonatomic, weak) UIImage *tabDefaultIconImage; 32 | @property (nonatomic, weak) UIImage *tabDefaultIconHighlightedImage; 33 | 34 | @property (nonatomic) CGFloat tabShadowWidthOffset; 35 | @property (nonatomic) CGFloat tabShadowHeightOffset; 36 | @property (nonatomic) CGFloat tabShadowBlur; 37 | @property (nonatomic,strong) UIColor *tabShadowColor; 38 | 39 | @property (nonatomic) CGFloat tabSideOffset; 40 | @property (nonatomic) CGFloat tabTopOffset; 41 | @property (nonatomic) CGFloat tabCurvature; 42 | 43 | @property (nonatomic,strong) UIColor *tabStrokeColorEnabled; 44 | @property (nonatomic,strong) UIColor *tabStrokeColorDisabled; 45 | @property (nonatomic,strong) UIColor *tabStrokeColorHighlighted; // = tabBarStrokeHighlightColor 46 | 47 | //TabBar 48 | @property (nonatomic,strong) UIColor *tabBarBackgroundColor; 49 | @property (nonatomic,strong) UIColor *tabBarHighlightColor; 50 | @property (nonatomic,strong) UIColor *tabBarStrokeHighlightColor; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /OneNoteScroll/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/3. 6 | // Copyright (c) 2015年 northtower. 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 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ##OneNote 的一种模拟方法 2 | 3 | ####简介 4 | 5 | OneNote用了一段时间,度过最开始的蜜月期之后,在审视自己对知识管理软件所期盼的同时,开始着手模仿OneNote iosApp的实现。 6 | 7 | 如果从可见场景的角度来分析,会发现她没几个页面。既然这样,就从门槛低的这条道出发,照猫画虎,描一下oneNote是如何从代码走到产品的! 8 | 9 | 我欣赏OneNote,喜欢随处写入、像纸一样为所欲为、毫无拘束的特点。我尝试通过技术如何把它变成现实,但在此之前,我们应该把该有的功能搭建好。 10 | 11 | 在这个系列中,预计分三部完成整个内容。 12 | 13 | #####章节目录: 14 | 15 | * OneNote的一种模拟方法(上):iOS主界面,标签栏与正文摘要; 16 | * OneNote的一种模拟方法(中):侧滑多笔记本切换; 17 | * OneNote的一种模拟方法(下):浅析文档模型,从图文混编开始。 18 | 19 | 20 | ![oneNoteDemo_v1](http://upload-images.jianshu.io/upload_images/238151-2034e93c2073a278.gif?imageMogr2/auto-orient/strip) 21 | 22 | ####第一、起底OneNote,从欢迎页开始 23 | 24 | 25 | ![oneNote欢迎页2](http://upload-images.jianshu.io/upload_images/238151-51255ccc08b5862e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 26 | 27 | 欢迎页如图所示,实现这部分需要注意两点: 28 | 29 | * 页面布局顶部"Office"标签与Scroll结合,详见startPageViewCtl类。 30 | * 登录页按钮并非iOS标准控件,使用占位button进行跳转。 31 | 32 | 33 | UIButton*bLoginBtn = [UIButtonbuttonWithType:UIButtonTypeCustom]; 34 | bLoginBtn.frame =CGRectMake(oSize.width * 2, SCREEN_HEIGHT / 1.96, SCREEN_WIDTH, 50); 35 | 36 | ####第二、主界面:标签栏让正文选取更便利 37 | 38 | ![noeNote主界面](http://upload-images.jianshu.io/upload_images/238151-a9613da4c87c1f6a.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 39 | 40 | 41 | oneNote主界面由两部分组成:标签页和表视图。标签页实现了多笔记的选取与切换,而表视图实现笔记内文章的预览。 42 | 43 | 标签栏的使用,可以方便地实现多笔记本之间的切换,但其局限性在于当笔记本个数过多或者笔记名称过长,标签栏用起来就不那么友好了! 44 | 45 | 模拟多标签栏的实现基础在于单标签页(QMBTab)与标签组(QMBTabBar)的定义。单标签侧重于自身的创建与渲染,单标签的属性多,但事件少。单标签的行为都交由标签组管理,比如创建AddTabItem、选中SelectTab和删除RemoveTab等行为,还包括此类行为的代理didChange、willRemove、didRemove等。 46 | 47 | 说句题外话,记得北塔在看早期Firefox源码时,曾惊叹Firefox的顶部标签栏设计。这得是吃了多少碗卤煮火烧才憋出这么亮骚产品!Firefox的顶层标签也有一个标签控制管理器,所以说,只要你留心观察,现在流行的技术你都能在若干年前看到她的影子。 48 | 49 | 我们继续模拟oneNote的主页面。标签栏创建成功后,添加笔记摘要TableView。注意: 50 | 51 | * DocContentModel 52 | * docPreviewCtl 53 | 54 | 55 | ######代码 : [github.com/northtower](https://github.com/northtower/OneNoteScroll) 56 | > 代码中我尽量做到应有的注释,本身没什么难点,如果有问题,您可以给我回复。 57 | 58 | ####小结 59 | 60 | 用了一段时间OneNote,准确地说一个多月吧。虽然也发现很多不如意的地方,但不可否认这是一款杰出的产品。有人说MSOffice 2016 for Mac是微软的良心之作!良心还是狼心咱就不跟风了,我喜欢oneNote是她真能解决我需求,随处修订与页层次主题是我最需要的功能。 61 | 62 | 这个demo做到现在才刚刚起步,模仿是为了换个角度了解它。学习的基础是理解,理解的基础是感受。只有你真正看清你要的是什么,你才能把它做出来。 63 | 64 | 65 | -------------------------------------------------------------------------------- /OneNoteScroll/Others/QMBTabs/QMBTabsAppearance.m: -------------------------------------------------------------------------------- 1 | // 2 | // QMBTabsAppearance.m 3 | // VSM 4 | // 5 | // Created by Toni Möckel on 03.07.13. 6 | // Copyright (c) 2013 DREEBIT GmbH. All rights reserved. 7 | // 8 | 9 | #import "QMBTabsAppearance.h" 10 | 11 | @implementation QMBTabsAppearance 12 | 13 | - (QMBTabsAppearance *)init { 14 | self = [super init]; 15 | if (self) { 16 | [self setDefaults]; 17 | } 18 | 19 | return self; 20 | } 21 | 22 | - (void)setDefaults { 23 | _tabLabelColorDisabled = [UIColor lightGrayColor]; 24 | _tabLabelColorEnabled = [UIColor darkGrayColor]; 25 | _tabLabelColorHighlighted = [UIColor whiteColor]; 26 | 27 | _tabLabelFontDisabled = [UIFont systemFontOfSize:10.0f]; 28 | _tabLabelFontEnabled = [UIFont systemFontOfSize:10.0f]; 29 | _tabLabelFontHighlighted = [UIFont systemFontOfSize:14.0f]; 30 | 31 | _tabLabelAlignment = NSTextAlignmentCenter; 32 | 33 | _tabBarBackgroundColor = [UIColor colorWithRed:.9 green:.9 blue:1 alpha:1]; 34 | 35 | _tabBackgroundColorEnabled = [UIColor colorWithWhite:0.8f alpha:1.0f]; 36 | _tabBackgroundColorHighlighted = [UIColor colorWithWhite:0.6f alpha:1.0f]; 37 | _tabBackgroundColorDisabled = [UIColor colorWithWhite:0.8f alpha:0.7f]; 38 | 39 | _tabCloseButtonImage = [UIImage imageNamed:@"QMBTabViewCloseButton"]; 40 | _tabCloseButtonHighlightedImage = [UIImage imageNamed:@"QMBTabViewCloseButtonHighlighted"]; 41 | 42 | _tabDefaultIconImage = nil; 43 | _tabDefaultIconHighlightedImage = nil; 44 | 45 | _tabShadowWidthOffset = 0.0f; 46 | _tabShadowHeightOffset = 0.0f; 47 | _tabShadowBlur = 3.0f; 48 | _tabShadowColor = [UIColor colorWithWhite:0.2f alpha:0.3f]; 49 | 50 | _tabSideOffset = 0.0f; 51 | _tabTopOffset = 5.0f; 52 | _tabCurvature = 30.0f; 53 | 54 | _tabStrokeColorEnabled = [UIColor colorWithWhite:0.5f alpha:1.0f]; 55 | _tabStrokeColorDisabled = [UIColor colorWithWhite:0.3f alpha:1.0f]; 56 | _tabStrokeColorHighlighted = [UIColor colorWithWhite:0.6f alpha:1.0f]; 57 | 58 | _tabBarBackgroundColor = [UIColor colorWithWhite:0.95f alpha:1.0f]; 59 | _tabBarHighlightColor = _tabBackgroundColorHighlighted; 60 | _tabBarStrokeHighlightColor = _tabStrokeColorHighlighted; 61 | 62 | } 63 | 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /OneNoteScroll/Others/QMBTabs/QMBTabViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // QMBTabViewController.h 3 | // QMBTabs Demo 4 | // 5 | // Created by Toni Möckel on 29.06.13. 6 | // Copyright (c) 2013 Toni Möckel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "QMBTabBar.h" 12 | #import "QMBTabsAppearance.h" 13 | 14 | @class QMBTabViewController; 15 | 16 | @protocol QMBTabViewControllerDelegate 17 | 18 | 19 | @optional 20 | - (QMBTabsAppearance *) tabViewControllerNeedsAppearance:(QMBTabViewController *)tabViewController; 21 | // Controller's title will be shown in tabs by default. Use this method to set the title on your own. 22 | - (NSString *) tabViewController:(QMBTabViewController *)tabViewController titleForTabAtIndex:(NSUInteger)index; 23 | 24 | // If false is returned to tab view won't change to the target view controller (By default = yes) 25 | - (BOOL)tabViewController:(QMBTabViewController *)tabViewController shouldSelectViewController:(UIViewController *)viewController; 26 | - (void)tabViewController:(QMBTabViewController *)tabViewController didSelectViewController:(UIViewController *)viewController; 27 | 28 | - (void)tabViewController:(QMBTabViewController *)tabViewController willAddViewController:(UIViewController *)viewController; 29 | - (void)tabViewController:(QMBTabViewController *)tabViewController didAddViewController:(UIViewController *)viewController; 30 | 31 | - (void)tabViewController:(QMBTabViewController *)tabViewController willRemoveViewController:(UIViewController *)viewController; 32 | - (void)tabViewController:(QMBTabViewController *)tabViewController didRemoveViewController:(UIViewController *)viewController; 33 | 34 | @end 35 | 36 | @interface QMBTabViewController : UIViewController 37 | 38 | @property(nonatomic,strong, readonly) NSMutableArray *viewControllers; 39 | 40 | @property (nonatomic, strong) QMBTabsAppearance *appearance; 41 | 42 | @property(nonatomic,assign) UIViewController *selectedViewController; 43 | 44 | @property(nonatomic,strong, readonly) QMBTabBar *tabBar; 45 | //top offset to rearrange the tabBar below the statusbar, by default its set to the status bar height (set it to 0) for fullsize 46 | @property float tabBarTopOffset; 47 | 48 | @property(nonatomic,assign) id delegate; 49 | 50 | 51 | - (void)addViewController:(UIViewController *)controller; 52 | - (void)addViewController:(UIViewController *)controller withCompletion:(void (^)(QMBTab *tabItem))completition; 53 | - (void)removeViewController:(UIViewController *)controller; 54 | - (void)selectViewController:(UIViewController *)controller; 55 | - (NSUInteger) indexForViewController:(UIViewController *)viewcontroller; 56 | - (QMBTabsAppearance *) getDefaultAppearance; 57 | 58 | @end 59 | 60 | // category on UIViewController to access QMBTabViewController from an item - like UINavigationController 61 | @interface UIViewController (QMBTabViewController) 62 | 63 | - (QMBTabViewController*)tabViewController; 64 | 65 | @end 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /OneNoteScroll/oneNoteMainViewCtl.m: -------------------------------------------------------------------------------- 1 | // 2 | // testViewCtl.m 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/11. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import "oneNoteMainViewCtl.h" 10 | #import "publicSettings.h" 11 | #import "docPreviewCtl.h" 12 | 13 | 14 | @interface oneNoteMainViewCtl (){ 15 | 16 | QMBTabViewController * oTabViewCtl; 17 | 18 | //正文数据 19 | NSMutableArray *_dataSourceArray; 20 | 21 | docPreviewCtl * DocPreviewCtl; 22 | 23 | } 24 | 25 | @property (nonatomic, strong) UIView *contentView; 26 | @property (strong, nonatomic) IBOutlet UITableView *tableView; 27 | 28 | 29 | @end 30 | 31 | @implementation oneNoteMainViewCtl 32 | 33 | 34 | - (void) initData{ 35 | 36 | _dataSourceArray = [[NSMutableArray alloc] init]; 37 | 38 | } 39 | 40 | - (void) initTableView{ 41 | 42 | DocPreviewCtl = [[docPreviewCtl alloc]init]; 43 | [DocPreviewCtl createTableContent]; 44 | self.tableView.dataSource = DocPreviewCtl; 45 | self.tableView.delegate = DocPreviewCtl; 46 | self.tableView.tableFooterView = [[UIView alloc]init]; 47 | 48 | } 49 | 50 | - (QMBTabsAppearance *)getDefaultAppearance 51 | { 52 | QMBTabsAppearance *appearance = [[QMBTabsAppearance alloc] init];; 53 | 54 | [appearance setTabBackgroundColorHighlighted:[UIColor colorWithRed:242.0f/255.0f green:140.0f/255.0f blue:19.0f/255.0f alpha:1.0f]]; 55 | // [appearance setTabBackgroundColorEnabled:[UIColor redColor]]; 56 | 57 | [appearance setTabBarHighlightColor:[UIColor colorWithRed:242.0f/255.0f green:140.0f/255.0f blue:19.0f/255.0f alpha:1.0f]]; 58 | [appearance setTabBarStrokeHighlightColor:[UIColor colorWithRed:142.0f/255.0f green:90.0f/255.0f blue:19.0f/255.0f alpha:1.0f]]; 59 | 60 | [appearance setTabDefaultIconHighlightedImage:nil]; 61 | [appearance setTabDefaultIconImage:nil]; 62 | 63 | [appearance setTabLabelColorHighlighted:[UIColor whiteColor]]; 64 | [appearance setTabLabelColorEnabled:[UIColor blackColor]]; 65 | [appearance setTabLabelFontHighlighted:[UIFont fontWithName:@"Georgia-Italic" size:16.0]]; 66 | 67 | 68 | return appearance; 69 | } 70 | 71 | 72 | 73 | - (void)viewDidLoad { 74 | [super viewDidLoad]; 75 | 76 | self.delegate = self; 77 | 78 | 79 | for (int i = 0; i<3; i++) { 80 | UIViewController *viewController = [[UIViewController alloc]init]; 81 | [self addViewController:viewController withCompletion:^(QMBTab *tabItem) { 82 | tabItem.titleLabel.text = [NSString stringWithFormat:@"%d月", i]; 83 | 84 | }]; 85 | } 86 | 87 | [self initTableView]; 88 | 89 | } 90 | 91 | 92 | 93 | - (void)didReceiveMemoryWarning { 94 | [super didReceiveMemoryWarning]; 95 | // Dispose of any resources that can be recreated. 96 | } 97 | 98 | 99 | 100 | - (void)tabViewController:(QMBTabViewController *)tabViewController didSelectViewController:(UIViewController *)viewController 101 | { 102 | // NSLog(@"Tab Changed to %d", [tabViewController indexForViewController:viewController]); 103 | NSUInteger tabIndex = [tabViewController indexForViewController:viewController]; 104 | NSLog(@"Tab Changed to %lu", (unsigned long)tabIndex); 105 | DocPreviewCtl.nsPage = tabIndex; 106 | [self.tableView reloadData]; 107 | 108 | // QMBTab *tab = (QMBTab*)self.tabBar.items[tabIndex]; 109 | 110 | } 111 | 112 | 113 | 114 | @end 115 | -------------------------------------------------------------------------------- /OneNoteScroll/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "1ios8 55.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "orientation" : "landscape", 14 | "idiom" : "iphone", 15 | "extent" : "full-screen", 16 | "minimum-system-version" : "8.0", 17 | "subtype" : "736h", 18 | "scale" : "3x" 19 | }, 20 | { 21 | "extent" : "full-screen", 22 | "idiom" : "iphone", 23 | "subtype" : "667h", 24 | "filename" : "1ios8 47.png", 25 | "minimum-system-version" : "8.0", 26 | "orientation" : "portrait", 27 | "scale" : "2x" 28 | }, 29 | { 30 | "orientation" : "portrait", 31 | "idiom" : "iphone", 32 | "extent" : "full-screen", 33 | "minimum-system-version" : "7.0", 34 | "filename" : "1.png", 35 | "scale" : "2x" 36 | }, 37 | { 38 | "extent" : "full-screen", 39 | "idiom" : "iphone", 40 | "subtype" : "retina4", 41 | "filename" : "1副本.png", 42 | "minimum-system-version" : "7.0", 43 | "orientation" : "portrait", 44 | "scale" : "2x" 45 | }, 46 | { 47 | "orientation" : "portrait", 48 | "idiom" : "ipad", 49 | "extent" : "full-screen", 50 | "minimum-system-version" : "7.0", 51 | "scale" : "1x" 52 | }, 53 | { 54 | "orientation" : "landscape", 55 | "idiom" : "ipad", 56 | "extent" : "full-screen", 57 | "minimum-system-version" : "7.0", 58 | "scale" : "1x" 59 | }, 60 | { 61 | "orientation" : "portrait", 62 | "idiom" : "ipad", 63 | "extent" : "full-screen", 64 | "minimum-system-version" : "7.0", 65 | "scale" : "2x" 66 | }, 67 | { 68 | "orientation" : "landscape", 69 | "idiom" : "ipad", 70 | "extent" : "full-screen", 71 | "minimum-system-version" : "7.0", 72 | "scale" : "2x" 73 | }, 74 | { 75 | "orientation" : "portrait", 76 | "idiom" : "iphone", 77 | "extent" : "full-screen", 78 | "scale" : "1x" 79 | }, 80 | { 81 | "orientation" : "portrait", 82 | "idiom" : "iphone", 83 | "extent" : "full-screen", 84 | "scale" : "2x" 85 | }, 86 | { 87 | "orientation" : "portrait", 88 | "idiom" : "iphone", 89 | "extent" : "full-screen", 90 | "subtype" : "retina4", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "orientation" : "portrait", 95 | "idiom" : "ipad", 96 | "extent" : "to-status-bar", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "orientation" : "portrait", 101 | "idiom" : "ipad", 102 | "extent" : "full-screen", 103 | "scale" : "1x" 104 | }, 105 | { 106 | "orientation" : "landscape", 107 | "idiom" : "ipad", 108 | "extent" : "to-status-bar", 109 | "scale" : "1x" 110 | }, 111 | { 112 | "orientation" : "landscape", 113 | "idiom" : "ipad", 114 | "extent" : "full-screen", 115 | "scale" : "1x" 116 | }, 117 | { 118 | "orientation" : "portrait", 119 | "idiom" : "ipad", 120 | "extent" : "to-status-bar", 121 | "scale" : "2x" 122 | }, 123 | { 124 | "orientation" : "portrait", 125 | "idiom" : "ipad", 126 | "extent" : "full-screen", 127 | "scale" : "2x" 128 | }, 129 | { 130 | "orientation" : "landscape", 131 | "idiom" : "ipad", 132 | "extent" : "to-status-bar", 133 | "scale" : "2x" 134 | }, 135 | { 136 | "orientation" : "landscape", 137 | "idiom" : "ipad", 138 | "extent" : "full-screen", 139 | "scale" : "2x" 140 | } 141 | ], 142 | "info" : { 143 | "version" : 1, 144 | "author" : "xcode" 145 | } 146 | } -------------------------------------------------------------------------------- /OneNoteScroll/Controller/docPreviewCtl.m: -------------------------------------------------------------------------------- 1 | // 2 | // docPreviewCtl.m 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/19. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import "docPreviewCtl.h" 10 | 11 | #import "DocContentModel.h" 12 | #import "DocContentCell.h" 13 | #import "publicSettings.h" 14 | 15 | 16 | 17 | @interface docPreviewCtl (){ 18 | 19 | //不同文件夹数据模拟 20 | NSMutableArray * _tablePage1; 21 | NSMutableArray * _tablePage2; 22 | NSMutableArray * _tablePage3; 23 | } 24 | 25 | @end 26 | 27 | @implementation docPreviewCtl 28 | 29 | 30 | - (void)viewDidLoad { 31 | [super viewDidLoad]; 32 | [self createTableContent]; 33 | 34 | } 35 | 36 | - (void)didReceiveMemoryWarning { 37 | [super didReceiveMemoryWarning]; 38 | // Dispose of any resources that can be recreated. 39 | } 40 | 41 | 42 | 43 | #pragma mark - UITableViewDataSource 44 | 45 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 46 | 47 | if(_nsPage == 0) 48 | return _tablePage1.count; 49 | else if(_nsPage == 1) 50 | return _tablePage2.count; 51 | else 52 | return 0; 53 | // return 3; 54 | } 55 | 56 | 57 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 58 | return 74; 59 | } 60 | 61 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 62 | 63 | static NSString *cellIndentifier = @"allcourseCell"; 64 | DocContentCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIndentifier]; 65 | if (cell == nil) { 66 | cell = [[DocContentCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIndentifier]; 67 | //下划线 68 | UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(15, 73.5, screen_width - 15, 0.5)]; 69 | lineView.backgroundColor = [UIColor brownColor];//separaterColor; 70 | [cell addSubview:lineView]; 71 | } 72 | 73 | 74 | cell.selectionStyle = UITableViewCellSelectionStyleNone; 75 | 76 | DocContentModel * item; 77 | if(_nsPage == 0) 78 | item = _tablePage1[indexPath.row]; 79 | else if(_nsPage == 1) 80 | item = _tablePage2[indexPath.row]; 81 | 82 | 83 | 84 | [cell putDocTitle:item.nsDocHead withContent:item.nsDocBody]; 85 | return cell; 86 | 87 | } 88 | 89 | 90 | - (void) createTableContent{ 91 | 92 | _tablePage1 = [[NSMutableArray alloc]initWithCapacity:3]; 93 | [_tablePage1 addObject:[DocContentModel createDocHead:@"迈进数据化社会" withDocBody:@"贝尔曾经设想的社会:从产品生产经济渐变为服务性经济;专业与技术人员处于社会的主导地位;理论知识处于社会经济发展的中心地位;"]]; 94 | 95 | [_tablePage1 addObject:[DocContentModel createDocHead:@"《Hallelujah》的故事" withDocBody:@"Hallelujah,哈利路亚,希伯来语,意为“赞美上帝”。德国作曲家亨德尔曾将“哈利路亚”这一主题用作于1742 年的清唱剧《弥赛亚》中第二幕终曲合唱,整曲洋溢着虔诚和赞美之情,表达了对万能上帝的无限歌颂。在现代西方音乐中,也不乏著名歌者以此为题。在众多或祈祷或赞颂的哈利路亚声中"]]; 96 | 97 | [_tablePage1 addObject:[DocContentModel createDocHead:@"我是查理,我也是我自己" withDocBody:@"2015年,新年伊始。1月7日上午,巴黎,三名恐怖袭击者,带着AK47冲锋枪冲进《查理周刊》编辑部,打死十个平民两名巡警,其中包括杂志社主编、身为漫画家的副刊主编,另外两个漫画家,以及来开会的一名经济学家,另有多人受伤。第二天,一名女警察在地铁被枪击死亡。"]]; 98 | 99 | 100 | _tablePage2 = [[NSMutableArray alloc]initWithCapacity:3]; 101 | [_tablePage2 addObject:[DocContentModel createDocHead:@"《极简欧洲史》" withDocBody:@"中国文明灿烂发光与春秋战国时代,那是一个科技突破(铁工具)和知识大量释出的时代,本质上就是周朝诸侯国的一次“全球化”,其结果是秦始皇建立了统一帝国。欧洲的兴盛也是科技突破与知识大量释出(印刷术传入,助长宗教革命)的结果,赋予了帝国主义进行全球化的力量。"]]; 102 | 103 | [_tablePage2 addObject:[DocContentModel createDocHead:@"从希腊说起,讲到日耳曼" withDocBody:@"Hallelujah,哈利路亚,希伯来语,意为“赞美上帝”。德国作曲家亨德尔曾将“哈利路亚”这一主题用作于1742 年的清唱剧《弥赛亚》中第二幕终曲合唱,整曲洋溢着虔诚和赞美之情,表达了对万能上帝的无限歌颂。在现代西方音乐中,也不乏著名歌者以此为题。在众多或祈祷或赞颂的哈利路亚声中"]]; 104 | 105 | [_tablePage2 addObject:[DocContentModel createDocHead:@"从追杀到独尊" withDocBody:@"2015年,新年伊始。1月7日上午,巴黎,三名恐怖袭击者,带着AK47冲锋枪冲进《查理周刊》编辑部,打死十个平民两名巡警,其中包括杂志社主编、身为漫画家的副刊主编,另外两个漫画家,以及来开会的一名经济学家,另有多人受伤。第二天,一名女警察在地铁被枪击死亡。"]]; 106 | 107 | _nsPage = 0; 108 | 109 | } 110 | /* 111 | #pragma mark - Navigation 112 | 113 | // In a storyboard-based application, you will often want to do a little preparation before navigation 114 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 115 | // Get the new view controller using [segue destinationViewController]. 116 | // Pass the selected object to the new view controller. 117 | } 118 | */ 119 | 120 | @end 121 | -------------------------------------------------------------------------------- /OneNoteScroll.xcodeproj/xcuserdata/northtower.xcuserdatad/xcschemes/OneNoteScroll.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /OneNoteScroll/startPageViewCtl.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // OneNoteScroll 4 | // 5 | // Created by 北塔 on 15/8/3. 6 | // Copyright (c) 2015年 northtower. All rights reserved. 7 | // 8 | 9 | #import "startPageViewCtl.h" 10 | #import "Controller/LoginAndRegister/LoginViewCtl.h" 11 | 12 | 13 | #define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width 14 | #define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height 15 | 16 | @interface startPageViewCtl (){ 17 | 18 | UIPageControl *_pageControl; 19 | NSInteger _nsICurrentPage; 20 | 21 | } 22 | 23 | @property (strong, nonatomic) IBOutlet UIScrollView *StartPageScroll; 24 | @property (strong, nonatomic) IBOutlet UIImageView *HeadImageView; 25 | 26 | @end 27 | 28 | 29 | @implementation startPageViewCtl 30 | 31 | 32 | -(void) addPageController{ 33 | 34 | _pageControl=[[UIPageControl alloc]init]; 35 | //注意此方法可以根据页数返回UIPageControl合适的大小 36 | CGSize size= [_pageControl sizeForNumberOfPages:3]; 37 | _pageControl.bounds=CGRectMake(0, 0, size.width, size.height); 38 | // _pageControl.center=CGPointMake(160, 500); 39 | _pageControl.center=CGPointMake(SCREEN_WIDTH / 2, SCREEN_HEIGHT - 50); 40 | 41 | _pageControl.pageIndicatorTintColor=[UIColor colorWithRed:193/255.0 green:219/255.0 blue:249/255.0 alpha:1]; 42 | 43 | //设置当前页颜色 44 | _pageControl.currentPageIndicatorTintColor=[UIColor colorWithRed:0 green:150/255.0 blue:1 alpha:1]; 45 | //设置总页数 46 | _pageControl.numberOfPages=3; 47 | _nsICurrentPage = 0; 48 | 49 | [self.view addSubview:_pageControl]; 50 | 51 | 52 | } 53 | 54 | - (void) addCustomButton{ 55 | 56 | 57 | } 58 | //overstudy 59 | -(void)addScrollView{ 60 | 61 | CGSize oSize = [UIScreen mainScreen].applicationFrame.size; 62 | oSize.height -= 80; 63 | // oSize.width += 8; 64 | 65 | _StartPageScroll.delegate = self; 66 | _StartPageScroll.contentInset = UIEdgeInsetsMake(0, 0, 0, 0); 67 | _StartPageScroll.contentSize = CGSizeMake(3 * oSize.width, oSize.height); 68 | [_StartPageScroll setContentOffset:CGPointMake(0, 0) animated:NO]; 69 | _StartPageScroll.showsHorizontalScrollIndicator=NO; 70 | _StartPageScroll.pagingEnabled=YES; 71 | 72 | UIImageView * oImage = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, oSize.width, oSize.height)]; 73 | oImage.contentMode=UIViewContentModeScaleAspectFill; 74 | oImage.image = [UIImage imageNamed:@"061"]; 75 | [_StartPageScroll addSubview:oImage]; 76 | 77 | oImage = [[UIImageView alloc]initWithFrame:CGRectMake(oSize.width, 0, oSize.width, oSize.height)]; 78 | oImage.contentMode=UIViewContentModeScaleAspectFill; 79 | oImage.image = [UIImage imageNamed:@"062"]; 80 | [_StartPageScroll addSubview:oImage]; 81 | 82 | oImage = [[UIImageView alloc]initWithFrame:CGRectMake(oSize.width * 2, 0, oSize.width, oSize.height)]; 83 | oImage.contentMode=UIViewContentModeScaleAspectFill; 84 | oImage.image = [UIImage imageNamed:@"063"]; 85 | [_StartPageScroll addSubview:oImage]; 86 | 87 | //注册与登陆按钮 注意在多尺寸设备中,按钮的位置要与图标一致 88 | UIButton *bLoginBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 89 | 90 | NSLog(@"%f" , SCREEN_HEIGHT / 1.96); 91 | bLoginBtn.frame = CGRectMake(oSize.width * 2, SCREEN_HEIGHT / 1.96, SCREEN_WIDTH, 50); 92 | bLoginBtn.backgroundColor = [UIColor clearColor]; 93 | // nameBtn.backgroundColor = [UIColor clearColor]; 94 | [bLoginBtn addTarget:self action:@selector(userLoginView) forControlEvents:UIControlEventTouchUpInside]; 95 | [_StartPageScroll addSubview:bLoginBtn]; 96 | 97 | UIButton *bRegisterBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 98 | bRegisterBtn.frame = CGRectMake(oSize.width * 2, SCREEN_HEIGHT / 1.96 + 50, SCREEN_WIDTH, 50); 99 | bRegisterBtn.backgroundColor = [UIColor clearColor]; 100 | // nameBtn.backgroundColor = [UIColor clearColor]; 101 | [bRegisterBtn addTarget:self action:@selector(userRegisterView) forControlEvents:UIControlEventTouchUpInside]; 102 | [_StartPageScroll addSubview:bRegisterBtn]; 103 | 104 | 105 | /* 106 | UIView * oView = [[UIView alloc]initWithFrame:CGRectMake(oSize.width * 2, 0, oSize.width, oSize.height)]; 107 | oView.contentMode = UIViewContentModeScaleAspectFill; 108 | oView.backgroundColor = [UIColor colorWithRed:166/255.0 green:16/255.0 blue:224/255.0 alpha:1]; 109 | 110 | //添加字符信息 111 | UILabel *pageLabel = [[UILabel alloc] initWithFrame:CGRectMake(60, 300, 240, 80)]; 112 | pageLabel.text = @"记下笔记,更新购物单并检查待办事项"; 113 | pageLabel.textColor = [UIColor whiteColor]; 114 | pageLabel.font = [UIFont fontWithName:@"Georgia-Italic" size:20.0]; 115 | pageLabel.textAlignment = NSTextAlignmentCenter; 116 | [oView addSubview:pageLabel]; 117 | 118 | [_StartPageScroll addSubview:oView]; 119 | 120 | */ 121 | } 122 | -(void) addButtonClicked{ 123 | 124 | 125 | } 126 | 127 | - (void) userLoginView{ 128 | 129 | 130 | UIStoryboard * storyboard = self.storyboard; 131 | LoginViewCtl * svc = [storyboard instantiateViewControllerWithIdentifier:@"SB_LoginView"]; 132 | 133 | [svc setModalTransitionStyle:2]; 134 | [svc setModalPresentationStyle:UIModalPresentationCurrentContext]; 135 | 136 | [self presentViewController:svc animated:YES completion:nil]; 137 | 138 | 139 | // LoginViewCtl *jzSpeechVC = [[LoginViewCtl alloc] init]; 140 | // [self.navigationController pushViewController:jzSpeechVC animated:YES]; 141 | 142 | } 143 | 144 | - (void) userRegisterView{ 145 | 146 | 147 | } 148 | 149 | - (void)viewDidLoad { 150 | [super viewDidLoad]; 151 | [self addScrollView]; 152 | [self addPageController]; 153 | [self addCustomButton]; 154 | // Do any additional setup after loading the view, typically from a nib. 155 | } 156 | 157 | - (void)didReceiveMemoryWarning { 158 | [super didReceiveMemoryWarning]; 159 | // Dispose of any resources that can be recreated. 160 | } 161 | 162 | #pragma mark 滚动停止事件 163 | -(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{ 164 | 165 | 166 | CGPoint offset=[scrollView contentOffset]; 167 | NSLog(@"scrollViewDidEndDecelerating : X=%f" , offset.x); 168 | 169 | if(offset.x > _nsICurrentPage * SCREEN_WIDTH){ 170 | //向右 171 | _nsICurrentPage += 1; 172 | } 173 | else 174 | _nsICurrentPage -= 1; 175 | 176 | //移动到中间 177 | // [_StartPageScroll setContentOffset:CGPointMake(SCREEN_WIDTH, 0) animated:NO]; 178 | //设置分页 179 | _pageControl.currentPage=_nsICurrentPage; 180 | 181 | 182 | } 183 | 184 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView{ 185 | 186 | // NSLog(@"scrollViewDidScroll"); 187 | } 188 | 189 | @end 190 | -------------------------------------------------------------------------------- /OneNoteScroll/Others/QMBTabs/QMBTabBar.m: -------------------------------------------------------------------------------- 1 | // 2 | // QMBTabBar.m 3 | // QMBTabs Demo 4 | // 5 | // Created by Toni Möckel on 29.06.13. 6 | // Copyright (c) 2013 Toni Möckel. All rights reserved. 7 | // 8 | 9 | #import "QMBTabBar.h" 10 | 11 | @interface QMBTabBar (){ 12 | int _activeTabIndex; 13 | float firstX, firstY, prevX, currentTabItemWidth; 14 | } 15 | 16 | @property (nonatomic, strong) UIView *highlightBar; 17 | @property (nonatomic, strong) QMBTab *selectedTab; 18 | @end 19 | 20 | static float qmbMaxTabWidth = 320.0f; 21 | static float qmbMinTabWidth = 100.0f; 22 | static float highlightBarHeight = 5.0f; 23 | 24 | @implementation QMBTabBar 25 | 26 | - (id)initWithFrame:(CGRect)frame 27 | { 28 | self = [super initWithFrame:frame]; 29 | if (self) { 30 | self.delegate = self; 31 | 32 | _items = [NSMutableArray array]; 33 | _stackedTabOffset = 2.0; 34 | _activeTabIndex = 0; 35 | 36 | currentTabItemWidth = qmbMaxTabWidth; 37 | 38 | [self setShowsHorizontalScrollIndicator:NO]; 39 | [self setShowsVerticalScrollIndicator:NO]; 40 | [self setAlwaysBounceHorizontal:YES]; 41 | [self setClipsToBounds:NO]; 42 | 43 | } 44 | return self; 45 | } 46 | 47 | 48 | 49 | 50 | - (void) addTabItemWithCompletition:(void (^)(QMBTab *tabItem))completition 51 | { 52 | 53 | 54 | QMBTab *tabItem = [[QMBTab alloc] initWithFrame:CGRectMake([_items count] * currentTabItemWidth, 0, 0, self.frame.size.height-highlightBarHeight)]; 55 | [tabItem setAppearance:self.appearance]; 56 | 57 | tabItem.titleLabel.text = NSLocalizedString(@"New tab", @"QMBTabBar New Tab Title"); 58 | [tabItem setDelegate:self]; 59 | 60 | if(completition != nil) { 61 | completition(tabItem); 62 | } 63 | 64 | [_items addObject:tabItem]; 65 | 66 | [self addSubview:tabItem]; 67 | 68 | 69 | [UIView animateWithDuration:0.5 70 | delay:0.0 71 | options:UIViewAnimationOptionCurveEaseOut 72 | animations:^{ 73 | [self rearrangeTabs]; 74 | } 75 | completion:^(BOOL finished){ 76 | 77 | }]; 78 | 79 | } 80 | 81 | - (void) rearrangeTabs 82 | { 83 | 84 | currentTabItemWidth = qmbMaxTabWidth; 85 | 86 | int i = 0; 87 | float inset = 15.0; 88 | 89 | if (((currentTabItemWidth * [_items count]) - (inset * [_items count])) > self.frame.size.width){ 90 | currentTabItemWidth = self.frame.size.width / ([_items count]); 91 | if (currentTabItemWidth < qmbMinTabWidth){ 92 | currentTabItemWidth = qmbMinTabWidth; 93 | } 94 | } 95 | 96 | [self setContentSize:CGSizeMake([_items count] * currentTabItemWidth - [_items count]*inset, self.frame.size.height)]; 97 | 98 | for (QMBTab *tab in _items) { 99 | 100 | float newXPostion = i * (currentTabItemWidth - inset); 101 | CGRect frame = CGRectMake(newXPostion, 102 | tab.frame.origin.y, 103 | currentTabItemWidth, 104 | tab.frame.size.height); 105 | 106 | [tab setOrgFrame:frame]; 107 | frame.origin.x = [self calcXPostionOfTab:tab withIndex:i withTabCount:_items.count]; 108 | [tab setFrame:frame]; 109 | 110 | [tab setNeedsDisplay]; 111 | [tab layoutSubviews]; 112 | i++; 113 | } 114 | 115 | [self bringSubviewToFront:_highlightBar]; 116 | [self bringSubviewToFront:_selectedTab]; 117 | 118 | 119 | } 120 | 121 | - (NSUInteger) indexForTabItem:(QMBTab *)tabItem 122 | { 123 | int i = 0; 124 | for (QMBTab *tab in _items) { 125 | if (tabItem == tab){ 126 | return i; 127 | } 128 | i++; 129 | } 130 | 131 | return -1; 132 | } 133 | 134 | - (QMBTab *)tabItemForIndex:(int)index 135 | { 136 | return [_items objectAtIndex:index]; 137 | } 138 | 139 | #pragma mark - ScrollView Delegate 140 | 141 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView{ 142 | 143 | 144 | int index = 0; 145 | for (QMBTab *tab in _items) { 146 | 147 | CGRect frame = tab.frame; 148 | frame.origin.x = [self calcXPostionOfTab:tab withIndex:index withTabCount:_items.count]; 149 | tab.frame = frame; 150 | index++; 151 | } 152 | 153 | } 154 | 155 | - (float) calcXPostionOfTab:(QMBTab *)tab withIndex:(int)index withTabCount:(int)count 156 | { 157 | // stacked tab shift 158 | int stackedTabOffset = ((count-1) - index) * self.stackedTabOffset; 159 | if (tab.orgFrame.origin.x <= self.contentOffset.x){ 160 | //NSLog(@"1: %f",self.contentOffset.x); 161 | return self.contentOffset.x; 162 | }else if (tab.orgFrame.origin.x + tab.orgFrame.size.width > self.frame.size.width + self.contentOffset.x){ 163 | return self.frame.size.width - tab.orgFrame.size.width + self.contentOffset.x + stackedTabOffset; 164 | }else{ 165 | //NSLog(@"3: %f",tab.orgFrame.origin.x); 166 | return tab.orgFrame.origin.x + stackedTabOffset; 167 | } 168 | } 169 | 170 | - (void)drawRect:(CGRect)rect{ 171 | 172 | [super drawRect:rect]; 173 | 174 | self.normalColor = self.appearance.tabBackgroundColorEnabled; 175 | self.highlightColor = self.appearance.tabBackgroundColorHighlighted; 176 | [_highlightBar setBackgroundColor:self.appearance.tabBarHighlightColor]; 177 | 178 | UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, rect.size.height-5.0f, rect.size.width, 5.0f)]; 179 | [view setBackgroundColor:self.appearance.tabBarHighlightColor]; 180 | _highlightBar = view; 181 | [_highlightBar setAutoresizingMask:UIViewAutoresizingFlexibleWidth]; 182 | [self addSubview:_highlightBar]; 183 | 184 | //[self rearrangeTabs]; 185 | 186 | [self bringSubviewToFront:_highlightBar]; 187 | } 188 | 189 | - (void)layoutSubviews{ 190 | [super layoutSubviews]; 191 | 192 | [self rearrangeTabs]; 193 | 194 | // Highlight Bar should stack and not scroll 195 | [_highlightBar setFrame:CGRectMake(self.contentOffset.x, _highlightBar.frame.origin.y, _highlightBar.frame.size.width, _highlightBar.frame.size.height)]; 196 | 197 | } 198 | 199 | - (void) selectTab:(QMBTab *)tab{ 200 | 201 | int i =0; 202 | 203 | 204 | for (QMBTab *tabItem in _items) { 205 | if (tab == tabItem){ 206 | [tabItem setHighlighted:true]; 207 | }else { 208 | [tabItem setHighlighted:false]; 209 | 210 | } 211 | [self sendSubviewToBack:tabItem]; 212 | i++; 213 | } 214 | 215 | _selectedTab = tab; 216 | 217 | [self bringSubviewToFront:_highlightBar]; 218 | [self bringSubviewToFront:_selectedTab]; 219 | 220 | } 221 | 222 | #pragma mark - QMBTab Delegate 223 | 224 | - (void)didSelectTab:(QMBTab *)tab{ 225 | 226 | 227 | if ([self.tabBarDelegeate respondsToSelector:@selector(tabBar:didChangeTabItem:)]){ 228 | [self.tabBarDelegeate performSelector:@selector(tabBar:didChangeTabItem:) withObject:self withObject:tab]; 229 | } 230 | } 231 | 232 | - (void)tab:(QMBTab *)tab didSelectCloseButton:(UIButton *)button{ 233 | 234 | [self removeTabItem:tab]; 235 | 236 | } 237 | 238 | - (void)removeTabItem:(QMBTab *)tab 239 | { 240 | if ([self.tabBarDelegeate respondsToSelector:@selector(tabBar:willRemoveTabItem:)]){ 241 | [self.tabBarDelegeate performSelector:@selector(tabBar:willRemoveTabItem:) withObject:self withObject:tab]; 242 | } 243 | 244 | [tab removeFromSuperview]; 245 | [_items removeObject:tab]; 246 | 247 | [UIView animateWithDuration:0.5 248 | delay:0.0 249 | options: UIViewAnimationOptionCurveEaseInOut 250 | animations:^{ 251 | [self rearrangeTabs]; 252 | } 253 | completion:^(BOOL finished){ 254 | 255 | }]; 256 | 257 | if ([self.tabBarDelegeate respondsToSelector:@selector(tabBar:didRemoveTabItem:)]){ 258 | [self.tabBarDelegeate performSelector:@selector(tabBar:didRemoveTabItem:) withObject:self withObject:tab]; 259 | } 260 | } 261 | 262 | @end 263 | -------------------------------------------------------------------------------- /OneNoteScroll.xcodeproj/xcuserdata/northtower.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 24 | 36 | 37 | 38 | 40 | 52 | 53 | 54 | 56 | 68 | 69 | 70 | 72 | 84 | 85 | 86 | 88 | 100 | 101 | 102 | 104 | 114 | 115 | 116 | 118 | 130 | 131 | 132 | 134 | 146 | 147 | 148 | 150 | 162 | 163 | 164 | 166 | 178 | 179 | 180 | 182 | 194 | 195 | 196 | 198 | 210 | 211 | 212 | 214 | 226 | 227 | 228 | 229 | 230 | -------------------------------------------------------------------------------- /OneNoteScroll/Others/QMBTabs/QMBTabViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // QMBTabViewController.m 3 | // QMBTabs Demo 4 | // 5 | // Created by Toni Möckel on 29.06.13. 6 | // Copyright (c) 2013 Toni Möckel. All rights reserved. 7 | // 8 | 9 | #import "QMBTabViewController.h" 10 | 11 | #define TABLEHEIGHT 44 12 | 13 | @interface QMBTabViewController () 14 | 15 | @property (nonatomic, strong) UIView *contentView; 16 | 17 | @end 18 | 19 | @implementation QMBTabViewController 20 | 21 | 22 | 23 | - (id) init 24 | { 25 | NSLog(@"QMBTabViewController:init"); 26 | self = [super init]; 27 | 28 | if (self){ 29 | 30 | [self setup]; 31 | _tabBarTopOffset = 0; 32 | } 33 | 34 | return self; 35 | } 36 | 37 | - (void)awakeFromNib 38 | { 39 | [self setup]; 40 | } 41 | 42 | - (void) setup 43 | { 44 | 45 | NSLog(@"QMBTabViewController: setup"); 46 | 47 | QMBTabsAppearance *appearance; 48 | if ([self.delegate respondsToSelector:@selector(tabViewControllerNeedsAppearance:)]){ 49 | appearance = [self.delegate performSelector:@selector(tabViewControllerNeedsAppearance:) withObject:self]; 50 | }else { 51 | appearance = [self getDefaultAppearance]; 52 | } 53 | self.appearance = appearance; 54 | 55 | QMBTabBar *tabBar = [[QMBTabBar alloc] init]; 56 | tabBar.tabBarDelegeate = self; 57 | tabBar.appearance = self.appearance; 58 | [tabBar setBackgroundColor:[UIColor clearColor]]; 59 | [tabBar setAutoresizingMask:UIViewAutoresizingFlexibleWidth]; 60 | _tabBar = tabBar; 61 | } 62 | 63 | - (QMBTabsAppearance *)getDefaultAppearance 64 | { 65 | NSLog(@"QMBTabViewController: getDefaultAppearance"); 66 | return [[QMBTabsAppearance alloc] init]; 67 | } 68 | 69 | - (void)viewDidLoad 70 | { 71 | [super viewDidLoad]; 72 | _viewControllers = [NSMutableArray array]; 73 | 74 | float width = self.view.frame.size.width; 75 | float height = self.view.frame.size.height; 76 | 77 | if (!_tabBarTopOffset){ 78 | // set default offset to statusbar height 79 | _tabBarTopOffset = 0.0f;//44.0f; 80 | } 81 | 82 | NSLog(@"_tabBarTopOffset:%f" , _tabBarTopOffset); 83 | 84 | [_tabBar setFrame:CGRectMake(0, _tabBarTopOffset,width, 44.0f)]; 85 | 86 | NSLog(@"_tabBar.frame.size.height + _tabBar.frame.origin.y:%f" , _tabBar.frame.size.height + _tabBar.frame.origin.y); 87 | 88 | UIView *tabBarContainer = [[UIView alloc] initWithFrame:CGRectMake(0, TABLEHEIGHT , width, _tabBar.frame.size.height + _tabBar.frame.origin.y )]; 89 | [tabBarContainer setBackgroundColor:self.appearance.tabBarBackgroundColor]; 90 | [tabBarContainer setAutoresizingMask:UIViewAutoresizingFlexibleWidth]; 91 | [tabBarContainer addSubview:_tabBar]; 92 | [self.view addSubview:tabBarContainer]; 93 | 94 | 95 | /* 96 | NSLog(@"_tabBar.frame.size.height+_tabBarTopOffset:%f" , _tabBar.frame.size.height+_tabBarTopOffset); 97 | // UIView *contentView = [[UIView alloc] initWithFrame:CGRectMake(0, _tabBar.frame.size.height+_tabBarTopOffset, width, height-_tabBar.frame.size.height)]; 98 | UIView *contentView = [[UIView alloc] initWithFrame:CGRectMake(0, TABLEHEIGHT + TABLEHEIGHT, width, height-_tabBar.frame.size.height)]; 99 | [contentView setClipsToBounds:YES]; 100 | [contentView setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight]; 101 | [self.view addSubview:contentView]; 102 | _contentView = contentView; 103 | */ 104 | 105 | } 106 | 107 | - (void)addViewController:(UIViewController *)controller 108 | { 109 | [self addViewController:controller withCompletion:nil]; 110 | } 111 | 112 | 113 | - (void)addViewController:(UIViewController *)controller withCompletion:(void (^)(QMBTab *))completition { 114 | 115 | NSLog(@"QMBTabViewController: addViewController"); 116 | 117 | if ([_viewControllers containsObject:controller]) 118 | return; 119 | 120 | if ([self.delegate respondsToSelector:@selector(tabViewController:willAddViewController:)]){ 121 | [self.delegate performSelector:@selector(tabViewController:willAddViewController:) withObject:self withObject:controller]; 122 | } 123 | 124 | [self addChildViewController:controller]; 125 | [_viewControllers addObject:controller]; 126 | 127 | 128 | 129 | [_tabBar addTabItemWithCompletition:completition]; 130 | 131 | if([_viewControllers count] == 1){ 132 | [self selectViewController:controller]; 133 | } 134 | 135 | [controller didMoveToParentViewController:self]; 136 | 137 | if ([self.delegate respondsToSelector:@selector(tabViewController:didAddViewController:)]){ 138 | [self.delegate performSelector:@selector(tabViewController:didAddViewController:) withObject:self withObject:controller]; 139 | } 140 | } 141 | 142 | - (void)removeViewController:(UIViewController *)controller 143 | { 144 | NSLog(@"QMBTabViewController: removeViewController"); 145 | 146 | [self.tabBar removeTabItem:[self.tabBar tabItemForIndex:[self indexForViewController:controller]]]; 147 | // TODO: tabbar delegate will call this controller to delete the actual view controller - pretty dirty 148 | 149 | } 150 | 151 | - (void)selectViewController:(UIViewController *)controller{ 152 | 153 | NSLog(@"QMBTabViewController: selectViewController"); 154 | 155 | UIViewController *current = self.selectedViewController; 156 | if (controller == self.selectedViewController) 157 | return; 158 | 159 | controller.view.frame = CGRectMake(0,TABLEHEIGHT,_contentView.frame.size.width, _contentView.frame.size.height); 160 | if (controller.view.superview == nil){ 161 | [controller.view setNeedsLayout]; 162 | [controller.view setAutoresizingMask:UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth]; 163 | [self.contentView addSubview:controller.view]; 164 | self.selectedViewController = controller; 165 | [_tabBar selectTab:[_tabBar tabItemForIndex:[self indexForViewController:self.selectedViewController]]]; 166 | if ([self.delegate respondsToSelector:@selector(tabViewController:didSelectViewController:)]){ 167 | [self.delegate performSelector:@selector(tabViewController:didSelectViewController:) withObject:self withObject:self.selectedViewController]; 168 | } 169 | }else { 170 | [self transitionFromViewController:current 171 | toViewController:controller 172 | duration:0 173 | options:0 174 | animations:nil 175 | completion:^(BOOL finished) { 176 | self.selectedViewController = controller; 177 | [_tabBar selectTab:[_tabBar tabItemForIndex:[self indexForViewController:self.selectedViewController]]]; 178 | 179 | if ([self.delegate respondsToSelector:@selector(tabViewController:didSelectViewController:)]){ 180 | [self.delegate performSelector:@selector(tabViewController:didSelectViewController:) withObject:self withObject:self.selectedViewController]; 181 | } 182 | 183 | }]; 184 | } 185 | 186 | 187 | 188 | 189 | } 190 | 191 | #pragma mark - QMBTabBar Delegate 192 | 193 | - (void)tabBar:(QMBTabBar *)tabBar didChangeTabItem:(QMBTab *)tab{ 194 | 195 | NSLog(@"QMBTabViewController: didChangeTabItem"); 196 | 197 | BOOL select = YES; 198 | UIViewController *newViewController = [_viewControllers objectAtIndex:[tabBar indexForTabItem:tab]]; 199 | 200 | if ([self.delegate respondsToSelector:@selector(tabViewController:shouldSelectViewController:)]){ 201 | select = (BOOL)[self.delegate performSelector:@selector(tabViewController:shouldSelectViewController:) withObject:self withObject:newViewController]; 202 | } 203 | if (select){ 204 | [self selectViewController:newViewController]; 205 | } 206 | 207 | } 208 | 209 | - (void)tabBar:(QMBTabBar *)tabBar didRemoveTabItem:(QMBTab *)tab 210 | { 211 | // Nothing to do so far 212 | } 213 | 214 | - (NSUInteger)indexForViewController:(UIViewController *)viewcontroller 215 | { 216 | int i = 0; 217 | for (UIViewController *viewControllerItem in _viewControllers) { 218 | if (viewControllerItem == viewcontroller){ 219 | return i; 220 | } 221 | i++; 222 | } 223 | return -1; 224 | } 225 | 226 | - (void)tabBar:(QMBTabBar *)tabBar willRemoveTabItem:(QMBTab *)tab 227 | { 228 | NSLog(@"QMBTabViewController: willRemoveTabItem"); 229 | 230 | int removeIndex = [tabBar indexForTabItem:tab]; 231 | UIViewController *controller = [_viewControllers objectAtIndex:removeIndex]; 232 | 233 | if ([self.delegate respondsToSelector:@selector(tabViewController:willRemoveViewController:)]){ 234 | [self.delegate performSelector:@selector(tabViewController:willRemoveViewController:) withObject:self withObject:controller]; 235 | } 236 | 237 | if (controller == self.selectedViewController){ 238 | if ( [self indexForViewController:self.selectedViewController]+1 < [_viewControllers count]){ 239 | [self selectViewController:[_viewControllers objectAtIndex:[self indexForViewController:self.selectedViewController]+1]]; 240 | }else if ([self indexForViewController:self.selectedViewController]-1 < [_viewControllers count]){ 241 | [self selectViewController:[_viewControllers objectAtIndex:[self indexForViewController:self.selectedViewController]-1]]; 242 | } 243 | } 244 | 245 | [controller willMoveToParentViewController:nil]; 246 | [controller.view removeFromSuperview]; 247 | 248 | [_viewControllers removeObject:controller]; 249 | 250 | if ([self.delegate respondsToSelector:@selector(tabViewController:didRemoveViewController:)]){ 251 | [self.delegate performSelector:@selector(tabViewController:didRemoveViewController:) withObject:self withObject:controller]; 252 | } 253 | 254 | 255 | } 256 | 257 | @end 258 | 259 | @implementation UIViewController (QMBTabViewController) 260 | 261 | - (QMBTabViewController*)tabViewController 262 | { 263 | NSLog(@"QMBTabViewController: tabViewController"); 264 | 265 | UIViewController *parent = self; 266 | 267 | while ( nil != (parent = [parent parentViewController]) && ![parent isKindOfClass:[QMBTabViewController class]] ) 268 | { 269 | } 270 | 271 | return (id)parent; 272 | } 273 | 274 | 275 | @end 276 | 277 | -------------------------------------------------------------------------------- /OneNoteScroll/Others/QMBTabs/QMBTab.m: -------------------------------------------------------------------------------- 1 | // 2 | // QMBTab.m 3 | // QMBTabs Demo 4 | // 5 | // Created by Toni Möckel on 29.06.13. 6 | // Copyright (c) 2013 Toni Möckel. All rights reserved. 7 | // 8 | 9 | #import "QMBTab.h" 10 | 11 | @interface QMBTab () 12 | 13 | 14 | @end 15 | 16 | @implementation QMBTab 17 | 18 | - (id)initWithFrame:(CGRect)frame 19 | { 20 | self = [super initWithFrame:frame]; 21 | if (self) { 22 | _orgFrame = frame; 23 | _closable = YES; 24 | 25 | // [self setClipsToBounds:NO]; 26 | 27 | [self setOpaque:NO]; 28 | 29 | UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTap:)]; 30 | [tapGesture setNumberOfTapsRequired:1]; 31 | [tapGesture setNumberOfTouchesRequired:1]; 32 | [self addGestureRecognizer:tapGesture]; 33 | 34 | // title label 35 | if (!self.titleLabel){ 36 | UILabel *titleLabel = [[UILabel alloc] init]; 37 | [titleLabel setText:NSLocalizedString(@"New tab is what it is", nil)]; 38 | [titleLabel setBackgroundColor:[UIColor clearColor]]; 39 | self.titleLabel = titleLabel; 40 | [self addSubview:self.titleLabel]; 41 | } 42 | 43 | 44 | // close button 45 | if (!self.closeButton){ 46 | 47 | } 48 | 49 | // icon image view 50 | if (!self.iconImageView){ 51 | UIImageView *iconImageView = [[UIImageView alloc] init]; 52 | [self addSubview:iconImageView]; 53 | self.iconImageView = iconImageView; 54 | } 55 | 56 | 57 | } 58 | 59 | return self; 60 | } 61 | - (void)setInnerBackgroundColor:(UIColor *)color 62 | { 63 | if ([_innerBackgroundColor isEqual:color]) { 64 | return; 65 | } 66 | _innerBackgroundColor = color; 67 | [self setNeedsDisplay]; 68 | } 69 | 70 | - (void)setForegroundColor:(UIColor *)color 71 | { 72 | if ([_foregroundColor isEqual:color]) { 73 | return; 74 | } 75 | _foregroundColor = color; 76 | [self setNeedsDisplay]; 77 | } 78 | 79 | 80 | - (void)drawRect:(CGRect)rect 81 | { 82 | 83 | if (!_innerBackgroundColor){ 84 | [self setInnerBackgroundColor:self.appearance.tabBackgroundColorEnabled]; 85 | } 86 | 87 | if (!self.normalColor){ 88 | self.normalColor = self.appearance.tabBackgroundColorEnabled; 89 | self.highlightColor = self.appearance.tabBackgroundColorHighlighted; 90 | } 91 | 92 | 93 | CGContextRef context = UIGraphicsGetCurrentContext(); 94 | CGMutablePathRef path; 95 | CGPoint point; 96 | 97 | CGFloat qmbTabSideOffset = self.appearance.tabSideOffset; 98 | CGFloat qmbTabTopOffset = self.appearance.tabTopOffset; 99 | CGFloat qmbTabCurvature = self.appearance.tabCurvature; 100 | 101 | CGFloat qmbTabWidth = self.frame.size.width; 102 | CGFloat qmbTabHeight = self.frame.size.height - qmbTabTopOffset;; 103 | 104 | CGFloat startY = self.frame.size.height; 105 | 106 | CGFloat qmbTabIconWidth = 0.0f; 107 | CGFloat qmbTabIconMargin = 3.0f; 108 | 109 | /* 110 | 111 | if (!self.closeButton){ 112 | UIButton *closeButton = [UIButton buttonWithType:UIButtonTypeCustom]; 113 | [closeButton setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin]; 114 | [closeButton addTarget:self action:@selector(closeButtonTouchUpInside:) forControlEvents:UIControlEventTouchUpInside]; 115 | [self addSubview:closeButton]; 116 | self.closeButton = closeButton; 117 | [self.closeButton setFrame:CGRectMake(qmbTabWidth - qmbTabSideOffset - qmbTabCurvature - (self.appearance.tabCloseButtonImage).size.width, 118 | (qmbTabHeight - (self.appearance.tabCloseButtonImage).size.height) / 2 + qmbTabTopOffset, 119 | (self.appearance.tabCloseButtonImage).size.width, (self.appearance.tabCloseButtonImage).size.height)]; 120 | } 121 | 122 | [self.closeButton setImage:self.appearance.tabCloseButtonImage forState:UIControlStateNormal]; 123 | [self.closeButton setImage:self.appearance.tabCloseButtonHighlightedImage forState:UIControlStateHighlighted]; 124 | 125 | 126 | CGContextSaveGState(context); 127 | */ 128 | 129 | 130 | // Shadow 131 | /** 132 | * 使用Quartz时涉及到一个图形上下文,其中图形上下文中包含一个保存过的图形状态堆栈。在Quartz创建图形上下文时,该堆栈是空的。CGContextSaveGState函数的作用是将当前图形状态推入堆栈。之后,您对图形状态所做的修改会影响随后的描画操作,但不影响存储在堆栈中的拷贝。在修改完成后,您可以通过CGContextRestoreGState函数把堆栈顶部的状态弹出,返回到之前的图形状态。这种推入和弹出的方式是回到之前图形状态的快速方法,避免逐个撤消所有的状态修改;这也是将某些状态(比如裁剪路径)恢复到原有设置的唯一方式。 133 | */ 134 | CGContextSaveGState(context); 135 | 136 | CGContextSetShadowWithColor(context, 137 | CGSizeMake(self.appearance.tabShadowWidthOffset, self.appearance.tabShadowHeightOffset), 138 | self.appearance.tabShadowBlur, 139 | [self.appearance.tabShadowColor CGColor]); 140 | CGContextBeginTransparencyLayer(context, NULL); 141 | 142 | path = CGPathCreateMutable(); 143 | point = CGPointMake(0.0f, startY); 144 | CGPathMoveToPoint(path, NULL, point.x, point.y); 145 | 146 | 147 | // offset left 148 | CGPathAddLineToPoint(path, NULL, qmbTabSideOffset, startY); 149 | 150 | 151 | // left curve 152 | CGPathAddCurveToPoint(path, NULL, 153 | qmbTabSideOffset + qmbTabCurvature / 2, startY, 154 | qmbTabSideOffset + qmbTabCurvature / 2, startY - qmbTabHeight, 155 | qmbTabSideOffset + qmbTabCurvature, startY - qmbTabHeight); 156 | 157 | // top line 158 | CGPathAddLineToPoint(path, NULL, qmbTabWidth - qmbTabSideOffset - qmbTabCurvature, startY - qmbTabHeight); 159 | 160 | // right curve 161 | CGPathAddCurveToPoint(path, NULL, 162 | qmbTabWidth - qmbTabSideOffset - qmbTabCurvature / 2, startY - qmbTabHeight, 163 | qmbTabWidth - qmbTabSideOffset - qmbTabCurvature / 2, startY, 164 | qmbTabWidth - qmbTabSideOffset, startY); 165 | 166 | // offset right 167 | CGPathAddLineToPoint(path, NULL, qmbTabWidth, startY); 168 | 169 | 170 | CGPathCloseSubpath(path); 171 | [_innerBackgroundColor setFill]; 172 | CGContextAddPath(context, path); 173 | CGContextFillPath(context); 174 | CGPathRelease(path); 175 | 176 | CGContextEndTransparencyLayer(context); 177 | CGContextRestoreGState(context); 178 | 179 | [self.iconImageView setImage:nil]; 180 | 181 | 182 | // highlighted tab 183 | if (_highlighted){ 184 | // set frame of the close button 185 | 186 | // set font and color of the title label 187 | [self.titleLabel setFont:self.appearance.tabLabelFontHighlighted]; 188 | [self.titleLabel setTextColor:self.appearance.tabLabelColorHighlighted]; 189 | 190 | // tab default icon 191 | if(self.appearance.tabDefaultIconHighlightedImage) { 192 | [self.iconImageView setFrame:CGRectMake(qmbTabSideOffset + qmbTabCurvature, 193 | (qmbTabHeight - (self.appearance.tabDefaultIconHighlightedImage).size.height) / 2 + qmbTabTopOffset, 194 | (self.appearance.tabDefaultIconHighlightedImage).size.width, (self.appearance.tabDefaultIconHighlightedImage).size.height)]; 195 | [self.iconImageView setImage:self.appearance.tabDefaultIconHighlightedImage]; 196 | 197 | qmbTabIconWidth = (self.appearance.tabDefaultIconHighlightedImage).size.width + qmbTabIconMargin; 198 | } 199 | 200 | // tab icon 201 | if(self.iconHighlightedImage) { 202 | [self.iconImageView setFrame:CGRectMake(qmbTabSideOffset + qmbTabCurvature, 203 | (qmbTabHeight - (self.iconHighlightedImage).size.height) / 2 + qmbTabTopOffset, 204 | (self.iconHighlightedImage).size.width, (self.iconHighlightedImage).size.height)]; 205 | [self.iconImageView setImage:self.iconHighlightedImage]; 206 | 207 | qmbTabIconWidth = (self.iconHighlightedImage).size.width + qmbTabIconMargin; 208 | } 209 | 210 | [self.titleLabel setFrame:CGRectMake(qmbTabSideOffset + qmbTabCurvature + qmbTabIconWidth, 3.0f, 211 | qmbTabWidth - 2*qmbTabSideOffset - 2*qmbTabCurvature - (_closable ? self.closeButton.frame.size.width + qmbTabIconMargin : 0.0f) - qmbTabIconWidth, self.frame.size.height)]; 212 | 213 | 214 | }else { 215 | 216 | 217 | // set font and color of the title label 218 | [self.titleLabel setFont:self.appearance.tabLabelFontEnabled]; 219 | [self.titleLabel setTextColor:self.appearance.tabLabelColorEnabled]; 220 | 221 | // tab default icon 222 | if(self.appearance.tabDefaultIconImage) { 223 | [self.iconImageView setFrame:CGRectMake(qmbTabSideOffset + qmbTabCurvature, 224 | (qmbTabHeight - (self.appearance.tabDefaultIconImage).size.height) / 2 + qmbTabTopOffset, 225 | (self.appearance.tabDefaultIconImage).size.width, (self.appearance.tabDefaultIconImage).size.height)]; 226 | [self.iconImageView setImage:self.appearance.tabDefaultIconImage]; 227 | 228 | qmbTabIconWidth = (self.appearance.tabDefaultIconImage).size.width + qmbTabIconMargin; 229 | } 230 | 231 | // tab icon 232 | if(self.iconImage) { 233 | [self.iconImageView setFrame:CGRectMake(qmbTabSideOffset + qmbTabCurvature, 234 | (qmbTabHeight - (self.iconImage).size.height) / 2 + qmbTabTopOffset, 235 | (self.iconImage).size.width, (self.iconImage).size.height)]; 236 | [self.iconImageView setImage:self.iconImage]; 237 | 238 | qmbTabIconWidth = (self.iconImage).size.width + qmbTabIconMargin; 239 | } 240 | 241 | [self.titleLabel setFrame:CGRectMake(qmbTabSideOffset + qmbTabCurvature + qmbTabIconWidth, 3.0f, 242 | qmbTabWidth - 2*qmbTabSideOffset - 2*qmbTabCurvature - qmbTabIconWidth, self.frame.size.height)]; 243 | } 244 | 245 | // set frame of the close button 246 | 247 | [self.closeButton setHidden:!_highlighted || !_closable]; 248 | 249 | [self setBackgroundColor:[UIColor clearColor]]; 250 | } 251 | 252 | - (void)layoutSubviews{ 253 | [super layoutSubviews]; 254 | 255 | } 256 | 257 | - (void) setHighlighted:(BOOL)highlighted 258 | { 259 | if (highlighted){ 260 | [self setInnerBackgroundColor:self.appearance.tabBackgroundColorHighlighted]; 261 | }else { 262 | [self setInnerBackgroundColor:self.appearance.tabBackgroundColorEnabled]; 263 | } 264 | 265 | _highlighted = highlighted; 266 | 267 | } 268 | 269 | #pragma mark - Gesture 270 | 271 | - (void) didTap:(id)sender 272 | { 273 | if ([self.delegate respondsToSelector:@selector(didSelectTab:)]){ 274 | [self.delegate performSelector:@selector(didSelectTab:) withObject:self]; 275 | } 276 | } 277 | 278 | - (void) closeButtonTouchUpInside:(UIButton *)closeButton 279 | { 280 | if ([self.delegate respondsToSelector:@selector(tab:didSelectCloseButton:)]){ 281 | [self.delegate performSelector:@selector(tab:didSelectCloseButton:) withObject:self withObject:closeButton]; 282 | } 283 | } 284 | 285 | 286 | @end 287 | -------------------------------------------------------------------------------- /OneNoteScroll/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 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 125 | 131 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | -------------------------------------------------------------------------------- /OneNoteScroll.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 420EC3FA1B84559C00112359 /* DocContentCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 420EC3F91B84559C00112359 /* DocContentCell.m */; }; 11 | 420EC3FD1B84561900112359 /* DocContentModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 420EC3FC1B84561900112359 /* DocContentModel.m */; }; 12 | 420EC4001B84640C00112359 /* publicSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = 420EC3FF1B84640C00112359 /* publicSettings.m */; }; 13 | 420EC4031B84708600112359 /* docPreviewCtl.m in Sources */ = {isa = PBXBuildFile; fileRef = 420EC4021B84708600112359 /* docPreviewCtl.m */; }; 14 | 424FF83E1B7B40A20079B09F /* simpleMenuButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 424FF83C1B7B40A20079B09F /* simpleMenuButton.png */; }; 15 | 424FF83F1B7B40A20079B09F /* simpleMenuButton@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 424FF83D1B7B40A20079B09F /* simpleMenuButton@2x.png */; }; 16 | 42799E101B7A38F10028317A /* oneNoteMainViewCtl.m in Sources */ = {isa = PBXBuildFile; fileRef = 42799E0F1B7A38F10028317A /* oneNoteMainViewCtl.m */; }; 17 | 42A4B2731B7B25FE00724463 /* QMBTab.m in Sources */ = {isa = PBXBuildFile; fileRef = 42A4B26A1B7B25FE00724463 /* QMBTab.m */; }; 18 | 42A4B2741B7B25FE00724463 /* QMBTabBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 42A4B26C1B7B25FE00724463 /* QMBTabBar.m */; }; 19 | 42A4B2751B7B25FE00724463 /* QMBTabsAppearance.m in Sources */ = {isa = PBXBuildFile; fileRef = 42A4B26E1B7B25FE00724463 /* QMBTabsAppearance.m */; }; 20 | 42A4B2761B7B25FE00724463 /* QMBTabViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 42A4B2701B7B25FE00724463 /* QMBTabViewController.m */; }; 21 | 42B5C4D21B79974600AEBED1 /* LoginViewCtl.m in Sources */ = {isa = PBXBuildFile; fileRef = 42B5C4D11B79974600AEBED1 /* LoginViewCtl.m */; }; 22 | 42D76D7E1B6F0ADA00AEDFDF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D76D7D1B6F0ADA00AEDFDF /* main.m */; }; 23 | 42D76D811B6F0ADA00AEDFDF /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D76D801B6F0ADA00AEDFDF /* AppDelegate.m */; }; 24 | 42D76D841B6F0ADA00AEDFDF /* startPageViewCtl.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D76D831B6F0ADA00AEDFDF /* startPageViewCtl.m */; }; 25 | 42D76D871B6F0ADA00AEDFDF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 42D76D851B6F0ADA00AEDFDF /* Main.storyboard */; }; 26 | 42D76D891B6F0ADA00AEDFDF /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 42D76D881B6F0ADA00AEDFDF /* Images.xcassets */; }; 27 | 42D76D8C1B6F0ADA00AEDFDF /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42D76D8A1B6F0ADA00AEDFDF /* LaunchScreen.xib */; }; 28 | 42D76D981B6F0ADA00AEDFDF /* OneNoteScrollTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 42D76D971B6F0ADA00AEDFDF /* OneNoteScrollTests.m */; }; 29 | /* End PBXBuildFile section */ 30 | 31 | /* Begin PBXContainerItemProxy section */ 32 | 42D76D921B6F0ADA00AEDFDF /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = 42D76D701B6F0ADA00AEDFDF /* Project object */; 35 | proxyType = 1; 36 | remoteGlobalIDString = 42D76D771B6F0ADA00AEDFDF; 37 | remoteInfo = OneNoteScroll; 38 | }; 39 | /* End PBXContainerItemProxy section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 420EC3F81B84559C00112359 /* DocContentCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DocContentCell.h; path = Views/DocContentCell.h; sourceTree = ""; }; 43 | 420EC3F91B84559C00112359 /* DocContentCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DocContentCell.m; path = Views/DocContentCell.m; sourceTree = ""; }; 44 | 420EC3FB1B84561900112359 /* DocContentModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DocContentModel.h; path = Model/DocContentModel.h; sourceTree = ""; }; 45 | 420EC3FC1B84561900112359 /* DocContentModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DocContentModel.m; path = Model/DocContentModel.m; sourceTree = ""; }; 46 | 420EC3FE1B84640C00112359 /* publicSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = publicSettings.h; path = Others/publicSettings.h; sourceTree = ""; }; 47 | 420EC3FF1B84640C00112359 /* publicSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = publicSettings.m; path = Others/publicSettings.m; sourceTree = ""; }; 48 | 420EC4011B84708600112359 /* docPreviewCtl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = docPreviewCtl.h; path = Controller/docPreviewCtl.h; sourceTree = ""; }; 49 | 420EC4021B84708600112359 /* docPreviewCtl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = docPreviewCtl.m; path = Controller/docPreviewCtl.m; sourceTree = ""; }; 50 | 424FF83C1B7B40A20079B09F /* simpleMenuButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = simpleMenuButton.png; sourceTree = ""; }; 51 | 424FF83D1B7B40A20079B09F /* simpleMenuButton@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "simpleMenuButton@2x.png"; sourceTree = ""; }; 52 | 42799E0E1B7A38F10028317A /* oneNoteMainViewCtl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = oneNoteMainViewCtl.h; sourceTree = ""; }; 53 | 42799E0F1B7A38F10028317A /* oneNoteMainViewCtl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = oneNoteMainViewCtl.m; sourceTree = ""; }; 54 | 42A4B2691B7B25FE00724463 /* QMBTab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QMBTab.h; path = Others/QMBTabs/QMBTab.h; sourceTree = ""; }; 55 | 42A4B26A1B7B25FE00724463 /* QMBTab.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QMBTab.m; path = Others/QMBTabs/QMBTab.m; sourceTree = ""; }; 56 | 42A4B26B1B7B25FE00724463 /* QMBTabBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QMBTabBar.h; path = Others/QMBTabs/QMBTabBar.h; sourceTree = ""; }; 57 | 42A4B26C1B7B25FE00724463 /* QMBTabBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QMBTabBar.m; path = Others/QMBTabs/QMBTabBar.m; sourceTree = ""; }; 58 | 42A4B26D1B7B25FE00724463 /* QMBTabsAppearance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QMBTabsAppearance.h; path = Others/QMBTabs/QMBTabsAppearance.h; sourceTree = ""; }; 59 | 42A4B26E1B7B25FE00724463 /* QMBTabsAppearance.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QMBTabsAppearance.m; path = Others/QMBTabs/QMBTabsAppearance.m; sourceTree = ""; }; 60 | 42A4B26F1B7B25FE00724463 /* QMBTabViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QMBTabViewController.h; path = Others/QMBTabs/QMBTabViewController.h; sourceTree = ""; }; 61 | 42A4B2701B7B25FE00724463 /* QMBTabViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QMBTabViewController.m; path = Others/QMBTabs/QMBTabViewController.m; sourceTree = ""; }; 62 | 42B5C4D01B79974600AEBED1 /* LoginViewCtl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LoginViewCtl.h; path = Controller/LoginAndRegister/LoginViewCtl.h; sourceTree = ""; }; 63 | 42B5C4D11B79974600AEBED1 /* LoginViewCtl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LoginViewCtl.m; path = Controller/LoginAndRegister/LoginViewCtl.m; sourceTree = ""; }; 64 | 42D76D781B6F0ADA00AEDFDF /* OneNoteScroll.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OneNoteScroll.app; sourceTree = BUILT_PRODUCTS_DIR; }; 65 | 42D76D7C1B6F0ADA00AEDFDF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 66 | 42D76D7D1B6F0ADA00AEDFDF /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 67 | 42D76D7F1B6F0ADA00AEDFDF /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 68 | 42D76D801B6F0ADA00AEDFDF /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 69 | 42D76D821B6F0ADA00AEDFDF /* startPageViewCtl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = startPageViewCtl.h; sourceTree = ""; }; 70 | 42D76D831B6F0ADA00AEDFDF /* startPageViewCtl.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = startPageViewCtl.m; sourceTree = ""; }; 71 | 42D76D861B6F0ADA00AEDFDF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 72 | 42D76D881B6F0ADA00AEDFDF /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 73 | 42D76D8B1B6F0ADA00AEDFDF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 74 | 42D76D911B6F0ADA00AEDFDF /* OneNoteScrollTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OneNoteScrollTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 75 | 42D76D961B6F0ADA00AEDFDF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 76 | 42D76D971B6F0ADA00AEDFDF /* OneNoteScrollTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OneNoteScrollTests.m; sourceTree = ""; }; 77 | /* End PBXFileReference section */ 78 | 79 | /* Begin PBXFrameworksBuildPhase section */ 80 | 42D76D751B6F0ADA00AEDFDF /* Frameworks */ = { 81 | isa = PBXFrameworksBuildPhase; 82 | buildActionMask = 2147483647; 83 | files = ( 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | 42D76D8E1B6F0ADA00AEDFDF /* Frameworks */ = { 88 | isa = PBXFrameworksBuildPhase; 89 | buildActionMask = 2147483647; 90 | files = ( 91 | ); 92 | runOnlyForDeploymentPostprocessing = 0; 93 | }; 94 | /* End PBXFrameworksBuildPhase section */ 95 | 96 | /* Begin PBXGroup section */ 97 | 42A4B2631B7B256300724463 /* Others */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 42A4B2641B7B25D500724463 /* QMBTabs */, 101 | 420EC3FE1B84640C00112359 /* publicSettings.h */, 102 | 420EC3FF1B84640C00112359 /* publicSettings.m */, 103 | ); 104 | name = Others; 105 | sourceTree = ""; 106 | }; 107 | 42A4B2641B7B25D500724463 /* QMBTabs */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 42A4B2691B7B25FE00724463 /* QMBTab.h */, 111 | 42A4B26A1B7B25FE00724463 /* QMBTab.m */, 112 | 42A4B26B1B7B25FE00724463 /* QMBTabBar.h */, 113 | 42A4B26C1B7B25FE00724463 /* QMBTabBar.m */, 114 | 42A4B26D1B7B25FE00724463 /* QMBTabsAppearance.h */, 115 | 42A4B26E1B7B25FE00724463 /* QMBTabsAppearance.m */, 116 | 42A4B26F1B7B25FE00724463 /* QMBTabViewController.h */, 117 | 42A4B2701B7B25FE00724463 /* QMBTabViewController.m */, 118 | ); 119 | name = QMBTabs; 120 | sourceTree = ""; 121 | }; 122 | 42B5C4D31B79974F00AEBED1 /* Controller */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 42D76D821B6F0ADA00AEDFDF /* startPageViewCtl.h */, 126 | 42D76D831B6F0ADA00AEDFDF /* startPageViewCtl.m */, 127 | 42799E0E1B7A38F10028317A /* oneNoteMainViewCtl.h */, 128 | 42799E0F1B7A38F10028317A /* oneNoteMainViewCtl.m */, 129 | 420EC4011B84708600112359 /* docPreviewCtl.h */, 130 | 420EC4021B84708600112359 /* docPreviewCtl.m */, 131 | 42B5C4D01B79974600AEBED1 /* LoginViewCtl.h */, 132 | 42B5C4D11B79974600AEBED1 /* LoginViewCtl.m */, 133 | ); 134 | name = Controller; 135 | sourceTree = ""; 136 | }; 137 | 42B5C4D51B79977B00AEBED1 /* Model */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 420EC3FB1B84561900112359 /* DocContentModel.h */, 141 | 420EC3FC1B84561900112359 /* DocContentModel.m */, 142 | ); 143 | name = Model; 144 | sourceTree = ""; 145 | }; 146 | 42B5C4D61B79978300AEBED1 /* Views */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 420EC3F81B84559C00112359 /* DocContentCell.h */, 150 | 420EC3F91B84559C00112359 /* DocContentCell.m */, 151 | ); 152 | name = Views; 153 | sourceTree = ""; 154 | }; 155 | 42B5C4D71B79978A00AEBED1 /* Supporting File */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | ); 159 | name = "Supporting File"; 160 | sourceTree = ""; 161 | }; 162 | 42D76D6F1B6F0ADA00AEDFDF = { 163 | isa = PBXGroup; 164 | children = ( 165 | 42D76D7A1B6F0ADA00AEDFDF /* OneNoteScroll */, 166 | 42D76D941B6F0ADA00AEDFDF /* OneNoteScrollTests */, 167 | 42D76D791B6F0ADA00AEDFDF /* Products */, 168 | ); 169 | sourceTree = ""; 170 | }; 171 | 42D76D791B6F0ADA00AEDFDF /* Products */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | 42D76D781B6F0ADA00AEDFDF /* OneNoteScroll.app */, 175 | 42D76D911B6F0ADA00AEDFDF /* OneNoteScrollTests.xctest */, 176 | ); 177 | name = Products; 178 | sourceTree = ""; 179 | }; 180 | 42D76D7A1B6F0ADA00AEDFDF /* OneNoteScroll */ = { 181 | isa = PBXGroup; 182 | children = ( 183 | 42A4B2631B7B256300724463 /* Others */, 184 | 42B5C4D71B79978A00AEBED1 /* Supporting File */, 185 | 42B5C4D61B79978300AEBED1 /* Views */, 186 | 42B5C4D51B79977B00AEBED1 /* Model */, 187 | 42B5C4D31B79974F00AEBED1 /* Controller */, 188 | 42D76D7F1B6F0ADA00AEDFDF /* AppDelegate.h */, 189 | 42D76D801B6F0ADA00AEDFDF /* AppDelegate.m */, 190 | 42D76D851B6F0ADA00AEDFDF /* Main.storyboard */, 191 | 42D76D881B6F0ADA00AEDFDF /* Images.xcassets */, 192 | 42D76D8A1B6F0ADA00AEDFDF /* LaunchScreen.xib */, 193 | 42D76D7B1B6F0ADA00AEDFDF /* Supporting Files */, 194 | ); 195 | path = OneNoteScroll; 196 | sourceTree = ""; 197 | }; 198 | 42D76D7B1B6F0ADA00AEDFDF /* Supporting Files */ = { 199 | isa = PBXGroup; 200 | children = ( 201 | 42D76D7C1B6F0ADA00AEDFDF /* Info.plist */, 202 | 42D76D7D1B6F0ADA00AEDFDF /* main.m */, 203 | 424FF83C1B7B40A20079B09F /* simpleMenuButton.png */, 204 | 424FF83D1B7B40A20079B09F /* simpleMenuButton@2x.png */, 205 | ); 206 | name = "Supporting Files"; 207 | sourceTree = ""; 208 | }; 209 | 42D76D941B6F0ADA00AEDFDF /* OneNoteScrollTests */ = { 210 | isa = PBXGroup; 211 | children = ( 212 | 42D76D971B6F0ADA00AEDFDF /* OneNoteScrollTests.m */, 213 | 42D76D951B6F0ADA00AEDFDF /* Supporting Files */, 214 | ); 215 | path = OneNoteScrollTests; 216 | sourceTree = ""; 217 | }; 218 | 42D76D951B6F0ADA00AEDFDF /* Supporting Files */ = { 219 | isa = PBXGroup; 220 | children = ( 221 | 42D76D961B6F0ADA00AEDFDF /* Info.plist */, 222 | ); 223 | name = "Supporting Files"; 224 | sourceTree = ""; 225 | }; 226 | /* End PBXGroup section */ 227 | 228 | /* Begin PBXNativeTarget section */ 229 | 42D76D771B6F0ADA00AEDFDF /* OneNoteScroll */ = { 230 | isa = PBXNativeTarget; 231 | buildConfigurationList = 42D76D9B1B6F0ADB00AEDFDF /* Build configuration list for PBXNativeTarget "OneNoteScroll" */; 232 | buildPhases = ( 233 | 42D76D741B6F0ADA00AEDFDF /* Sources */, 234 | 42D76D751B6F0ADA00AEDFDF /* Frameworks */, 235 | 42D76D761B6F0ADA00AEDFDF /* Resources */, 236 | ); 237 | buildRules = ( 238 | ); 239 | dependencies = ( 240 | ); 241 | name = OneNoteScroll; 242 | productName = OneNoteScroll; 243 | productReference = 42D76D781B6F0ADA00AEDFDF /* OneNoteScroll.app */; 244 | productType = "com.apple.product-type.application"; 245 | }; 246 | 42D76D901B6F0ADA00AEDFDF /* OneNoteScrollTests */ = { 247 | isa = PBXNativeTarget; 248 | buildConfigurationList = 42D76D9E1B6F0ADB00AEDFDF /* Build configuration list for PBXNativeTarget "OneNoteScrollTests" */; 249 | buildPhases = ( 250 | 42D76D8D1B6F0ADA00AEDFDF /* Sources */, 251 | 42D76D8E1B6F0ADA00AEDFDF /* Frameworks */, 252 | 42D76D8F1B6F0ADA00AEDFDF /* Resources */, 253 | ); 254 | buildRules = ( 255 | ); 256 | dependencies = ( 257 | 42D76D931B6F0ADA00AEDFDF /* PBXTargetDependency */, 258 | ); 259 | name = OneNoteScrollTests; 260 | productName = OneNoteScrollTests; 261 | productReference = 42D76D911B6F0ADA00AEDFDF /* OneNoteScrollTests.xctest */; 262 | productType = "com.apple.product-type.bundle.unit-test"; 263 | }; 264 | /* End PBXNativeTarget section */ 265 | 266 | /* Begin PBXProject section */ 267 | 42D76D701B6F0ADA00AEDFDF /* Project object */ = { 268 | isa = PBXProject; 269 | attributes = { 270 | LastUpgradeCheck = 0640; 271 | ORGANIZATIONNAME = northtower; 272 | TargetAttributes = { 273 | 42D76D771B6F0ADA00AEDFDF = { 274 | CreatedOnToolsVersion = 6.4; 275 | }; 276 | 42D76D901B6F0ADA00AEDFDF = { 277 | CreatedOnToolsVersion = 6.4; 278 | TestTargetID = 42D76D771B6F0ADA00AEDFDF; 279 | }; 280 | }; 281 | }; 282 | buildConfigurationList = 42D76D731B6F0ADA00AEDFDF /* Build configuration list for PBXProject "OneNoteScroll" */; 283 | compatibilityVersion = "Xcode 3.2"; 284 | developmentRegion = English; 285 | hasScannedForEncodings = 0; 286 | knownRegions = ( 287 | en, 288 | Base, 289 | ); 290 | mainGroup = 42D76D6F1B6F0ADA00AEDFDF; 291 | productRefGroup = 42D76D791B6F0ADA00AEDFDF /* Products */; 292 | projectDirPath = ""; 293 | projectRoot = ""; 294 | targets = ( 295 | 42D76D771B6F0ADA00AEDFDF /* OneNoteScroll */, 296 | 42D76D901B6F0ADA00AEDFDF /* OneNoteScrollTests */, 297 | ); 298 | }; 299 | /* End PBXProject section */ 300 | 301 | /* Begin PBXResourcesBuildPhase section */ 302 | 42D76D761B6F0ADA00AEDFDF /* Resources */ = { 303 | isa = PBXResourcesBuildPhase; 304 | buildActionMask = 2147483647; 305 | files = ( 306 | 42D76D871B6F0ADA00AEDFDF /* Main.storyboard in Resources */, 307 | 42D76D8C1B6F0ADA00AEDFDF /* LaunchScreen.xib in Resources */, 308 | 424FF83F1B7B40A20079B09F /* simpleMenuButton@2x.png in Resources */, 309 | 424FF83E1B7B40A20079B09F /* simpleMenuButton.png in Resources */, 310 | 42D76D891B6F0ADA00AEDFDF /* Images.xcassets in Resources */, 311 | ); 312 | runOnlyForDeploymentPostprocessing = 0; 313 | }; 314 | 42D76D8F1B6F0ADA00AEDFDF /* Resources */ = { 315 | isa = PBXResourcesBuildPhase; 316 | buildActionMask = 2147483647; 317 | files = ( 318 | ); 319 | runOnlyForDeploymentPostprocessing = 0; 320 | }; 321 | /* End PBXResourcesBuildPhase section */ 322 | 323 | /* Begin PBXSourcesBuildPhase section */ 324 | 42D76D741B6F0ADA00AEDFDF /* Sources */ = { 325 | isa = PBXSourcesBuildPhase; 326 | buildActionMask = 2147483647; 327 | files = ( 328 | 42A4B2731B7B25FE00724463 /* QMBTab.m in Sources */, 329 | 42B5C4D21B79974600AEBED1 /* LoginViewCtl.m in Sources */, 330 | 42D76D841B6F0ADA00AEDFDF /* startPageViewCtl.m in Sources */, 331 | 42D76D811B6F0ADA00AEDFDF /* AppDelegate.m in Sources */, 332 | 420EC4001B84640C00112359 /* publicSettings.m in Sources */, 333 | 420EC3FD1B84561900112359 /* DocContentModel.m in Sources */, 334 | 420EC4031B84708600112359 /* docPreviewCtl.m in Sources */, 335 | 42A4B2761B7B25FE00724463 /* QMBTabViewController.m in Sources */, 336 | 42D76D7E1B6F0ADA00AEDFDF /* main.m in Sources */, 337 | 42A4B2741B7B25FE00724463 /* QMBTabBar.m in Sources */, 338 | 42A4B2751B7B25FE00724463 /* QMBTabsAppearance.m in Sources */, 339 | 42799E101B7A38F10028317A /* oneNoteMainViewCtl.m in Sources */, 340 | 420EC3FA1B84559C00112359 /* DocContentCell.m in Sources */, 341 | ); 342 | runOnlyForDeploymentPostprocessing = 0; 343 | }; 344 | 42D76D8D1B6F0ADA00AEDFDF /* Sources */ = { 345 | isa = PBXSourcesBuildPhase; 346 | buildActionMask = 2147483647; 347 | files = ( 348 | 42D76D981B6F0ADA00AEDFDF /* OneNoteScrollTests.m in Sources */, 349 | ); 350 | runOnlyForDeploymentPostprocessing = 0; 351 | }; 352 | /* End PBXSourcesBuildPhase section */ 353 | 354 | /* Begin PBXTargetDependency section */ 355 | 42D76D931B6F0ADA00AEDFDF /* PBXTargetDependency */ = { 356 | isa = PBXTargetDependency; 357 | target = 42D76D771B6F0ADA00AEDFDF /* OneNoteScroll */; 358 | targetProxy = 42D76D921B6F0ADA00AEDFDF /* PBXContainerItemProxy */; 359 | }; 360 | /* End PBXTargetDependency section */ 361 | 362 | /* Begin PBXVariantGroup section */ 363 | 42D76D851B6F0ADA00AEDFDF /* Main.storyboard */ = { 364 | isa = PBXVariantGroup; 365 | children = ( 366 | 42D76D861B6F0ADA00AEDFDF /* Base */, 367 | ); 368 | name = Main.storyboard; 369 | sourceTree = ""; 370 | }; 371 | 42D76D8A1B6F0ADA00AEDFDF /* LaunchScreen.xib */ = { 372 | isa = PBXVariantGroup; 373 | children = ( 374 | 42D76D8B1B6F0ADA00AEDFDF /* Base */, 375 | ); 376 | name = LaunchScreen.xib; 377 | sourceTree = ""; 378 | }; 379 | /* End PBXVariantGroup section */ 380 | 381 | /* Begin XCBuildConfiguration section */ 382 | 42D76D991B6F0ADB00AEDFDF /* Debug */ = { 383 | isa = XCBuildConfiguration; 384 | buildSettings = { 385 | ALWAYS_SEARCH_USER_PATHS = NO; 386 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 387 | CLANG_CXX_LIBRARY = "libc++"; 388 | CLANG_ENABLE_MODULES = YES; 389 | CLANG_ENABLE_OBJC_ARC = YES; 390 | CLANG_WARN_BOOL_CONVERSION = YES; 391 | CLANG_WARN_CONSTANT_CONVERSION = YES; 392 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 393 | CLANG_WARN_EMPTY_BODY = YES; 394 | CLANG_WARN_ENUM_CONVERSION = YES; 395 | CLANG_WARN_INT_CONVERSION = YES; 396 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 397 | CLANG_WARN_UNREACHABLE_CODE = YES; 398 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 399 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 400 | COPY_PHASE_STRIP = NO; 401 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 402 | ENABLE_STRICT_OBJC_MSGSEND = YES; 403 | GCC_C_LANGUAGE_STANDARD = gnu99; 404 | GCC_DYNAMIC_NO_PIC = NO; 405 | GCC_NO_COMMON_BLOCKS = YES; 406 | GCC_OPTIMIZATION_LEVEL = 0; 407 | GCC_PREPROCESSOR_DEFINITIONS = ( 408 | "DEBUG=1", 409 | "$(inherited)", 410 | ); 411 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 412 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 413 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 414 | GCC_WARN_UNDECLARED_SELECTOR = YES; 415 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 416 | GCC_WARN_UNUSED_FUNCTION = YES; 417 | GCC_WARN_UNUSED_VARIABLE = YES; 418 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 419 | MTL_ENABLE_DEBUG_INFO = YES; 420 | ONLY_ACTIVE_ARCH = YES; 421 | SDKROOT = iphoneos; 422 | }; 423 | name = Debug; 424 | }; 425 | 42D76D9A1B6F0ADB00AEDFDF /* Release */ = { 426 | isa = XCBuildConfiguration; 427 | buildSettings = { 428 | ALWAYS_SEARCH_USER_PATHS = NO; 429 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 430 | CLANG_CXX_LIBRARY = "libc++"; 431 | CLANG_ENABLE_MODULES = YES; 432 | CLANG_ENABLE_OBJC_ARC = YES; 433 | CLANG_WARN_BOOL_CONVERSION = YES; 434 | CLANG_WARN_CONSTANT_CONVERSION = YES; 435 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 436 | CLANG_WARN_EMPTY_BODY = YES; 437 | CLANG_WARN_ENUM_CONVERSION = YES; 438 | CLANG_WARN_INT_CONVERSION = YES; 439 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 440 | CLANG_WARN_UNREACHABLE_CODE = YES; 441 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 442 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 443 | COPY_PHASE_STRIP = NO; 444 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 445 | ENABLE_NS_ASSERTIONS = NO; 446 | ENABLE_STRICT_OBJC_MSGSEND = YES; 447 | GCC_C_LANGUAGE_STANDARD = gnu99; 448 | GCC_NO_COMMON_BLOCKS = YES; 449 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 450 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 451 | GCC_WARN_UNDECLARED_SELECTOR = YES; 452 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 453 | GCC_WARN_UNUSED_FUNCTION = YES; 454 | GCC_WARN_UNUSED_VARIABLE = YES; 455 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 456 | MTL_ENABLE_DEBUG_INFO = NO; 457 | SDKROOT = iphoneos; 458 | VALIDATE_PRODUCT = YES; 459 | }; 460 | name = Release; 461 | }; 462 | 42D76D9C1B6F0ADB00AEDFDF /* Debug */ = { 463 | isa = XCBuildConfiguration; 464 | buildSettings = { 465 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 466 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 467 | INFOPLIST_FILE = OneNoteScroll/Info.plist; 468 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 469 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 470 | PRODUCT_NAME = "$(TARGET_NAME)"; 471 | }; 472 | name = Debug; 473 | }; 474 | 42D76D9D1B6F0ADB00AEDFDF /* Release */ = { 475 | isa = XCBuildConfiguration; 476 | buildSettings = { 477 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 478 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 479 | INFOPLIST_FILE = OneNoteScroll/Info.plist; 480 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 481 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 482 | PRODUCT_NAME = "$(TARGET_NAME)"; 483 | }; 484 | name = Release; 485 | }; 486 | 42D76D9F1B6F0ADB00AEDFDF /* Debug */ = { 487 | isa = XCBuildConfiguration; 488 | buildSettings = { 489 | BUNDLE_LOADER = "$(TEST_HOST)"; 490 | FRAMEWORK_SEARCH_PATHS = ( 491 | "$(SDKROOT)/Developer/Library/Frameworks", 492 | "$(inherited)", 493 | ); 494 | GCC_PREPROCESSOR_DEFINITIONS = ( 495 | "DEBUG=1", 496 | "$(inherited)", 497 | ); 498 | INFOPLIST_FILE = OneNoteScrollTests/Info.plist; 499 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 500 | PRODUCT_NAME = "$(TARGET_NAME)"; 501 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OneNoteScroll.app/OneNoteScroll"; 502 | }; 503 | name = Debug; 504 | }; 505 | 42D76DA01B6F0ADB00AEDFDF /* Release */ = { 506 | isa = XCBuildConfiguration; 507 | buildSettings = { 508 | BUNDLE_LOADER = "$(TEST_HOST)"; 509 | FRAMEWORK_SEARCH_PATHS = ( 510 | "$(SDKROOT)/Developer/Library/Frameworks", 511 | "$(inherited)", 512 | ); 513 | INFOPLIST_FILE = OneNoteScrollTests/Info.plist; 514 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 515 | PRODUCT_NAME = "$(TARGET_NAME)"; 516 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/OneNoteScroll.app/OneNoteScroll"; 517 | }; 518 | name = Release; 519 | }; 520 | /* End XCBuildConfiguration section */ 521 | 522 | /* Begin XCConfigurationList section */ 523 | 42D76D731B6F0ADA00AEDFDF /* Build configuration list for PBXProject "OneNoteScroll" */ = { 524 | isa = XCConfigurationList; 525 | buildConfigurations = ( 526 | 42D76D991B6F0ADB00AEDFDF /* Debug */, 527 | 42D76D9A1B6F0ADB00AEDFDF /* Release */, 528 | ); 529 | defaultConfigurationIsVisible = 0; 530 | defaultConfigurationName = Release; 531 | }; 532 | 42D76D9B1B6F0ADB00AEDFDF /* Build configuration list for PBXNativeTarget "OneNoteScroll" */ = { 533 | isa = XCConfigurationList; 534 | buildConfigurations = ( 535 | 42D76D9C1B6F0ADB00AEDFDF /* Debug */, 536 | 42D76D9D1B6F0ADB00AEDFDF /* Release */, 537 | ); 538 | defaultConfigurationIsVisible = 0; 539 | defaultConfigurationName = Release; 540 | }; 541 | 42D76D9E1B6F0ADB00AEDFDF /* Build configuration list for PBXNativeTarget "OneNoteScrollTests" */ = { 542 | isa = XCConfigurationList; 543 | buildConfigurations = ( 544 | 42D76D9F1B6F0ADB00AEDFDF /* Debug */, 545 | 42D76DA01B6F0ADB00AEDFDF /* Release */, 546 | ); 547 | defaultConfigurationIsVisible = 0; 548 | defaultConfigurationName = Release; 549 | }; 550 | /* End XCConfigurationList section */ 551 | }; 552 | rootObject = 42D76D701B6F0ADA00AEDFDF /* Project object */; 553 | } 554 | --------------------------------------------------------------------------------