├── README.md
├── BHBDrawBoarder
├── BHBDrawBoarder
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ ├── draft
│ │ │ ├── Contents.json
│ │ │ ├── close_draft.imageset
│ │ │ │ ├── 关闭@2x.png
│ │ │ │ ├── 关闭@3x.png
│ │ │ │ └── Contents.json
│ │ │ ├── redo_draft.imageset
│ │ │ │ ├── 重做@2x.png
│ │ │ │ ├── 重做@3x.png
│ │ │ │ └── Contents.json
│ │ │ ├── undo_draft.imageset
│ │ │ │ ├── 撤销@2x.png
│ │ │ │ ├── 撤销@3x.png
│ │ │ │ └── Contents.json
│ │ │ ├── delete_draft.imageset
│ │ │ │ ├── 删除@2x.png
│ │ │ │ ├── 删除@3x.png
│ │ │ │ └── Contents.json
│ │ │ ├── redo_draft_enable.imageset
│ │ │ │ ├── 重做禁用@2x.png
│ │ │ │ ├── 重做禁用@3x.png
│ │ │ │ └── Contents.json
│ │ │ ├── undo_draft_enable.imageset
│ │ │ │ ├── 撤销禁用@2x.png
│ │ │ │ ├── 撤销禁用@3x.png
│ │ │ │ └── Contents.json
│ │ │ ├── close_draft_enable.imageset
│ │ │ │ ├── 关闭禁用@2x.png
│ │ │ │ ├── 关闭禁用@3x.png
│ │ │ │ └── Contents.json
│ │ │ └── delete_draft_enable.imageset
│ │ │ │ ├── 删除禁用@2x.png
│ │ │ │ ├── 删除禁用@3x.png
│ │ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── BHBDrawBoarder
│ │ ├── BHBScrollView.h
│ │ ├── BHBPaintPath.h
│ │ ├── BHBScrollView.m
│ │ ├── BHBPaintPath.m
│ │ ├── BHBMyDrawer.h
│ │ ├── BHBDrawBoarderView.h
│ │ ├── BHBMyDrawer.m
│ │ └── BHBDrawBoarderView.m
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── ViewController.m
│ ├── Info.plist
│ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ ├── AppDelegate.m
│ └── Main.storyboard
├── BHBDrawBoarder.xcodeproj
│ ├── xcuserdata
│ │ └── bihongbo.xcuserdatad
│ │ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ │ └── xcschemes
│ │ │ ├── xcschememanagement.plist
│ │ │ └── BHBDrawBoarder.xcscheme
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── bihongbo.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── project.pbxproj
├── BHBDrawBoarderTests
│ ├── Info.plist
│ └── BHBDrawBoarderTests.m
└── BHBDrawBoarderUITests
│ ├── Info.plist
│ └── BHBDrawBoarderUITests.m
└── DrawBorderBugDemo
├── DrawBorderBugDemo.xcodeproj
├── xcuserdata
│ ├── bihongbo.xcuserdatad
│ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ │ ├── xcschememanagement.plist
│ │ │ └── DrawBorderBugDemo.xcscheme
│ └── dasheng.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── DrawBorderBugDemo.xcscheme
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ ├── dasheng.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ │ └── bihongbo.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── project.pbxproj
├── DrawBorderBugDemo
├── BHBDrawView.h
├── ViewController.h
├── BHBLayerDelegate.h
├── AppDelegate.h
├── main.m
├── BHBLayerDelegate.m
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── ViewController.m
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── BHBDrawView.m
└── AppDelegate.m
├── DrawBorderBugDemoTests
├── Info.plist
└── DrawBorderBugDemoTests.m
└── DrawBorderBugDemoUITests
├── Info.plist
└── DrawBorderBugDemoUITests.m
/README.md:
--------------------------------------------------------------------------------
1 | # BHBDrawBoarderDemo
2 | 仿写猿题库练题画板功能
3 | 博客地址:http://bihongbo.com/2016/01/03/memoryGhostdrawRect/
4 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder.xcodeproj/xcuserdata/bihongbo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/close_draft.imageset/关闭@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/close_draft.imageset/关闭@2x.png
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/close_draft.imageset/关闭@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/close_draft.imageset/关闭@3x.png
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/redo_draft.imageset/重做@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/redo_draft.imageset/重做@2x.png
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/redo_draft.imageset/重做@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/redo_draft.imageset/重做@3x.png
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/undo_draft.imageset/撤销@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/undo_draft.imageset/撤销@2x.png
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/undo_draft.imageset/撤销@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/undo_draft.imageset/撤销@3x.png
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo.xcodeproj/xcuserdata/bihongbo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/delete_draft.imageset/删除@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/delete_draft.imageset/删除@2x.png
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/delete_draft.imageset/删除@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/delete_draft.imageset/删除@3x.png
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/redo_draft_enable.imageset/重做禁用@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/redo_draft_enable.imageset/重做禁用@2x.png
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/redo_draft_enable.imageset/重做禁用@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/redo_draft_enable.imageset/重做禁用@3x.png
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/undo_draft_enable.imageset/撤销禁用@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/undo_draft_enable.imageset/撤销禁用@2x.png
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/undo_draft_enable.imageset/撤销禁用@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/undo_draft_enable.imageset/撤销禁用@3x.png
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/close_draft_enable.imageset/关闭禁用@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/close_draft_enable.imageset/关闭禁用@2x.png
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/close_draft_enable.imageset/关闭禁用@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/close_draft_enable.imageset/关闭禁用@3x.png
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/delete_draft_enable.imageset/删除禁用@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/delete_draft_enable.imageset/删除禁用@2x.png
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/delete_draft_enable.imageset/删除禁用@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/delete_draft_enable.imageset/删除禁用@3x.png
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder.xcodeproj/project.xcworkspace/xcuserdata/bihongbo.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/BHBDrawBoarder/BHBDrawBoarder.xcodeproj/project.xcworkspace/xcuserdata/bihongbo.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo.xcodeproj/project.xcworkspace/xcuserdata/dasheng.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/DrawBorderBugDemo/DrawBorderBugDemo.xcodeproj/project.xcworkspace/xcuserdata/dasheng.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo/BHBDrawView.h:
--------------------------------------------------------------------------------
1 | //
2 | // BHBDrawView.h
3 | // DrawBorderBugDemo
4 | //
5 | // Created by bihongbo on 16/1/11.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface BHBDrawView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo.xcodeproj/project.xcworkspace/xcuserdata/bihongbo.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bb-coder/BHBDrawBoarderDemo/HEAD/DrawBorderBugDemo/DrawBorderBugDemo.xcodeproj/project.xcworkspace/xcuserdata/bihongbo.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/BHBDrawBoarder/BHBScrollView.h:
--------------------------------------------------------------------------------
1 | //
2 | // BHBDrawView.h
3 | // BHBDrawBoarder
4 | //
5 | // Created by bihongbo on 16/1/4.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface BHBScrollView : UIScrollView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // BHBDrawBoarder
4 | //
5 | // Created by bihongbo on 16/1/4.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // DrawBorderBugDemo
4 | //
5 | // Created by bihongbo on 16/1/11.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo/BHBLayerDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // BHBLayerDelegate.h
3 | // DrawBorderBugDemo
4 | //
5 | // Created by dasheng on 16/2/29.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface BHBLayerDelegate : NSObject
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // BHBDrawBoarder
4 | //
5 | // Created by bihongbo on 16/1/4.
6 | // Copyright © 2016年 bihongbo. 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 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DrawBorderBugDemo
4 | //
5 | // Created by bihongbo on 16/1/11.
6 | // Copyright © 2016年 bihongbo. 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 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/BHBDrawBoarder/BHBPaintPath.h:
--------------------------------------------------------------------------------
1 | //
2 | // BHBPaintPath.h
3 | // BHBDrawBoarder
4 | //
5 | // Created by bihongbo on 16/1/4.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface BHBPaintPath : UIBezierPath
12 |
13 | + (instancetype)paintPathWithLineWidth:(CGFloat)width
14 | startPoint:(CGPoint)startP;
15 | @end
16 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // BHBDrawBoarder
4 | //
5 | // Created by bihongbo on 16/1/4.
6 | // Copyright © 2016年 bihongbo. 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 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DrawBorderBugDemo
4 | //
5 | // Created by bihongbo on 16/1/11.
6 | // Copyright © 2016年 bihongbo. 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 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/close_draft.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "关闭@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "关闭@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/delete_draft.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "删除@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "删除@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/redo_draft.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "重做@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "重做@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/undo_draft.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "撤销@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "撤销@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/close_draft_enable.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "关闭禁用@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "关闭禁用@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/delete_draft_enable.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "删除禁用@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "删除禁用@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/redo_draft_enable.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "重做禁用@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "重做禁用@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.xcassets/draft/undo_draft_enable.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "撤销禁用@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "撤销禁用@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/BHBDrawBoarder/BHBScrollView.m:
--------------------------------------------------------------------------------
1 | //
2 | // BHBDrawView.m
3 | // BHBDrawBoarder
4 | //
5 | // Created by bihongbo on 16/1/4.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import "BHBScrollView.h"
10 |
11 | @implementation BHBScrollView
12 |
13 | - (BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view
14 | {
15 | if ([event allTouches].count == 1) {
16 | return YES;
17 | }
18 | return NO;
19 |
20 | }
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo/BHBLayerDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // BHBLayerDelegate.m
3 | // DrawBorderBugDemo
4 | //
5 | // Created by dasheng on 16/2/29.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import "BHBLayerDelegate.h"
10 |
11 | @implementation BHBLayerDelegate
12 |
13 | - (void)drawLayer:(CALayer*)layer inContext:(CGContextRef)ctx {
14 |
15 | // CGContextAddEllipseInRect(ctx, CGRectMake(0,0,100,100));
16 | //
17 | // CGContextSetFillColorWithColor(ctx, [UIColor blueColor].CGColor);
18 | //
19 | // CGContextFillPath(ctx);
20 | }
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/BHBDrawBoarder/BHBPaintPath.m:
--------------------------------------------------------------------------------
1 | //
2 | // BHBPaintPath.m
3 | // BHBDrawBoarder
4 | //
5 | // Created by bihongbo on 16/1/4.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import "BHBPaintPath.h"
10 |
11 | @implementation BHBPaintPath
12 |
13 | + (instancetype)paintPathWithLineWidth:(CGFloat)width
14 | startPoint:(CGPoint)startP
15 | {
16 | BHBPaintPath * path = [[self alloc] init];
17 | path.lineWidth = width;
18 | path.lineCapStyle = kCGLineCapRound; //线条拐角
19 | path.lineJoinStyle = kCGLineCapRound; //终点处理
20 | [path moveToPoint:startP];
21 | return path;
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/BHBDrawBoarder/BHBMyDrawer.h:
--------------------------------------------------------------------------------
1 | //
2 | // BHBMyDrawer.h
3 | // BHBDrawBoarder
4 | //
5 | // Created by bihongbo on 16/1/4.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface BHBMyDrawer : UIView
12 | @property (nonatomic, assign) CGFloat width;
13 |
14 | /**
15 | * 撤销的线条数组
16 | */
17 | @property (nonatomic, strong)NSMutableArray * canceledLines;
18 | /**
19 | * 线条数组
20 | */
21 | @property (nonatomic, strong)NSMutableArray * lines;
22 |
23 | /**
24 | * 清屏
25 | */
26 | - (void)clearScreen;
27 |
28 | /**
29 | * 撤销
30 | */
31 | - (void)undo;
32 |
33 | /**
34 | * 恢复
35 | */
36 | - (void)redo;
37 | @end
38 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // BHBDrawBoarder
4 | //
5 | // Created by bihongbo on 16/1/4.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "BHBDrawBoarderView.h"
11 |
12 | @interface ViewController ()
13 |
14 | @property (nonatomic,strong) BHBDrawBoarderView * bv;
15 |
16 | @end
17 |
18 | @implementation ViewController
19 |
20 | - (void)viewDidLoad {
21 | [super viewDidLoad];
22 |
23 | }
24 |
25 | - (IBAction)popDrawView:(id)sender {
26 | self.bv = [[BHBDrawBoarderView alloc] initWithFrame:CGRectZero];
27 | // self.bv.linesInfo = @[];
28 | // self.bv.canceledLinesInfo = @[];
29 | [self.bv show];
30 | }
31 |
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/BHBDrawBoarder/BHBDrawBoarderView.h:
--------------------------------------------------------------------------------
1 | //
2 | // BHBDrawBoarderView.h
3 | // BHBDrawBoarder
4 | //
5 | // Created by bihongbo on 16/1/4.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef void(^draftInfoBlock)(NSInteger num, NSArray * linesInfo, NSArray * canceledLinesInfo);
12 |
13 | @interface BHBDrawBoarderView : UIView
14 |
15 | @property (nonatomic, strong)NSIndexPath *index;
16 | @property (nonatomic, assign)NSInteger num;
17 | @property (nonatomic, strong)NSArray * linesInfo;
18 | @property (nonatomic, strong)NSArray * canceledLinesInfo;
19 | @property (nonatomic, copy)draftInfoBlock draftInfoBlock;
20 |
21 | - (void)show;
22 |
23 | - (void)dismiss;
24 |
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Assets.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 | }
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo/Assets.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 | }
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarderTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
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 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarderUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
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 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
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 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemoUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
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 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder.xcodeproj/xcuserdata/bihongbo.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | BHBDrawBoarder.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | F7A4FD7A1C3A6775005BEBD8
16 |
17 | primary
18 |
19 |
20 | F7A4FD931C3A6776005BEBD8
21 |
22 | primary
23 |
24 |
25 | F7A4FD9E1C3A6776005BEBD8
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo.xcodeproj/xcuserdata/bihongbo.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DrawBorderBugDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | F73E1D1D1C42B9DA00CC728F
16 |
17 | primary
18 |
19 |
20 | F73E1D361C42B9DB00CC728F
21 |
22 | primary
23 |
24 |
25 | F73E1D411C42B9DB00CC728F
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo.xcodeproj/xcuserdata/dasheng.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DrawBorderBugDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | F73E1D1D1C42B9DA00CC728F
16 |
17 | primary
18 |
19 |
20 | F73E1D361C42B9DB00CC728F
21 |
22 | primary
23 |
24 |
25 | F73E1D411C42B9DB00CC728F
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarderTests/BHBDrawBoarderTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // BHBDrawBoarderTests.m
3 | // BHBDrawBoarderTests
4 | //
5 | // Created by bihongbo on 16/1/4.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface BHBDrawBoarderTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation BHBDrawBoarderTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemoTests/DrawBorderBugDemoTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // DrawBorderBugDemoTests.m
3 | // DrawBorderBugDemoTests
4 | //
5 | // Created by bihongbo on 16/1/11.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DrawBorderBugDemoTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation DrawBorderBugDemoTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarderUITests/BHBDrawBoarderUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // BHBDrawBoarderUITests.m
3 | // BHBDrawBoarderUITests
4 | //
5 | // Created by bihongbo on 16/1/4.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface BHBDrawBoarderUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation BHBDrawBoarderUITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemoUITests/DrawBorderBugDemoUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // DrawBorderBugDemoUITests.m
3 | // DrawBorderBugDemoUITests
4 | //
5 | // Created by bihongbo on 16/1/11.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DrawBorderBugDemoUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation DrawBorderBugDemoUITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // DrawBorderBugDemo
4 | //
5 | // Created by bihongbo on 16/1/11.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "BHBDrawView.h"
11 | #import "BHBLayerDelegate.h"
12 |
13 | @interface ViewController (){
14 |
15 | BHBLayerDelegate *_layerDeleagete;
16 | CALayer *_layer;
17 | }
18 |
19 | @end
20 |
21 | @implementation ViewController
22 |
23 | - (void)viewDidLoad {
24 | [super viewDidLoad];
25 | }
26 |
27 |
28 | - (IBAction)popView:(id)sender {
29 |
30 | BHBDrawView * dv = [[BHBDrawView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width * 5, self.view.frame.size.height * 5)];//这里的5你可以随意改变来试试内存情况.
31 | dv.center = self.view.center;
32 | dv.backgroundColor = [UIColor whiteColor];
33 | [self.view addSubview:dv];
34 |
35 | }
36 |
37 | - (IBAction)popLayerView:(id)sender {
38 |
39 | _layerDeleagete = [[BHBLayerDelegate alloc] init];
40 |
41 | //1.创建自定义的layer
42 | _layer =[CALayer layer];
43 | //2.设置layer的属性
44 | _layer.backgroundColor= [UIColor whiteColor].CGColor;
45 | _layer.frame=CGRectMake(0, 0, self.view.frame.size.width * 5, self.view.frame.size.height * 5);
46 | _layer.delegate = _layerDeleagete;
47 | [_layer setNeedsDisplay];
48 | //3.添加layer
49 | [self.view.layer addSublayer:_layer];
50 | }
51 |
52 | - (void)dealloc{
53 |
54 | _layer.delegate = nil;
55 | }
56 |
57 | @end
58 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Base.lproj/LaunchScreen.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 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo/Base.lproj/LaunchScreen.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 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo/BHBDrawView.m:
--------------------------------------------------------------------------------
1 | //
2 | // BHBDrawView.m
3 | // DrawBorderBugDemo
4 | //
5 | // Created by bihongbo on 16/1/11.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import "BHBDrawView.h"
10 |
11 |
12 | @implementation BHBDrawView
13 |
14 |
15 | //这是是用drawRect绘图
16 | -(void)drawRect:(CGRect)rect{
17 |
18 | // CGContextRef ctx = UIGraphicsGetCurrentContext();
19 | //
20 | // CGContextSaveGState(ctx);
21 | // [[UIColor brownColor] set];
22 | // CGContextFillRect(ctx, CGRectMake(0, 0, self.frame.size.width, self.frame.size.height));
23 | // CGContextRestoreGState(ctx);
24 | //
25 | // CGContextSaveGState(ctx);
26 | // [[UIColor whiteColor] set];
27 | // CGContextFillRect(ctx, CGRectMake(self.frame.size.width / 2 - 25, self.frame.size.height / 2 - 25, 50, 50));
28 | // CGContextRestoreGState(ctx);
29 | }
30 |
31 | //这是是用专有图层CAShapeLayer
32 | //- (instancetype)initWithFrame:(CGRect)frame
33 | //{
34 | // self = [super initWithFrame:frame];
35 | // if (self) {
36 | //
37 | // CAShapeLayer * brownRectLayer = [CAShapeLayer layer];
38 | // brownRectLayer.frame = CGRectMake(0, 0, frame.size.width, frame.size.height);
39 | // UIBezierPath * path = [UIBezierPath bezierPathWithRect:CGRectMake(0, 0, frame.size.width, frame.size.height)];
40 | // brownRectLayer.path = path.CGPath;
41 | // brownRectLayer.fillColor = [UIColor brownColor].CGColor;
42 | // [self.layer addSublayer:brownRectLayer];
43 | //
44 | // CAShapeLayer * whiteRectLayer = [CAShapeLayer layer];
45 | // whiteRectLayer.frame = CGRectMake(0, 0, frame.size.width, frame.size.height);
46 | // UIBezierPath * path1 = [UIBezierPath bezierPathWithRect:CGRectMake(frame.size.width / 2 - 25, frame.size.height / 2 - 25, 50, 50)];
47 | // whiteRectLayer.path = path1.CGPath;
48 | // whiteRectLayer.fillColor = [UIColor whiteColor].CGColor;
49 | // [self.layer addSublayer:whiteRectLayer];
50 | //
51 | // }
52 | // return self;
53 | //}
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // BHBDrawBoarder
4 | //
5 | // Created by bihongbo on 16/1/4.
6 | // Copyright © 2016年 bihongbo. 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 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // DrawBorderBugDemo
4 | //
5 | // Created by bihongbo on 16/1/11.
6 | // Copyright © 2016年 bihongbo. 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 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
27 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/BHBDrawBoarder/BHBMyDrawer.m:
--------------------------------------------------------------------------------
1 | //
2 | // BHBMyDrawer.m
3 | // BHBDrawBoarder
4 | //
5 | // Created by bihongbo on 16/1/4.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 |
9 | #import "BHBMyDrawer.h"
10 | #import "BHBPaintPath.h"
11 | @interface BHBMyDrawer ()
12 |
13 |
14 | @property (nonatomic, strong)BHBPaintPath * path;
15 | @property (nonatomic, strong)CAShapeLayer * slayer;
16 |
17 | @end
18 |
19 | @implementation BHBMyDrawer
20 |
21 |
22 | - (NSMutableArray *)lines
23 | {
24 | if (_lines == nil) {
25 | _lines = [NSMutableArray array];
26 | }
27 | return _lines;
28 | }
29 |
30 |
31 | - (NSMutableArray *)canceledLines
32 | {
33 | if (_canceledLines == nil) {
34 | _canceledLines = [NSMutableArray array];
35 | }
36 | return _canceledLines;
37 | }
38 |
39 |
40 | - (instancetype)initWithFrame:(CGRect)frame
41 | {
42 | self = [super initWithFrame:frame];
43 | if (self) {
44 | _width = 3;
45 | }
46 | return self;
47 | }
48 |
49 | // 根据touches集合获取对应的触摸点
50 | - (CGPoint)pointWithTouches:(NSSet *)touches
51 | {
52 | UITouch *touch = [touches anyObject];
53 |
54 | return [touch locationInView:self];
55 | }
56 |
57 |
58 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
59 | {
60 | CGPoint startP = [self pointWithTouches:touches];
61 |
62 | if ([event allTouches].count == 1) {
63 |
64 | BHBPaintPath *path = [BHBPaintPath paintPathWithLineWidth:_width
65 | startPoint:startP];
66 | _path = path;
67 |
68 | CAShapeLayer * slayer = [CAShapeLayer layer];
69 | slayer.path = path.CGPath;
70 | slayer.backgroundColor = [UIColor clearColor].CGColor;
71 | slayer.fillColor = [UIColor clearColor].CGColor;
72 | slayer.lineCap = kCALineCapRound;
73 | slayer.lineJoin = kCALineJoinRound;
74 | slayer.strokeColor = [UIColor blackColor].CGColor;
75 | slayer.lineWidth = path.lineWidth;
76 | [self.layer addSublayer:slayer];
77 | _slayer = slayer;
78 | [[self mutableArrayValueForKey:@"canceledLines"] removeAllObjects];
79 | [[self mutableArrayValueForKey:@"lines"] addObject:_slayer];
80 |
81 | }
82 | }
83 |
84 | - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
85 | {
86 | // 获取移动点
87 | CGPoint moveP = [self pointWithTouches:touches];
88 |
89 | if ([event allTouches].count > 1){
90 |
91 | [self.superview touchesMoved:touches withEvent:event];
92 |
93 | }else if ([event allTouches].count == 1) {
94 |
95 | [_path addLineToPoint:moveP];
96 |
97 | _slayer.path = _path.CGPath;
98 |
99 | }
100 |
101 |
102 | }
103 |
104 | - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
105 | {
106 | if ([event allTouches].count > 1){
107 | [self.superview touchesMoved:touches withEvent:event];
108 | }
109 | }
110 |
111 | /**
112 | * 画线
113 | */
114 | - (void)drawLine{
115 |
116 | [self.layer addSublayer:self.lines.lastObject];
117 |
118 | }
119 | /**
120 | * 清屏
121 | */
122 | - (void)clearScreen
123 | {
124 |
125 | if (!self.lines.count) return ;
126 |
127 | [self.lines makeObjectsPerformSelector:@selector(removeFromSuperlayer)];
128 | [[self mutableArrayValueForKey:@"lines"] removeAllObjects];
129 | [[self mutableArrayValueForKey:@"canceledLines"] removeAllObjects];
130 |
131 | }
132 |
133 | /**
134 | * 撤销
135 | */
136 | - (void)undo
137 | {
138 | //当前屏幕已经清空,就不能撤销了
139 | if (!self.lines.count) return;
140 | [[self mutableArrayValueForKey:@"canceledLines"] addObject:self.lines.lastObject];
141 | [self.lines.lastObject removeFromSuperlayer];
142 | [[self mutableArrayValueForKey:@"lines"] removeLastObject];
143 |
144 | }
145 |
146 |
147 | /**
148 | * 恢复
149 | */
150 | - (void)redo
151 | {
152 | //当没有做过撤销操作,就不能恢复了
153 | if (!self.canceledLines.count) return;
154 | [[self mutableArrayValueForKey:@"lines"] addObject:self.canceledLines.lastObject];
155 | [[self mutableArrayValueForKey:@"canceledLines"] removeLastObject];
156 | [self drawLine];
157 |
158 | }
159 |
160 |
161 | @end
162 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder.xcodeproj/xcuserdata/bihongbo.xcuserdatad/xcschemes/BHBDrawBoarder.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
43 |
49 |
50 |
51 |
52 |
53 |
59 |
60 |
61 |
62 |
63 |
64 |
74 |
76 |
82 |
83 |
84 |
85 |
86 |
87 |
93 |
95 |
101 |
102 |
103 |
104 |
106 |
107 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo.xcodeproj/xcuserdata/dasheng.xcuserdatad/xcschemes/DrawBorderBugDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
43 |
49 |
50 |
51 |
52 |
53 |
59 |
60 |
61 |
62 |
63 |
64 |
74 |
76 |
82 |
83 |
84 |
85 |
86 |
87 |
93 |
95 |
101 |
102 |
103 |
104 |
106 |
107 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo.xcodeproj/xcuserdata/bihongbo.xcuserdatad/xcschemes/DrawBorderBugDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
43 |
49 |
50 |
51 |
52 |
53 |
59 |
60 |
61 |
62 |
63 |
64 |
74 |
76 |
82 |
83 |
84 |
85 |
86 |
87 |
93 |
95 |
101 |
102 |
103 |
104 |
106 |
107 |
110 |
111 |
112 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder/BHBDrawBoarder/BHBDrawBoarderView.m:
--------------------------------------------------------------------------------
1 | //
2 | // BHBDrawBoarderView.m
3 | // BHBDrawBoarder
4 | //
5 | // Created by bihongbo on 16/1/4.
6 | // Copyright © 2016年 bihongbo. All rights reserved.
7 | //
8 | // 屏幕尺寸
9 | #define SCREEN_SIZE [UIScreen mainScreen].bounds.size
10 |
11 | #import "BHBDrawBoarderView.h"
12 | #import "BHBScrollView.h"
13 | #import "BHBMyDrawer.h"
14 | @interface BHBDrawBoarderView ()
15 | {
16 |
17 | /** 工具条的view */
18 | UIView *_toolView;
19 |
20 | /** 画板view */
21 | BHBScrollView *_boardView;
22 |
23 | }
24 |
25 |
26 | /** 按钮图片 */
27 | @property (nonatomic, strong) NSArray * buttonImgNames;
28 | /** 按钮不可用图片 */
29 | @property (nonatomic, strong) NSArray * btnEnableImgNames;
30 |
31 | @property (nonatomic, strong)BHBMyDrawer * myDrawer;
32 |
33 | @property (nonatomic, strong)UIButton * delAllBtn;//删除
34 | @property (nonatomic, strong)UIButton * fwBtn;//上一步
35 | @property (nonatomic, strong)UIButton * ntBtn;//下一步
36 |
37 |
38 | @end
39 |
40 |
41 | @implementation BHBDrawBoarderView
42 |
43 | - (BHBMyDrawer *)myDrawer
44 | {
45 | if (_myDrawer == nil) {
46 | _myDrawer = [[BHBMyDrawer alloc] initWithFrame:CGRectMake(0, 0, SCREEN_SIZE.width*5, SCREEN_SIZE.height*2)];
47 | _myDrawer.layer.backgroundColor = [UIColor clearColor].CGColor;
48 | }
49 | return _myDrawer;
50 |
51 | }
52 |
53 |
54 | - (NSArray *)btnEnableImgNames
55 | {
56 | if (_btnEnableImgNames == nil) {
57 | _btnEnableImgNames = @[@"close_draft_enable",@"delete_draft_enable",@"undo_draft_enable",@"redo_draft_enable"];
58 | }
59 | return _btnEnableImgNames;
60 | }
61 |
62 |
63 | - (NSArray *)buttonImgNames
64 | {
65 | if (_buttonImgNames == nil) {
66 | _buttonImgNames = @[@"close_draft",@"delete_draft",@"undo_draft",@"redo_draft"];
67 | }
68 | return _buttonImgNames;
69 | }
70 |
71 |
72 | - (instancetype)initWithFrame:(CGRect)frame
73 | {
74 | frame = CGRectMake(0, SCREEN_SIZE.height, SCREEN_SIZE.width, SCREEN_SIZE.height);
75 | self = [super initWithFrame:frame];
76 | if (self) {
77 |
78 | //顶部工具条
79 | UIView * toolV = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_SIZE.width, 64)];
80 | toolV.backgroundColor = [UIColor blueColor];
81 | [self addSubview:toolV];
82 | _toolView = toolV;
83 |
84 | //顶部按钮
85 | CGFloat btnW = toolV.bounds.size.width/4.0f;
86 | CGFloat btnH =toolV.bounds.size.height-20;
87 |
88 | for (int i = 0; i<4; i++) {
89 | UIButton * btn = [UIButton buttonWithType:UIButtonTypeCustom];
90 | btn.frame = CGRectMake(i*btnW, 20, btnW, btnH);
91 |
92 | UIImage * img = [UIImage imageNamed:self.buttonImgNames[i]];
93 | UIImage * imgDis = [UIImage imageNamed:self.btnEnableImgNames[i]];
94 | [btn setImage:img forState:UIControlStateNormal];
95 | [btn setImage:img forState:UIControlStateSelected];
96 | [btn setImage:imgDis forState:UIControlStateDisabled];
97 | [btn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchDown];
98 | btn.tag = i+100;
99 | [_toolView addSubview:btn];
100 | if (i > 0) [btn setEnabled:NO];
101 | }
102 |
103 | self.delAllBtn = (UIButton *)[_toolView viewWithTag:101];
104 | self.fwBtn = (UIButton *)[_toolView viewWithTag:102];
105 | self.ntBtn = (UIButton *)[_toolView viewWithTag:103];
106 |
107 | [self.myDrawer addObserver:self forKeyPath:@"lines" options:NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld context:nil];
108 | [self.myDrawer addObserver:self forKeyPath:@"canceledLines" options:NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld context:nil];
109 |
110 | //画板view
111 | BHBScrollView * boardV = [[BHBScrollView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(toolV.frame), SCREEN_SIZE.width, SCREEN_SIZE.height - CGRectGetMaxY(toolV.frame))];
112 |
113 | boardV.layer.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:.15].CGColor;
114 | [boardV setUserInteractionEnabled:YES];
115 | [boardV setScrollEnabled:YES];
116 | [boardV setMultipleTouchEnabled:YES];
117 | [boardV addSubview:self.myDrawer];
118 | [boardV setContentSize:self.myDrawer.frame.size];
119 | [boardV setDelaysContentTouches:NO];
120 | [boardV setCanCancelContentTouches:NO];
121 | [self insertSubview:boardV belowSubview:_toolView];
122 |
123 | _boardView = boardV;
124 |
125 | [[UIApplication sharedApplication].keyWindow addSubview:self];
126 |
127 | }
128 | return self;
129 | }
130 |
131 |
132 | - (void)show {
133 |
134 | _myDrawer.lines = [NSMutableArray arrayWithArray:self.linesInfo];
135 | for (CALayer * layer in _myDrawer.lines) {
136 | [_myDrawer.layer addSublayer:layer];
137 | }
138 |
139 | [UIView animateWithDuration:.3f
140 | delay:0
141 | options:UIViewAnimationOptionCurveEaseOut
142 | animations:^{
143 |
144 | CGRect frame = self.frame;
145 | frame.origin.y -= frame.size.height ;
146 | [self setFrame:frame];
147 |
148 | }completion:nil];
149 | }
150 |
151 | - (void)dismiss{
152 |
153 | [UIView animateWithDuration:0.3f
154 | delay:0
155 | options:UIViewAnimationOptionCurveEaseOut
156 | animations:^{
157 |
158 | CGRect frame = self.frame;
159 | frame.origin.y += frame.size.height ;
160 | [self setFrame:frame];
161 |
162 | }
163 | completion:^(BOOL finished) {
164 |
165 | if (finished) {
166 | if (self.draftInfoBlock) {
167 | self.draftInfoBlock(self.num, _myDrawer.lines, _myDrawer.canceledLines);
168 | }
169 | }
170 |
171 | [self removeFromSuperview];
172 |
173 | [self.myDrawer removeObserver:self forKeyPath:@"canceledLines"];
174 | [self.myDrawer removeObserver:self forKeyPath:@"lines"];
175 | }];
176 | }
177 |
178 |
179 | - (void)btnClick:(UIButton *)sender
180 | {
181 | switch (sender.tag) {
182 | case 100:
183 | [self dismiss];
184 | break;
185 | case 101:
186 | [_myDrawer clearScreen];
187 | break;
188 | case 102:
189 | [_myDrawer undo];
190 | break;
191 | case 103:
192 | [_myDrawer redo];
193 | break;
194 | default:
195 | break;
196 | }
197 | }
198 |
199 | - (void)observeValueForKeyPath:(NSString *)keyPath
200 | ofObject:(id)object
201 | change:(NSDictionary *)change
202 | context:(void *)context
203 | {
204 | if([keyPath isEqualToString:@"lines"]){
205 | NSMutableArray * lines = [_myDrawer mutableArrayValueForKey:@"lines"];
206 | if (lines.count) {
207 | [self.delAllBtn setEnabled:YES];
208 | [self.fwBtn setEnabled:YES];
209 |
210 | }else{
211 | [self.delAllBtn setEnabled:NO];
212 | [self.fwBtn setEnabled:NO];
213 | }
214 | }else if([keyPath isEqualToString:@"canceledLines"]){
215 | NSMutableArray * canceledLines = [_myDrawer mutableArrayValueForKey:@"canceledLines"];
216 | if (canceledLines.count) {
217 | [self.ntBtn setEnabled:YES];
218 | }else{
219 | [self.ntBtn setEnabled:NO];
220 |
221 | }
222 |
223 | }
224 | }
225 |
226 |
227 |
228 | @end
229 |
--------------------------------------------------------------------------------
/DrawBorderBugDemo/DrawBorderBugDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 131090991C843DBF00626E0D /* BHBLayerDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 131090981C843DBF00626E0D /* BHBLayerDelegate.m */; };
11 | F73E1D231C42B9DA00CC728F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F73E1D221C42B9DA00CC728F /* main.m */; };
12 | F73E1D261C42B9DA00CC728F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F73E1D251C42B9DA00CC728F /* AppDelegate.m */; };
13 | F73E1D291C42B9DA00CC728F /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F73E1D281C42B9DA00CC728F /* ViewController.m */; };
14 | F73E1D2C1C42B9DA00CC728F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F73E1D2A1C42B9DA00CC728F /* Main.storyboard */; };
15 | F73E1D2E1C42B9DA00CC728F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F73E1D2D1C42B9DA00CC728F /* Assets.xcassets */; };
16 | F73E1D311C42B9DA00CC728F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F73E1D2F1C42B9DA00CC728F /* LaunchScreen.storyboard */; };
17 | F73E1D3C1C42B9DB00CC728F /* DrawBorderBugDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F73E1D3B1C42B9DB00CC728F /* DrawBorderBugDemoTests.m */; };
18 | F73E1D471C42B9DB00CC728F /* DrawBorderBugDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = F73E1D461C42B9DB00CC728F /* DrawBorderBugDemoUITests.m */; };
19 | F73E1D561C42BA0300CC728F /* BHBDrawView.m in Sources */ = {isa = PBXBuildFile; fileRef = F73E1D551C42BA0300CC728F /* BHBDrawView.m */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXContainerItemProxy section */
23 | F73E1D381C42B9DB00CC728F /* PBXContainerItemProxy */ = {
24 | isa = PBXContainerItemProxy;
25 | containerPortal = F73E1D161C42B9DA00CC728F /* Project object */;
26 | proxyType = 1;
27 | remoteGlobalIDString = F73E1D1D1C42B9DA00CC728F;
28 | remoteInfo = DrawBorderBugDemo;
29 | };
30 | F73E1D431C42B9DB00CC728F /* PBXContainerItemProxy */ = {
31 | isa = PBXContainerItemProxy;
32 | containerPortal = F73E1D161C42B9DA00CC728F /* Project object */;
33 | proxyType = 1;
34 | remoteGlobalIDString = F73E1D1D1C42B9DA00CC728F;
35 | remoteInfo = DrawBorderBugDemo;
36 | };
37 | /* End PBXContainerItemProxy section */
38 |
39 | /* Begin PBXFileReference section */
40 | 131090971C843DBF00626E0D /* BHBLayerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BHBLayerDelegate.h; sourceTree = ""; };
41 | 131090981C843DBF00626E0D /* BHBLayerDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BHBLayerDelegate.m; sourceTree = ""; };
42 | F73E1D1E1C42B9DA00CC728F /* DrawBorderBugDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DrawBorderBugDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
43 | F73E1D221C42B9DA00CC728F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
44 | F73E1D241C42B9DA00CC728F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
45 | F73E1D251C42B9DA00CC728F /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
46 | F73E1D271C42B9DA00CC728F /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
47 | F73E1D281C42B9DA00CC728F /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
48 | F73E1D2B1C42B9DA00CC728F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
49 | F73E1D2D1C42B9DA00CC728F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
50 | F73E1D301C42B9DA00CC728F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
51 | F73E1D321C42B9DA00CC728F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
52 | F73E1D371C42B9DB00CC728F /* DrawBorderBugDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DrawBorderBugDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
53 | F73E1D3B1C42B9DB00CC728F /* DrawBorderBugDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DrawBorderBugDemoTests.m; sourceTree = ""; };
54 | F73E1D3D1C42B9DB00CC728F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
55 | F73E1D421C42B9DB00CC728F /* DrawBorderBugDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DrawBorderBugDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
56 | F73E1D461C42B9DB00CC728F /* DrawBorderBugDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DrawBorderBugDemoUITests.m; sourceTree = ""; };
57 | F73E1D481C42B9DB00CC728F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
58 | F73E1D541C42BA0300CC728F /* BHBDrawView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BHBDrawView.h; sourceTree = ""; };
59 | F73E1D551C42BA0300CC728F /* BHBDrawView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BHBDrawView.m; sourceTree = ""; };
60 | /* End PBXFileReference section */
61 |
62 | /* Begin PBXFrameworksBuildPhase section */
63 | F73E1D1B1C42B9DA00CC728F /* Frameworks */ = {
64 | isa = PBXFrameworksBuildPhase;
65 | buildActionMask = 2147483647;
66 | files = (
67 | );
68 | runOnlyForDeploymentPostprocessing = 0;
69 | };
70 | F73E1D341C42B9DB00CC728F /* Frameworks */ = {
71 | isa = PBXFrameworksBuildPhase;
72 | buildActionMask = 2147483647;
73 | files = (
74 | );
75 | runOnlyForDeploymentPostprocessing = 0;
76 | };
77 | F73E1D3F1C42B9DB00CC728F /* Frameworks */ = {
78 | isa = PBXFrameworksBuildPhase;
79 | buildActionMask = 2147483647;
80 | files = (
81 | );
82 | runOnlyForDeploymentPostprocessing = 0;
83 | };
84 | /* End PBXFrameworksBuildPhase section */
85 |
86 | /* Begin PBXGroup section */
87 | F73E1D151C42B9DA00CC728F = {
88 | isa = PBXGroup;
89 | children = (
90 | F73E1D201C42B9DA00CC728F /* DrawBorderBugDemo */,
91 | F73E1D3A1C42B9DB00CC728F /* DrawBorderBugDemoTests */,
92 | F73E1D451C42B9DB00CC728F /* DrawBorderBugDemoUITests */,
93 | F73E1D1F1C42B9DA00CC728F /* Products */,
94 | );
95 | sourceTree = "";
96 | };
97 | F73E1D1F1C42B9DA00CC728F /* Products */ = {
98 | isa = PBXGroup;
99 | children = (
100 | F73E1D1E1C42B9DA00CC728F /* DrawBorderBugDemo.app */,
101 | F73E1D371C42B9DB00CC728F /* DrawBorderBugDemoTests.xctest */,
102 | F73E1D421C42B9DB00CC728F /* DrawBorderBugDemoUITests.xctest */,
103 | );
104 | name = Products;
105 | sourceTree = "";
106 | };
107 | F73E1D201C42B9DA00CC728F /* DrawBorderBugDemo */ = {
108 | isa = PBXGroup;
109 | children = (
110 | F73E1D541C42BA0300CC728F /* BHBDrawView.h */,
111 | F73E1D551C42BA0300CC728F /* BHBDrawView.m */,
112 | 131090971C843DBF00626E0D /* BHBLayerDelegate.h */,
113 | 131090981C843DBF00626E0D /* BHBLayerDelegate.m */,
114 | F73E1D241C42B9DA00CC728F /* AppDelegate.h */,
115 | F73E1D251C42B9DA00CC728F /* AppDelegate.m */,
116 | F73E1D271C42B9DA00CC728F /* ViewController.h */,
117 | F73E1D281C42B9DA00CC728F /* ViewController.m */,
118 | F73E1D2A1C42B9DA00CC728F /* Main.storyboard */,
119 | F73E1D2D1C42B9DA00CC728F /* Assets.xcassets */,
120 | F73E1D2F1C42B9DA00CC728F /* LaunchScreen.storyboard */,
121 | F73E1D321C42B9DA00CC728F /* Info.plist */,
122 | F73E1D211C42B9DA00CC728F /* Supporting Files */,
123 | );
124 | path = DrawBorderBugDemo;
125 | sourceTree = "";
126 | };
127 | F73E1D211C42B9DA00CC728F /* Supporting Files */ = {
128 | isa = PBXGroup;
129 | children = (
130 | F73E1D221C42B9DA00CC728F /* main.m */,
131 | );
132 | name = "Supporting Files";
133 | sourceTree = "";
134 | };
135 | F73E1D3A1C42B9DB00CC728F /* DrawBorderBugDemoTests */ = {
136 | isa = PBXGroup;
137 | children = (
138 | F73E1D3B1C42B9DB00CC728F /* DrawBorderBugDemoTests.m */,
139 | F73E1D3D1C42B9DB00CC728F /* Info.plist */,
140 | );
141 | path = DrawBorderBugDemoTests;
142 | sourceTree = "";
143 | };
144 | F73E1D451C42B9DB00CC728F /* DrawBorderBugDemoUITests */ = {
145 | isa = PBXGroup;
146 | children = (
147 | F73E1D461C42B9DB00CC728F /* DrawBorderBugDemoUITests.m */,
148 | F73E1D481C42B9DB00CC728F /* Info.plist */,
149 | );
150 | path = DrawBorderBugDemoUITests;
151 | sourceTree = "";
152 | };
153 | /* End PBXGroup section */
154 |
155 | /* Begin PBXNativeTarget section */
156 | F73E1D1D1C42B9DA00CC728F /* DrawBorderBugDemo */ = {
157 | isa = PBXNativeTarget;
158 | buildConfigurationList = F73E1D4B1C42B9DB00CC728F /* Build configuration list for PBXNativeTarget "DrawBorderBugDemo" */;
159 | buildPhases = (
160 | F73E1D1A1C42B9DA00CC728F /* Sources */,
161 | F73E1D1B1C42B9DA00CC728F /* Frameworks */,
162 | F73E1D1C1C42B9DA00CC728F /* Resources */,
163 | );
164 | buildRules = (
165 | );
166 | dependencies = (
167 | );
168 | name = DrawBorderBugDemo;
169 | productName = DrawBorderBugDemo;
170 | productReference = F73E1D1E1C42B9DA00CC728F /* DrawBorderBugDemo.app */;
171 | productType = "com.apple.product-type.application";
172 | };
173 | F73E1D361C42B9DB00CC728F /* DrawBorderBugDemoTests */ = {
174 | isa = PBXNativeTarget;
175 | buildConfigurationList = F73E1D4E1C42B9DB00CC728F /* Build configuration list for PBXNativeTarget "DrawBorderBugDemoTests" */;
176 | buildPhases = (
177 | F73E1D331C42B9DB00CC728F /* Sources */,
178 | F73E1D341C42B9DB00CC728F /* Frameworks */,
179 | F73E1D351C42B9DB00CC728F /* Resources */,
180 | );
181 | buildRules = (
182 | );
183 | dependencies = (
184 | F73E1D391C42B9DB00CC728F /* PBXTargetDependency */,
185 | );
186 | name = DrawBorderBugDemoTests;
187 | productName = DrawBorderBugDemoTests;
188 | productReference = F73E1D371C42B9DB00CC728F /* DrawBorderBugDemoTests.xctest */;
189 | productType = "com.apple.product-type.bundle.unit-test";
190 | };
191 | F73E1D411C42B9DB00CC728F /* DrawBorderBugDemoUITests */ = {
192 | isa = PBXNativeTarget;
193 | buildConfigurationList = F73E1D511C42B9DB00CC728F /* Build configuration list for PBXNativeTarget "DrawBorderBugDemoUITests" */;
194 | buildPhases = (
195 | F73E1D3E1C42B9DB00CC728F /* Sources */,
196 | F73E1D3F1C42B9DB00CC728F /* Frameworks */,
197 | F73E1D401C42B9DB00CC728F /* Resources */,
198 | );
199 | buildRules = (
200 | );
201 | dependencies = (
202 | F73E1D441C42B9DB00CC728F /* PBXTargetDependency */,
203 | );
204 | name = DrawBorderBugDemoUITests;
205 | productName = DrawBorderBugDemoUITests;
206 | productReference = F73E1D421C42B9DB00CC728F /* DrawBorderBugDemoUITests.xctest */;
207 | productType = "com.apple.product-type.bundle.ui-testing";
208 | };
209 | /* End PBXNativeTarget section */
210 |
211 | /* Begin PBXProject section */
212 | F73E1D161C42B9DA00CC728F /* Project object */ = {
213 | isa = PBXProject;
214 | attributes = {
215 | LastUpgradeCheck = 0720;
216 | ORGANIZATIONNAME = bihongbo;
217 | TargetAttributes = {
218 | F73E1D1D1C42B9DA00CC728F = {
219 | CreatedOnToolsVersion = 7.2;
220 | };
221 | F73E1D361C42B9DB00CC728F = {
222 | CreatedOnToolsVersion = 7.2;
223 | TestTargetID = F73E1D1D1C42B9DA00CC728F;
224 | };
225 | F73E1D411C42B9DB00CC728F = {
226 | CreatedOnToolsVersion = 7.2;
227 | TestTargetID = F73E1D1D1C42B9DA00CC728F;
228 | };
229 | };
230 | };
231 | buildConfigurationList = F73E1D191C42B9DA00CC728F /* Build configuration list for PBXProject "DrawBorderBugDemo" */;
232 | compatibilityVersion = "Xcode 3.2";
233 | developmentRegion = English;
234 | hasScannedForEncodings = 0;
235 | knownRegions = (
236 | en,
237 | Base,
238 | );
239 | mainGroup = F73E1D151C42B9DA00CC728F;
240 | productRefGroup = F73E1D1F1C42B9DA00CC728F /* Products */;
241 | projectDirPath = "";
242 | projectRoot = "";
243 | targets = (
244 | F73E1D1D1C42B9DA00CC728F /* DrawBorderBugDemo */,
245 | F73E1D361C42B9DB00CC728F /* DrawBorderBugDemoTests */,
246 | F73E1D411C42B9DB00CC728F /* DrawBorderBugDemoUITests */,
247 | );
248 | };
249 | /* End PBXProject section */
250 |
251 | /* Begin PBXResourcesBuildPhase section */
252 | F73E1D1C1C42B9DA00CC728F /* Resources */ = {
253 | isa = PBXResourcesBuildPhase;
254 | buildActionMask = 2147483647;
255 | files = (
256 | F73E1D311C42B9DA00CC728F /* LaunchScreen.storyboard in Resources */,
257 | F73E1D2E1C42B9DA00CC728F /* Assets.xcassets in Resources */,
258 | F73E1D2C1C42B9DA00CC728F /* Main.storyboard in Resources */,
259 | );
260 | runOnlyForDeploymentPostprocessing = 0;
261 | };
262 | F73E1D351C42B9DB00CC728F /* Resources */ = {
263 | isa = PBXResourcesBuildPhase;
264 | buildActionMask = 2147483647;
265 | files = (
266 | );
267 | runOnlyForDeploymentPostprocessing = 0;
268 | };
269 | F73E1D401C42B9DB00CC728F /* Resources */ = {
270 | isa = PBXResourcesBuildPhase;
271 | buildActionMask = 2147483647;
272 | files = (
273 | );
274 | runOnlyForDeploymentPostprocessing = 0;
275 | };
276 | /* End PBXResourcesBuildPhase section */
277 |
278 | /* Begin PBXSourcesBuildPhase section */
279 | F73E1D1A1C42B9DA00CC728F /* Sources */ = {
280 | isa = PBXSourcesBuildPhase;
281 | buildActionMask = 2147483647;
282 | files = (
283 | F73E1D291C42B9DA00CC728F /* ViewController.m in Sources */,
284 | F73E1D561C42BA0300CC728F /* BHBDrawView.m in Sources */,
285 | F73E1D261C42B9DA00CC728F /* AppDelegate.m in Sources */,
286 | F73E1D231C42B9DA00CC728F /* main.m in Sources */,
287 | 131090991C843DBF00626E0D /* BHBLayerDelegate.m in Sources */,
288 | );
289 | runOnlyForDeploymentPostprocessing = 0;
290 | };
291 | F73E1D331C42B9DB00CC728F /* Sources */ = {
292 | isa = PBXSourcesBuildPhase;
293 | buildActionMask = 2147483647;
294 | files = (
295 | F73E1D3C1C42B9DB00CC728F /* DrawBorderBugDemoTests.m in Sources */,
296 | );
297 | runOnlyForDeploymentPostprocessing = 0;
298 | };
299 | F73E1D3E1C42B9DB00CC728F /* Sources */ = {
300 | isa = PBXSourcesBuildPhase;
301 | buildActionMask = 2147483647;
302 | files = (
303 | F73E1D471C42B9DB00CC728F /* DrawBorderBugDemoUITests.m in Sources */,
304 | );
305 | runOnlyForDeploymentPostprocessing = 0;
306 | };
307 | /* End PBXSourcesBuildPhase section */
308 |
309 | /* Begin PBXTargetDependency section */
310 | F73E1D391C42B9DB00CC728F /* PBXTargetDependency */ = {
311 | isa = PBXTargetDependency;
312 | target = F73E1D1D1C42B9DA00CC728F /* DrawBorderBugDemo */;
313 | targetProxy = F73E1D381C42B9DB00CC728F /* PBXContainerItemProxy */;
314 | };
315 | F73E1D441C42B9DB00CC728F /* PBXTargetDependency */ = {
316 | isa = PBXTargetDependency;
317 | target = F73E1D1D1C42B9DA00CC728F /* DrawBorderBugDemo */;
318 | targetProxy = F73E1D431C42B9DB00CC728F /* PBXContainerItemProxy */;
319 | };
320 | /* End PBXTargetDependency section */
321 |
322 | /* Begin PBXVariantGroup section */
323 | F73E1D2A1C42B9DA00CC728F /* Main.storyboard */ = {
324 | isa = PBXVariantGroup;
325 | children = (
326 | F73E1D2B1C42B9DA00CC728F /* Base */,
327 | );
328 | name = Main.storyboard;
329 | sourceTree = "";
330 | };
331 | F73E1D2F1C42B9DA00CC728F /* LaunchScreen.storyboard */ = {
332 | isa = PBXVariantGroup;
333 | children = (
334 | F73E1D301C42B9DA00CC728F /* Base */,
335 | );
336 | name = LaunchScreen.storyboard;
337 | sourceTree = "";
338 | };
339 | /* End PBXVariantGroup section */
340 |
341 | /* Begin XCBuildConfiguration section */
342 | F73E1D491C42B9DB00CC728F /* Debug */ = {
343 | isa = XCBuildConfiguration;
344 | buildSettings = {
345 | ALWAYS_SEARCH_USER_PATHS = NO;
346 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
347 | CLANG_CXX_LIBRARY = "libc++";
348 | CLANG_ENABLE_MODULES = YES;
349 | CLANG_ENABLE_OBJC_ARC = YES;
350 | CLANG_WARN_BOOL_CONVERSION = YES;
351 | CLANG_WARN_CONSTANT_CONVERSION = YES;
352 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
353 | CLANG_WARN_EMPTY_BODY = YES;
354 | CLANG_WARN_ENUM_CONVERSION = YES;
355 | CLANG_WARN_INT_CONVERSION = YES;
356 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
357 | CLANG_WARN_UNREACHABLE_CODE = YES;
358 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
359 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
360 | COPY_PHASE_STRIP = NO;
361 | DEBUG_INFORMATION_FORMAT = dwarf;
362 | ENABLE_STRICT_OBJC_MSGSEND = YES;
363 | ENABLE_TESTABILITY = YES;
364 | GCC_C_LANGUAGE_STANDARD = gnu99;
365 | GCC_DYNAMIC_NO_PIC = NO;
366 | GCC_NO_COMMON_BLOCKS = YES;
367 | GCC_OPTIMIZATION_LEVEL = 0;
368 | GCC_PREPROCESSOR_DEFINITIONS = (
369 | "DEBUG=1",
370 | "$(inherited)",
371 | );
372 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
373 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
374 | GCC_WARN_UNDECLARED_SELECTOR = YES;
375 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
376 | GCC_WARN_UNUSED_FUNCTION = YES;
377 | GCC_WARN_UNUSED_VARIABLE = YES;
378 | IPHONEOS_DEPLOYMENT_TARGET = 9.2;
379 | MTL_ENABLE_DEBUG_INFO = YES;
380 | ONLY_ACTIVE_ARCH = YES;
381 | SDKROOT = iphoneos;
382 | };
383 | name = Debug;
384 | };
385 | F73E1D4A1C42B9DB00CC728F /* Release */ = {
386 | isa = XCBuildConfiguration;
387 | buildSettings = {
388 | ALWAYS_SEARCH_USER_PATHS = NO;
389 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
390 | CLANG_CXX_LIBRARY = "libc++";
391 | CLANG_ENABLE_MODULES = YES;
392 | CLANG_ENABLE_OBJC_ARC = YES;
393 | CLANG_WARN_BOOL_CONVERSION = YES;
394 | CLANG_WARN_CONSTANT_CONVERSION = YES;
395 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
396 | CLANG_WARN_EMPTY_BODY = YES;
397 | CLANG_WARN_ENUM_CONVERSION = YES;
398 | CLANG_WARN_INT_CONVERSION = YES;
399 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
400 | CLANG_WARN_UNREACHABLE_CODE = YES;
401 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
402 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
403 | COPY_PHASE_STRIP = NO;
404 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
405 | ENABLE_NS_ASSERTIONS = NO;
406 | ENABLE_STRICT_OBJC_MSGSEND = YES;
407 | GCC_C_LANGUAGE_STANDARD = gnu99;
408 | GCC_NO_COMMON_BLOCKS = YES;
409 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
410 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
411 | GCC_WARN_UNDECLARED_SELECTOR = YES;
412 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
413 | GCC_WARN_UNUSED_FUNCTION = YES;
414 | GCC_WARN_UNUSED_VARIABLE = YES;
415 | IPHONEOS_DEPLOYMENT_TARGET = 9.2;
416 | MTL_ENABLE_DEBUG_INFO = NO;
417 | SDKROOT = iphoneos;
418 | VALIDATE_PRODUCT = YES;
419 | };
420 | name = Release;
421 | };
422 | F73E1D4C1C42B9DB00CC728F /* Debug */ = {
423 | isa = XCBuildConfiguration;
424 | buildSettings = {
425 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
426 | INFOPLIST_FILE = DrawBorderBugDemo/Info.plist;
427 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
428 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.DrawBorderBugDemo;
429 | PRODUCT_NAME = "$(TARGET_NAME)";
430 | TARGETED_DEVICE_FAMILY = "1,2";
431 | };
432 | name = Debug;
433 | };
434 | F73E1D4D1C42B9DB00CC728F /* Release */ = {
435 | isa = XCBuildConfiguration;
436 | buildSettings = {
437 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
438 | INFOPLIST_FILE = DrawBorderBugDemo/Info.plist;
439 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
440 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.DrawBorderBugDemo;
441 | PRODUCT_NAME = "$(TARGET_NAME)";
442 | TARGETED_DEVICE_FAMILY = "1,2";
443 | };
444 | name = Release;
445 | };
446 | F73E1D4F1C42B9DB00CC728F /* Debug */ = {
447 | isa = XCBuildConfiguration;
448 | buildSettings = {
449 | BUNDLE_LOADER = "$(TEST_HOST)";
450 | INFOPLIST_FILE = DrawBorderBugDemoTests/Info.plist;
451 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
452 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.DrawBorderBugDemoTests;
453 | PRODUCT_NAME = "$(TARGET_NAME)";
454 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DrawBorderBugDemo.app/DrawBorderBugDemo";
455 | };
456 | name = Debug;
457 | };
458 | F73E1D501C42B9DB00CC728F /* Release */ = {
459 | isa = XCBuildConfiguration;
460 | buildSettings = {
461 | BUNDLE_LOADER = "$(TEST_HOST)";
462 | INFOPLIST_FILE = DrawBorderBugDemoTests/Info.plist;
463 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
464 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.DrawBorderBugDemoTests;
465 | PRODUCT_NAME = "$(TARGET_NAME)";
466 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DrawBorderBugDemo.app/DrawBorderBugDemo";
467 | };
468 | name = Release;
469 | };
470 | F73E1D521C42B9DB00CC728F /* Debug */ = {
471 | isa = XCBuildConfiguration;
472 | buildSettings = {
473 | INFOPLIST_FILE = DrawBorderBugDemoUITests/Info.plist;
474 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
475 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.DrawBorderBugDemoUITests;
476 | PRODUCT_NAME = "$(TARGET_NAME)";
477 | TEST_TARGET_NAME = DrawBorderBugDemo;
478 | USES_XCTRUNNER = YES;
479 | };
480 | name = Debug;
481 | };
482 | F73E1D531C42B9DB00CC728F /* Release */ = {
483 | isa = XCBuildConfiguration;
484 | buildSettings = {
485 | INFOPLIST_FILE = DrawBorderBugDemoUITests/Info.plist;
486 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
487 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.DrawBorderBugDemoUITests;
488 | PRODUCT_NAME = "$(TARGET_NAME)";
489 | TEST_TARGET_NAME = DrawBorderBugDemo;
490 | USES_XCTRUNNER = YES;
491 | };
492 | name = Release;
493 | };
494 | /* End XCBuildConfiguration section */
495 |
496 | /* Begin XCConfigurationList section */
497 | F73E1D191C42B9DA00CC728F /* Build configuration list for PBXProject "DrawBorderBugDemo" */ = {
498 | isa = XCConfigurationList;
499 | buildConfigurations = (
500 | F73E1D491C42B9DB00CC728F /* Debug */,
501 | F73E1D4A1C42B9DB00CC728F /* Release */,
502 | );
503 | defaultConfigurationIsVisible = 0;
504 | defaultConfigurationName = Release;
505 | };
506 | F73E1D4B1C42B9DB00CC728F /* Build configuration list for PBXNativeTarget "DrawBorderBugDemo" */ = {
507 | isa = XCConfigurationList;
508 | buildConfigurations = (
509 | F73E1D4C1C42B9DB00CC728F /* Debug */,
510 | F73E1D4D1C42B9DB00CC728F /* Release */,
511 | );
512 | defaultConfigurationIsVisible = 0;
513 | defaultConfigurationName = Release;
514 | };
515 | F73E1D4E1C42B9DB00CC728F /* Build configuration list for PBXNativeTarget "DrawBorderBugDemoTests" */ = {
516 | isa = XCConfigurationList;
517 | buildConfigurations = (
518 | F73E1D4F1C42B9DB00CC728F /* Debug */,
519 | F73E1D501C42B9DB00CC728F /* Release */,
520 | );
521 | defaultConfigurationIsVisible = 0;
522 | defaultConfigurationName = Release;
523 | };
524 | F73E1D511C42B9DB00CC728F /* Build configuration list for PBXNativeTarget "DrawBorderBugDemoUITests" */ = {
525 | isa = XCConfigurationList;
526 | buildConfigurations = (
527 | F73E1D521C42B9DB00CC728F /* Debug */,
528 | F73E1D531C42B9DB00CC728F /* Release */,
529 | );
530 | defaultConfigurationIsVisible = 0;
531 | defaultConfigurationName = Release;
532 | };
533 | /* End XCConfigurationList section */
534 | };
535 | rootObject = F73E1D161C42B9DA00CC728F /* Project object */;
536 | }
537 |
--------------------------------------------------------------------------------
/BHBDrawBoarder/BHBDrawBoarder.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | F7A4FD801C3A6776005BEBD8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F7A4FD7F1C3A6776005BEBD8 /* main.m */; };
11 | F7A4FD831C3A6776005BEBD8 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F7A4FD821C3A6776005BEBD8 /* AppDelegate.m */; };
12 | F7A4FD861C3A6776005BEBD8 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F7A4FD851C3A6776005BEBD8 /* ViewController.m */; };
13 | F7A4FD8B1C3A6776005BEBD8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F7A4FD8A1C3A6776005BEBD8 /* Assets.xcassets */; };
14 | F7A4FD8E1C3A6776005BEBD8 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7A4FD8C1C3A6776005BEBD8 /* LaunchScreen.storyboard */; };
15 | F7A4FD991C3A6776005BEBD8 /* BHBDrawBoarderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F7A4FD981C3A6776005BEBD8 /* BHBDrawBoarderTests.m */; };
16 | F7A4FDA41C3A6776005BEBD8 /* BHBDrawBoarderUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = F7A4FDA31C3A6776005BEBD8 /* BHBDrawBoarderUITests.m */; };
17 | F7A4FDBA1C3A67DF005BEBD8 /* BHBDrawBoarderView.m in Sources */ = {isa = PBXBuildFile; fileRef = F7A4FDB31C3A67DF005BEBD8 /* BHBDrawBoarderView.m */; };
18 | F7A4FDBB1C3A67DF005BEBD8 /* BHBMyDrawer.m in Sources */ = {isa = PBXBuildFile; fileRef = F7A4FDB51C3A67DF005BEBD8 /* BHBMyDrawer.m */; };
19 | F7A4FDBC1C3A67DF005BEBD8 /* BHBPaintPath.m in Sources */ = {isa = PBXBuildFile; fileRef = F7A4FDB71C3A67DF005BEBD8 /* BHBPaintPath.m */; };
20 | F7A4FDBD1C3A67DF005BEBD8 /* BHBScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = F7A4FDB91C3A67DF005BEBD8 /* BHBScrollView.m */; };
21 | F7A4FDBF1C3A6F43005BEBD8 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7A4FDBE1C3A6F43005BEBD8 /* Main.storyboard */; };
22 | /* End PBXBuildFile section */
23 |
24 | /* Begin PBXContainerItemProxy section */
25 | F7A4FD951C3A6776005BEBD8 /* PBXContainerItemProxy */ = {
26 | isa = PBXContainerItemProxy;
27 | containerPortal = F7A4FD731C3A6775005BEBD8 /* Project object */;
28 | proxyType = 1;
29 | remoteGlobalIDString = F7A4FD7A1C3A6775005BEBD8;
30 | remoteInfo = BHBDrawBoarder;
31 | };
32 | F7A4FDA01C3A6776005BEBD8 /* PBXContainerItemProxy */ = {
33 | isa = PBXContainerItemProxy;
34 | containerPortal = F7A4FD731C3A6775005BEBD8 /* Project object */;
35 | proxyType = 1;
36 | remoteGlobalIDString = F7A4FD7A1C3A6775005BEBD8;
37 | remoteInfo = BHBDrawBoarder;
38 | };
39 | /* End PBXContainerItemProxy section */
40 |
41 | /* Begin PBXFileReference section */
42 | F7A4FD7B1C3A6775005BEBD8 /* BHBDrawBoarder.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BHBDrawBoarder.app; sourceTree = BUILT_PRODUCTS_DIR; };
43 | F7A4FD7F1C3A6776005BEBD8 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
44 | F7A4FD811C3A6776005BEBD8 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
45 | F7A4FD821C3A6776005BEBD8 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
46 | F7A4FD841C3A6776005BEBD8 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
47 | F7A4FD851C3A6776005BEBD8 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
48 | F7A4FD8A1C3A6776005BEBD8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
49 | F7A4FD8D1C3A6776005BEBD8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
50 | F7A4FD8F1C3A6776005BEBD8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
51 | F7A4FD941C3A6776005BEBD8 /* BHBDrawBoarderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BHBDrawBoarderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
52 | F7A4FD981C3A6776005BEBD8 /* BHBDrawBoarderTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BHBDrawBoarderTests.m; sourceTree = ""; };
53 | F7A4FD9A1C3A6776005BEBD8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
54 | F7A4FD9F1C3A6776005BEBD8 /* BHBDrawBoarderUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BHBDrawBoarderUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
55 | F7A4FDA31C3A6776005BEBD8 /* BHBDrawBoarderUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BHBDrawBoarderUITests.m; sourceTree = ""; };
56 | F7A4FDA51C3A6776005BEBD8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
57 | F7A4FDB21C3A67DF005BEBD8 /* BHBDrawBoarderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BHBDrawBoarderView.h; sourceTree = ""; };
58 | F7A4FDB31C3A67DF005BEBD8 /* BHBDrawBoarderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BHBDrawBoarderView.m; sourceTree = ""; };
59 | F7A4FDB41C3A67DF005BEBD8 /* BHBMyDrawer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BHBMyDrawer.h; sourceTree = ""; };
60 | F7A4FDB51C3A67DF005BEBD8 /* BHBMyDrawer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BHBMyDrawer.m; sourceTree = ""; };
61 | F7A4FDB61C3A67DF005BEBD8 /* BHBPaintPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BHBPaintPath.h; sourceTree = ""; };
62 | F7A4FDB71C3A67DF005BEBD8 /* BHBPaintPath.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BHBPaintPath.m; sourceTree = ""; };
63 | F7A4FDB81C3A67DF005BEBD8 /* BHBScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BHBScrollView.h; sourceTree = ""; };
64 | F7A4FDB91C3A67DF005BEBD8 /* BHBScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BHBScrollView.m; sourceTree = ""; };
65 | F7A4FDBE1C3A6F43005BEBD8 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; };
66 | /* End PBXFileReference section */
67 |
68 | /* Begin PBXFrameworksBuildPhase section */
69 | F7A4FD781C3A6775005BEBD8 /* Frameworks */ = {
70 | isa = PBXFrameworksBuildPhase;
71 | buildActionMask = 2147483647;
72 | files = (
73 | );
74 | runOnlyForDeploymentPostprocessing = 0;
75 | };
76 | F7A4FD911C3A6776005BEBD8 /* Frameworks */ = {
77 | isa = PBXFrameworksBuildPhase;
78 | buildActionMask = 2147483647;
79 | files = (
80 | );
81 | runOnlyForDeploymentPostprocessing = 0;
82 | };
83 | F7A4FD9C1C3A6776005BEBD8 /* Frameworks */ = {
84 | isa = PBXFrameworksBuildPhase;
85 | buildActionMask = 2147483647;
86 | files = (
87 | );
88 | runOnlyForDeploymentPostprocessing = 0;
89 | };
90 | /* End PBXFrameworksBuildPhase section */
91 |
92 | /* Begin PBXGroup section */
93 | F7A4FD721C3A6775005BEBD8 = {
94 | isa = PBXGroup;
95 | children = (
96 | F7A4FD7D1C3A6776005BEBD8 /* BHBDrawBoarder */,
97 | F7A4FD971C3A6776005BEBD8 /* BHBDrawBoarderTests */,
98 | F7A4FDA21C3A6776005BEBD8 /* BHBDrawBoarderUITests */,
99 | F7A4FD7C1C3A6775005BEBD8 /* Products */,
100 | );
101 | sourceTree = "";
102 | };
103 | F7A4FD7C1C3A6775005BEBD8 /* Products */ = {
104 | isa = PBXGroup;
105 | children = (
106 | F7A4FD7B1C3A6775005BEBD8 /* BHBDrawBoarder.app */,
107 | F7A4FD941C3A6776005BEBD8 /* BHBDrawBoarderTests.xctest */,
108 | F7A4FD9F1C3A6776005BEBD8 /* BHBDrawBoarderUITests.xctest */,
109 | );
110 | name = Products;
111 | sourceTree = "";
112 | };
113 | F7A4FD7D1C3A6776005BEBD8 /* BHBDrawBoarder */ = {
114 | isa = PBXGroup;
115 | children = (
116 | F7A4FDB11C3A67D3005BEBD8 /* BHBDrawBoarder */,
117 | F7A4FD811C3A6776005BEBD8 /* AppDelegate.h */,
118 | F7A4FD821C3A6776005BEBD8 /* AppDelegate.m */,
119 | F7A4FD841C3A6776005BEBD8 /* ViewController.h */,
120 | F7A4FD851C3A6776005BEBD8 /* ViewController.m */,
121 | F7A4FDBE1C3A6F43005BEBD8 /* Main.storyboard */,
122 | F7A4FD8A1C3A6776005BEBD8 /* Assets.xcassets */,
123 | F7A4FD8C1C3A6776005BEBD8 /* LaunchScreen.storyboard */,
124 | F7A4FD8F1C3A6776005BEBD8 /* Info.plist */,
125 | F7A4FD7E1C3A6776005BEBD8 /* Supporting Files */,
126 | );
127 | path = BHBDrawBoarder;
128 | sourceTree = "";
129 | };
130 | F7A4FD7E1C3A6776005BEBD8 /* Supporting Files */ = {
131 | isa = PBXGroup;
132 | children = (
133 | F7A4FD7F1C3A6776005BEBD8 /* main.m */,
134 | );
135 | name = "Supporting Files";
136 | sourceTree = "";
137 | };
138 | F7A4FD971C3A6776005BEBD8 /* BHBDrawBoarderTests */ = {
139 | isa = PBXGroup;
140 | children = (
141 | F7A4FD981C3A6776005BEBD8 /* BHBDrawBoarderTests.m */,
142 | F7A4FD9A1C3A6776005BEBD8 /* Info.plist */,
143 | );
144 | path = BHBDrawBoarderTests;
145 | sourceTree = "";
146 | };
147 | F7A4FDA21C3A6776005BEBD8 /* BHBDrawBoarderUITests */ = {
148 | isa = PBXGroup;
149 | children = (
150 | F7A4FDA31C3A6776005BEBD8 /* BHBDrawBoarderUITests.m */,
151 | F7A4FDA51C3A6776005BEBD8 /* Info.plist */,
152 | );
153 | path = BHBDrawBoarderUITests;
154 | sourceTree = "";
155 | };
156 | F7A4FDB11C3A67D3005BEBD8 /* BHBDrawBoarder */ = {
157 | isa = PBXGroup;
158 | children = (
159 | F7A4FDB21C3A67DF005BEBD8 /* BHBDrawBoarderView.h */,
160 | F7A4FDB31C3A67DF005BEBD8 /* BHBDrawBoarderView.m */,
161 | F7A4FDB41C3A67DF005BEBD8 /* BHBMyDrawer.h */,
162 | F7A4FDB51C3A67DF005BEBD8 /* BHBMyDrawer.m */,
163 | F7A4FDB61C3A67DF005BEBD8 /* BHBPaintPath.h */,
164 | F7A4FDB71C3A67DF005BEBD8 /* BHBPaintPath.m */,
165 | F7A4FDB81C3A67DF005BEBD8 /* BHBScrollView.h */,
166 | F7A4FDB91C3A67DF005BEBD8 /* BHBScrollView.m */,
167 | );
168 | path = BHBDrawBoarder;
169 | sourceTree = "";
170 | };
171 | /* End PBXGroup section */
172 |
173 | /* Begin PBXNativeTarget section */
174 | F7A4FD7A1C3A6775005BEBD8 /* BHBDrawBoarder */ = {
175 | isa = PBXNativeTarget;
176 | buildConfigurationList = F7A4FDA81C3A6776005BEBD8 /* Build configuration list for PBXNativeTarget "BHBDrawBoarder" */;
177 | buildPhases = (
178 | F7A4FD771C3A6775005BEBD8 /* Sources */,
179 | F7A4FD781C3A6775005BEBD8 /* Frameworks */,
180 | F7A4FD791C3A6775005BEBD8 /* Resources */,
181 | );
182 | buildRules = (
183 | );
184 | dependencies = (
185 | );
186 | name = BHBDrawBoarder;
187 | productName = BHBDrawBoarder;
188 | productReference = F7A4FD7B1C3A6775005BEBD8 /* BHBDrawBoarder.app */;
189 | productType = "com.apple.product-type.application";
190 | };
191 | F7A4FD931C3A6776005BEBD8 /* BHBDrawBoarderTests */ = {
192 | isa = PBXNativeTarget;
193 | buildConfigurationList = F7A4FDAB1C3A6776005BEBD8 /* Build configuration list for PBXNativeTarget "BHBDrawBoarderTests" */;
194 | buildPhases = (
195 | F7A4FD901C3A6776005BEBD8 /* Sources */,
196 | F7A4FD911C3A6776005BEBD8 /* Frameworks */,
197 | F7A4FD921C3A6776005BEBD8 /* Resources */,
198 | );
199 | buildRules = (
200 | );
201 | dependencies = (
202 | F7A4FD961C3A6776005BEBD8 /* PBXTargetDependency */,
203 | );
204 | name = BHBDrawBoarderTests;
205 | productName = BHBDrawBoarderTests;
206 | productReference = F7A4FD941C3A6776005BEBD8 /* BHBDrawBoarderTests.xctest */;
207 | productType = "com.apple.product-type.bundle.unit-test";
208 | };
209 | F7A4FD9E1C3A6776005BEBD8 /* BHBDrawBoarderUITests */ = {
210 | isa = PBXNativeTarget;
211 | buildConfigurationList = F7A4FDAE1C3A6776005BEBD8 /* Build configuration list for PBXNativeTarget "BHBDrawBoarderUITests" */;
212 | buildPhases = (
213 | F7A4FD9B1C3A6776005BEBD8 /* Sources */,
214 | F7A4FD9C1C3A6776005BEBD8 /* Frameworks */,
215 | F7A4FD9D1C3A6776005BEBD8 /* Resources */,
216 | );
217 | buildRules = (
218 | );
219 | dependencies = (
220 | F7A4FDA11C3A6776005BEBD8 /* PBXTargetDependency */,
221 | );
222 | name = BHBDrawBoarderUITests;
223 | productName = BHBDrawBoarderUITests;
224 | productReference = F7A4FD9F1C3A6776005BEBD8 /* BHBDrawBoarderUITests.xctest */;
225 | productType = "com.apple.product-type.bundle.ui-testing";
226 | };
227 | /* End PBXNativeTarget section */
228 |
229 | /* Begin PBXProject section */
230 | F7A4FD731C3A6775005BEBD8 /* Project object */ = {
231 | isa = PBXProject;
232 | attributes = {
233 | LastUpgradeCheck = 0720;
234 | ORGANIZATIONNAME = bihongbo;
235 | TargetAttributes = {
236 | F7A4FD7A1C3A6775005BEBD8 = {
237 | CreatedOnToolsVersion = 7.2;
238 | };
239 | F7A4FD931C3A6776005BEBD8 = {
240 | CreatedOnToolsVersion = 7.2;
241 | TestTargetID = F7A4FD7A1C3A6775005BEBD8;
242 | };
243 | F7A4FD9E1C3A6776005BEBD8 = {
244 | CreatedOnToolsVersion = 7.2;
245 | TestTargetID = F7A4FD7A1C3A6775005BEBD8;
246 | };
247 | };
248 | };
249 | buildConfigurationList = F7A4FD761C3A6775005BEBD8 /* Build configuration list for PBXProject "BHBDrawBoarder" */;
250 | compatibilityVersion = "Xcode 3.2";
251 | developmentRegion = English;
252 | hasScannedForEncodings = 0;
253 | knownRegions = (
254 | en,
255 | Base,
256 | );
257 | mainGroup = F7A4FD721C3A6775005BEBD8;
258 | productRefGroup = F7A4FD7C1C3A6775005BEBD8 /* Products */;
259 | projectDirPath = "";
260 | projectRoot = "";
261 | targets = (
262 | F7A4FD7A1C3A6775005BEBD8 /* BHBDrawBoarder */,
263 | F7A4FD931C3A6776005BEBD8 /* BHBDrawBoarderTests */,
264 | F7A4FD9E1C3A6776005BEBD8 /* BHBDrawBoarderUITests */,
265 | );
266 | };
267 | /* End PBXProject section */
268 |
269 | /* Begin PBXResourcesBuildPhase section */
270 | F7A4FD791C3A6775005BEBD8 /* Resources */ = {
271 | isa = PBXResourcesBuildPhase;
272 | buildActionMask = 2147483647;
273 | files = (
274 | F7A4FDBF1C3A6F43005BEBD8 /* Main.storyboard in Resources */,
275 | F7A4FD8E1C3A6776005BEBD8 /* LaunchScreen.storyboard in Resources */,
276 | F7A4FD8B1C3A6776005BEBD8 /* Assets.xcassets in Resources */,
277 | );
278 | runOnlyForDeploymentPostprocessing = 0;
279 | };
280 | F7A4FD921C3A6776005BEBD8 /* Resources */ = {
281 | isa = PBXResourcesBuildPhase;
282 | buildActionMask = 2147483647;
283 | files = (
284 | );
285 | runOnlyForDeploymentPostprocessing = 0;
286 | };
287 | F7A4FD9D1C3A6776005BEBD8 /* Resources */ = {
288 | isa = PBXResourcesBuildPhase;
289 | buildActionMask = 2147483647;
290 | files = (
291 | );
292 | runOnlyForDeploymentPostprocessing = 0;
293 | };
294 | /* End PBXResourcesBuildPhase section */
295 |
296 | /* Begin PBXSourcesBuildPhase section */
297 | F7A4FD771C3A6775005BEBD8 /* Sources */ = {
298 | isa = PBXSourcesBuildPhase;
299 | buildActionMask = 2147483647;
300 | files = (
301 | F7A4FD861C3A6776005BEBD8 /* ViewController.m in Sources */,
302 | F7A4FDBA1C3A67DF005BEBD8 /* BHBDrawBoarderView.m in Sources */,
303 | F7A4FDBB1C3A67DF005BEBD8 /* BHBMyDrawer.m in Sources */,
304 | F7A4FD831C3A6776005BEBD8 /* AppDelegate.m in Sources */,
305 | F7A4FDBD1C3A67DF005BEBD8 /* BHBScrollView.m in Sources */,
306 | F7A4FDBC1C3A67DF005BEBD8 /* BHBPaintPath.m in Sources */,
307 | F7A4FD801C3A6776005BEBD8 /* main.m in Sources */,
308 | );
309 | runOnlyForDeploymentPostprocessing = 0;
310 | };
311 | F7A4FD901C3A6776005BEBD8 /* Sources */ = {
312 | isa = PBXSourcesBuildPhase;
313 | buildActionMask = 2147483647;
314 | files = (
315 | F7A4FD991C3A6776005BEBD8 /* BHBDrawBoarderTests.m in Sources */,
316 | );
317 | runOnlyForDeploymentPostprocessing = 0;
318 | };
319 | F7A4FD9B1C3A6776005BEBD8 /* Sources */ = {
320 | isa = PBXSourcesBuildPhase;
321 | buildActionMask = 2147483647;
322 | files = (
323 | F7A4FDA41C3A6776005BEBD8 /* BHBDrawBoarderUITests.m in Sources */,
324 | );
325 | runOnlyForDeploymentPostprocessing = 0;
326 | };
327 | /* End PBXSourcesBuildPhase section */
328 |
329 | /* Begin PBXTargetDependency section */
330 | F7A4FD961C3A6776005BEBD8 /* PBXTargetDependency */ = {
331 | isa = PBXTargetDependency;
332 | target = F7A4FD7A1C3A6775005BEBD8 /* BHBDrawBoarder */;
333 | targetProxy = F7A4FD951C3A6776005BEBD8 /* PBXContainerItemProxy */;
334 | };
335 | F7A4FDA11C3A6776005BEBD8 /* PBXTargetDependency */ = {
336 | isa = PBXTargetDependency;
337 | target = F7A4FD7A1C3A6775005BEBD8 /* BHBDrawBoarder */;
338 | targetProxy = F7A4FDA01C3A6776005BEBD8 /* PBXContainerItemProxy */;
339 | };
340 | /* End PBXTargetDependency section */
341 |
342 | /* Begin PBXVariantGroup section */
343 | F7A4FD8C1C3A6776005BEBD8 /* LaunchScreen.storyboard */ = {
344 | isa = PBXVariantGroup;
345 | children = (
346 | F7A4FD8D1C3A6776005BEBD8 /* Base */,
347 | );
348 | name = LaunchScreen.storyboard;
349 | sourceTree = "";
350 | };
351 | /* End PBXVariantGroup section */
352 |
353 | /* Begin XCBuildConfiguration section */
354 | F7A4FDA61C3A6776005BEBD8 /* Debug */ = {
355 | isa = XCBuildConfiguration;
356 | buildSettings = {
357 | ALWAYS_SEARCH_USER_PATHS = NO;
358 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
359 | CLANG_CXX_LIBRARY = "libc++";
360 | CLANG_ENABLE_MODULES = YES;
361 | CLANG_ENABLE_OBJC_ARC = YES;
362 | CLANG_WARN_BOOL_CONVERSION = YES;
363 | CLANG_WARN_CONSTANT_CONVERSION = YES;
364 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
365 | CLANG_WARN_EMPTY_BODY = YES;
366 | CLANG_WARN_ENUM_CONVERSION = YES;
367 | CLANG_WARN_INT_CONVERSION = YES;
368 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
369 | CLANG_WARN_UNREACHABLE_CODE = YES;
370 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
371 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
372 | COPY_PHASE_STRIP = NO;
373 | DEBUG_INFORMATION_FORMAT = dwarf;
374 | ENABLE_STRICT_OBJC_MSGSEND = YES;
375 | ENABLE_TESTABILITY = YES;
376 | GCC_C_LANGUAGE_STANDARD = gnu99;
377 | GCC_DYNAMIC_NO_PIC = NO;
378 | GCC_NO_COMMON_BLOCKS = YES;
379 | GCC_OPTIMIZATION_LEVEL = 0;
380 | GCC_PREPROCESSOR_DEFINITIONS = (
381 | "DEBUG=1",
382 | "$(inherited)",
383 | );
384 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
385 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
386 | GCC_WARN_UNDECLARED_SELECTOR = YES;
387 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
388 | GCC_WARN_UNUSED_FUNCTION = YES;
389 | GCC_WARN_UNUSED_VARIABLE = YES;
390 | IPHONEOS_DEPLOYMENT_TARGET = 9.2;
391 | MTL_ENABLE_DEBUG_INFO = YES;
392 | ONLY_ACTIVE_ARCH = YES;
393 | SDKROOT = iphoneos;
394 | };
395 | name = Debug;
396 | };
397 | F7A4FDA71C3A6776005BEBD8 /* Release */ = {
398 | isa = XCBuildConfiguration;
399 | buildSettings = {
400 | ALWAYS_SEARCH_USER_PATHS = NO;
401 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
402 | CLANG_CXX_LIBRARY = "libc++";
403 | CLANG_ENABLE_MODULES = YES;
404 | CLANG_ENABLE_OBJC_ARC = YES;
405 | CLANG_WARN_BOOL_CONVERSION = YES;
406 | CLANG_WARN_CONSTANT_CONVERSION = YES;
407 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
408 | CLANG_WARN_EMPTY_BODY = YES;
409 | CLANG_WARN_ENUM_CONVERSION = YES;
410 | CLANG_WARN_INT_CONVERSION = YES;
411 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
412 | CLANG_WARN_UNREACHABLE_CODE = YES;
413 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
414 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
415 | COPY_PHASE_STRIP = NO;
416 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
417 | ENABLE_NS_ASSERTIONS = NO;
418 | ENABLE_STRICT_OBJC_MSGSEND = YES;
419 | GCC_C_LANGUAGE_STANDARD = gnu99;
420 | GCC_NO_COMMON_BLOCKS = YES;
421 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
422 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
423 | GCC_WARN_UNDECLARED_SELECTOR = YES;
424 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
425 | GCC_WARN_UNUSED_FUNCTION = YES;
426 | GCC_WARN_UNUSED_VARIABLE = YES;
427 | IPHONEOS_DEPLOYMENT_TARGET = 9.2;
428 | MTL_ENABLE_DEBUG_INFO = NO;
429 | SDKROOT = iphoneos;
430 | VALIDATE_PRODUCT = YES;
431 | };
432 | name = Release;
433 | };
434 | F7A4FDA91C3A6776005BEBD8 /* Debug */ = {
435 | isa = XCBuildConfiguration;
436 | buildSettings = {
437 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
438 | INFOPLIST_FILE = BHBDrawBoarder/Info.plist;
439 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
440 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBDrawBoarder;
441 | PRODUCT_NAME = "$(TARGET_NAME)";
442 | };
443 | name = Debug;
444 | };
445 | F7A4FDAA1C3A6776005BEBD8 /* Release */ = {
446 | isa = XCBuildConfiguration;
447 | buildSettings = {
448 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
449 | INFOPLIST_FILE = BHBDrawBoarder/Info.plist;
450 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
451 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBDrawBoarder;
452 | PRODUCT_NAME = "$(TARGET_NAME)";
453 | };
454 | name = Release;
455 | };
456 | F7A4FDAC1C3A6776005BEBD8 /* Debug */ = {
457 | isa = XCBuildConfiguration;
458 | buildSettings = {
459 | BUNDLE_LOADER = "$(TEST_HOST)";
460 | INFOPLIST_FILE = BHBDrawBoarderTests/Info.plist;
461 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
462 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBDrawBoarderTests;
463 | PRODUCT_NAME = "$(TARGET_NAME)";
464 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BHBDrawBoarder.app/BHBDrawBoarder";
465 | };
466 | name = Debug;
467 | };
468 | F7A4FDAD1C3A6776005BEBD8 /* Release */ = {
469 | isa = XCBuildConfiguration;
470 | buildSettings = {
471 | BUNDLE_LOADER = "$(TEST_HOST)";
472 | INFOPLIST_FILE = BHBDrawBoarderTests/Info.plist;
473 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
474 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBDrawBoarderTests;
475 | PRODUCT_NAME = "$(TARGET_NAME)";
476 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BHBDrawBoarder.app/BHBDrawBoarder";
477 | };
478 | name = Release;
479 | };
480 | F7A4FDAF1C3A6776005BEBD8 /* Debug */ = {
481 | isa = XCBuildConfiguration;
482 | buildSettings = {
483 | INFOPLIST_FILE = BHBDrawBoarderUITests/Info.plist;
484 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
485 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBDrawBoarderUITests;
486 | PRODUCT_NAME = "$(TARGET_NAME)";
487 | TEST_TARGET_NAME = BHBDrawBoarder;
488 | USES_XCTRUNNER = YES;
489 | };
490 | name = Debug;
491 | };
492 | F7A4FDB01C3A6776005BEBD8 /* Release */ = {
493 | isa = XCBuildConfiguration;
494 | buildSettings = {
495 | INFOPLIST_FILE = BHBDrawBoarderUITests/Info.plist;
496 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
497 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBDrawBoarderUITests;
498 | PRODUCT_NAME = "$(TARGET_NAME)";
499 | TEST_TARGET_NAME = BHBDrawBoarder;
500 | USES_XCTRUNNER = YES;
501 | };
502 | name = Release;
503 | };
504 | /* End XCBuildConfiguration section */
505 |
506 | /* Begin XCConfigurationList section */
507 | F7A4FD761C3A6775005BEBD8 /* Build configuration list for PBXProject "BHBDrawBoarder" */ = {
508 | isa = XCConfigurationList;
509 | buildConfigurations = (
510 | F7A4FDA61C3A6776005BEBD8 /* Debug */,
511 | F7A4FDA71C3A6776005BEBD8 /* Release */,
512 | );
513 | defaultConfigurationIsVisible = 0;
514 | defaultConfigurationName = Release;
515 | };
516 | F7A4FDA81C3A6776005BEBD8 /* Build configuration list for PBXNativeTarget "BHBDrawBoarder" */ = {
517 | isa = XCConfigurationList;
518 | buildConfigurations = (
519 | F7A4FDA91C3A6776005BEBD8 /* Debug */,
520 | F7A4FDAA1C3A6776005BEBD8 /* Release */,
521 | );
522 | defaultConfigurationIsVisible = 0;
523 | };
524 | F7A4FDAB1C3A6776005BEBD8 /* Build configuration list for PBXNativeTarget "BHBDrawBoarderTests" */ = {
525 | isa = XCConfigurationList;
526 | buildConfigurations = (
527 | F7A4FDAC1C3A6776005BEBD8 /* Debug */,
528 | F7A4FDAD1C3A6776005BEBD8 /* Release */,
529 | );
530 | defaultConfigurationIsVisible = 0;
531 | };
532 | F7A4FDAE1C3A6776005BEBD8 /* Build configuration list for PBXNativeTarget "BHBDrawBoarderUITests" */ = {
533 | isa = XCConfigurationList;
534 | buildConfigurations = (
535 | F7A4FDAF1C3A6776005BEBD8 /* Debug */,
536 | F7A4FDB01C3A6776005BEBD8 /* Release */,
537 | );
538 | defaultConfigurationIsVisible = 0;
539 | };
540 | /* End XCConfigurationList section */
541 | };
542 | rootObject = F7A4FD731C3A6775005BEBD8 /* Project object */;
543 | }
544 |
--------------------------------------------------------------------------------