├── ClassForward
├── ClassForward.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── ClassForward.xccheckout
│ │ └── xcuserdata
│ │ │ ├── Steven.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ └── WorkspaceSettings.xcsettings
│ │ │ └── tinybro.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ ├── Steven.xcuserdatad
│ │ └── xcschemes
│ │ │ ├── ClassForward.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── tinybro.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── ClassForward.xcscheme
│ │ └── xcschememanagement.plist
├── ClassForward
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── ClassForward-Info.plist
│ ├── ClassForward-Prefix.pch
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── NSNull+InternalNullExtention.h
│ ├── NSNull+InternalNullExtention.m
│ ├── RootVC.h
│ ├── RootVC.m
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ └── main.m
└── ClassForwardTests
│ ├── ClassForwardTests-Info.plist
│ ├── ClassForwardTests.m
│ └── en.lproj
│ └── InfoPlist.strings
├── CoreDataDemo
├── CoreDataDemo.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── Steven.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── Steven.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── CoreDataDemo.xcscheme
│ │ └── xcschememanagement.plist
├── CoreDataDemo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── CoreDataDemo-Info.plist
│ ├── CoreDataDemo-Prefix.pch
│ ├── CoreDataManager.h
│ ├── CoreDataManager.m
│ ├── DemoModel.xcdatamodeld
│ │ └── DemoModel.xcdatamodel
│ │ │ └── contents
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── RootVC.h
│ ├── RootVC.m
│ ├── TimeEntity.h
│ ├── TimeEntity.m
│ ├── TimeEntityManager.h
│ ├── TimeEntityManager.m
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ └── main.m
└── CoreDataDemoTests
│ ├── CoreDataDemoTests-Info.plist
│ ├── CoreDataDemoTests.m
│ └── en.lproj
│ └── InfoPlist.strings
├── CoreImageDemos
└── DemoCoreImage
│ ├── CoreImageMySelf
│ ├── CoreImageMySelf.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcuserdata
│ │ │ │ └── Steven.xcuserdatad
│ │ │ │ └── UserInterfaceState.xcuserstate
│ │ └── xcuserdata
│ │ │ └── Steven.xcuserdatad
│ │ │ └── xcschemes
│ │ │ ├── CoreImageMySelf.xcscheme
│ │ │ └── xcschememanagement.plist
│ ├── CoreImageMySelf
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── CoreImageMySelf-Info.plist
│ │ ├── CoreImageMySelf-Prefix.pch
│ │ ├── Images.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ └── LaunchImage.launchimage
│ │ │ │ └── Contents.json
│ │ ├── RootVC.h
│ │ ├── RootVC.m
│ │ ├── RootVC.xib
│ │ ├── en.lproj
│ │ │ └── InfoPlist.strings
│ │ ├── main.m
│ │ └── test.JPG
│ └── CoreImageMySelfTests
│ │ ├── CoreImageMySelfTests-Info.plist
│ │ ├── CoreImageMySelfTests.m
│ │ └── en.lproj
│ │ └── InfoPlist.strings
│ └── DemoCoreImage
│ ├── DemoCoreImage.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ ├── Steven.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ │ │ └── shawnwelch.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcuserdata
│ │ ├── Steven.xcuserdatad
│ │ ├── xcdebugger
│ │ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ │ ├── DemoCoreImage.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── shawnwelch.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints.xcbkptlist
│ │ └── xcschemes
│ │ ├── DemoCoreImage.xcscheme
│ │ └── xcschememanagement.plist
│ └── DemoCoreImage
│ ├── AdjustmentsController.h
│ ├── AdjustmentsController.m
│ ├── AdjustmentsTableViewCell.h
│ ├── AdjustmentsTableViewCell.m
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── DemoCoreImage-Info.plist
│ ├── DemoCoreImage-Prefix.pch
│ ├── DemoCoreImageViewController.h
│ ├── DemoCoreImageViewController.m
│ ├── DemoCoreImageViewController_iPad.xib
│ ├── IMG_4230.JPG
│ ├── en.lproj
│ └── InfoPlist.strings
│ └── main.m
├── DelgateSample
├── ClassSample
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── DelegateSample-Info.plist
│ ├── DelegateSample-Prefix.pch
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── NextVC.h
│ ├── NextVC.m
│ ├── RootVC.h
│ ├── RootVC.m
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ └── main.m
├── ClassSampleTests
│ ├── ClassSampleTests.m
│ ├── DelegateSampleTests-Info.plist
│ └── en.lproj
│ │ └── InfoPlist.strings
└── DelegateSample.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── ClassSample.xccheckout
│ └── xcuserdata
│ │ ├── Steven.xcuserdatad
│ │ ├── UserInterfaceState.xcuserstate
│ │ └── WorkspaceSettings.xcsettings
│ │ └── tinybro.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ ├── Steven.xcuserdatad
│ └── xcschemes
│ │ ├── ClassSample.xcscheme
│ │ └── xcschememanagement.plist
│ └── tinybro.xcuserdatad
│ ├── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ ├── ClassSample.xcscheme
│ └── xcschememanagement.plist
├── DemoAudio
├── DemoAudio.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── shawnwelch.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcuserdata
│ │ └── shawnwelch.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints.xcbkptlist
│ │ └── xcschemes
│ │ ├── DemoAudio.xcscheme
│ │ └── xcschememanagement.plist
└── DemoAudio
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── DemoAudio-Info.plist
│ ├── DemoAudio-Prefix.pch
│ ├── DemoAudioViewController.h
│ ├── DemoAudioViewController.m
│ ├── DemoAudioViewController_iPhone.xib
│ ├── background-loop_01.aif
│ ├── en.lproj
│ └── InfoPlist.strings
│ └── main.m
├── DemoCoreAnimation
├── DemoCoreAnimation.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── Steven.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcuserdata
│ │ └── Steven.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── DemoCoreAnimation.xcscheme
│ │ └── xcschememanagement.plist
├── DemoCoreAnimation
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── DemoCoreAnimation-Info.plist
│ ├── DemoCoreAnimation-Prefix.pch
│ ├── FireworksView.h
│ ├── FireworksView.m
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── RootVC.h
│ ├── RootVC.m
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ ├── fire.png
│ ├── main.m
│ ├── smoke.png
│ └── tspark.png
└── DemoCoreAnimationTests
│ ├── DemoCoreAnimationTests-Info.plist
│ ├── DemoCoreAnimationTests.m
│ └── en.lproj
│ └── InfoPlist.strings
├── DemoCoreGraphics
├── DemoCoreGraphics.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ ├── Steven.xcuserdatad
│ │ │ ├── UserInterfaceState.xcuserstate
│ │ │ └── WorkspaceSettings.xcsettings
│ │ │ └── tinybro.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ ├── Steven.xcuserdatad
│ │ └── xcschemes
│ │ │ ├── DemoCoreGraphics.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── tinybro.xcuserdatad
│ │ └── xcschemes
│ │ ├── DemoCoreGraphics.xcscheme
│ │ └── xcschememanagement.plist
├── DemoCoreGraphics
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Common.h
│ ├── Common.m
│ ├── CoolButton.h
│ ├── CoolButton.m
│ ├── DemoCoreGraphics-Info.plist
│ ├── DemoCoreGraphics-Prefix.pch
│ ├── DrawView.h
│ ├── DrawView.m
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── RootVC.h
│ ├── RootVC.m
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ └── main.m
└── DemoCoreGraphicsTests
│ ├── DemoCoreGraphicsTests-Info.plist
│ ├── DemoCoreGraphicsTests.m
│ └── en.lproj
│ └── InfoPlist.strings
├── DemoCoreText
└── MyFirstCoreText
│ ├── DemoCoreText.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── Steven.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── Steven.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── DemoCoreText.xcscheme
│ │ └── xcschememanagement.plist
│ ├── DemoCoreText
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── DemoCoreText-Info.plist
│ ├── DemoCoreText-Prefix.pch
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── MyCoreText.h
│ ├── MyCoreText.m
│ ├── RootVC.h
│ ├── RootVC.m
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ ├── main.m
│ └── meile.png
│ └── DemoCoreTextTests
│ ├── DemoCoreTextTests-Info.plist
│ ├── DemoCoreTextTests.m
│ └── en.lproj
│ └── InfoPlist.strings
├── KVOdemo
├── KVOdemo.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── Steven.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── Steven.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── KVOdemo.xcscheme
│ │ └── xcschememanagement.plist
├── KVOdemo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Book.h
│ ├── Book.m
│ ├── ChangeDetectiveVC.h
│ ├── ChangeDetectiveVC.m
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── KVOdemo-Info.plist
│ ├── KVOdemo-Prefix.pch
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ └── main.m
└── KVOdemoTests
│ ├── KVOdemoTests-Info.plist
│ ├── KVOdemoTests.m
│ └── en.lproj
│ └── InfoPlist.strings
├── README.md
├── Singleton
├── Singleton.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ ├── xcshareddata
│ │ │ └── Singleton.xccheckout
│ │ └── xcuserdata
│ │ │ ├── Steven.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ │ │ └── tinybro.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ ├── Steven.xcuserdatad
│ │ └── xcschemes
│ │ │ ├── Singleton.xcscheme
│ │ │ └── xcschememanagement.plist
│ │ └── tinybro.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── Singleton.xcscheme
│ │ └── xcschememanagement.plist
├── Singleton
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── RootVC.h
│ ├── RootVC.m
│ ├── Singleton-Info.plist
│ ├── Singleton-Prefix.pch
│ ├── Singleton.h
│ ├── Singleton.m
│ ├── UIView+UpsideDown.h
│ ├── UIView+UpsideDown.m
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ └── main.m
└── SingletonTests
│ ├── SingletonTests-Info.plist
│ ├── SingletonTests.m
│ └── en.lproj
│ └── InfoPlist.strings
├── TabedNavVC
├── TabedNavVC.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcuserdata
│ │ │ └── Steven.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcuserdata
│ │ └── Steven.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── TabedNavVC.xcscheme
│ │ └── xcschememanagement.plist
├── TabedNavVC
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── FirstVC.h
│ ├── FirstVC.m
│ ├── Images.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── LaunchImage.launchimage
│ │ │ └── Contents.json
│ ├── RootVC.h
│ ├── RootVC.m
│ ├── SecondVC.h
│ ├── SecondVC.m
│ ├── TabedNavVC-Info.plist
│ ├── TabedNavVC-Prefix.pch
│ ├── en.lproj
│ │ └── InfoPlist.strings
│ └── main.m
└── TabedNavVCTests
│ ├── TabedNavVCTests-Info.plist
│ ├── TabedNavVCTests.m
│ └── en.lproj
│ └── InfoPlist.strings
└── UIWebLoadLocalFiles
├── UIWebLoadLocalFiles.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── Steven.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── xcuserdata
│ └── Steven.xcuserdatad
│ ├── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ ├── UIWebLoadLocalFiles.xcscheme
│ └── xcschememanagement.plist
├── UIWebLoadLocalFiles
├── AppDelegate.h
├── AppDelegate.m
├── Images.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── LaunchImage.launchimage
│ │ └── Contents.json
├── RootVC.h
├── RootVC.m
├── UIWebLoadLocalFiles-Info.plist
├── UIWebLoadLocalFiles-Prefix.pch
├── en.lproj
│ └── InfoPlist.strings
├── main.m
└── xxx.bundle
│ ├── aImage
│ └── aImage
│ │ └── test.png
│ └── index.html
└── UIWebLoadLocalFilesTests
├── UIWebLoadLocalFilesTests-Info.plist
├── UIWebLoadLocalFilesTests.m
└── en.lproj
└── InfoPlist.strings
/ClassForward/ClassForward.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ClassForward/ClassForward.xcodeproj/project.xcworkspace/xcshareddata/ClassForward.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 7BAF5070-B33F-4DF8-880E-EE3776F2B3DA
9 | IDESourceControlProjectName
10 | ClassForward
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | D972AADA-A024-4F84-8741-945633B797B8
14 | https://github.com/caigee/ios_--.git
15 |
16 | IDESourceControlProjectPath
17 | ClassForward/ClassForward.xcodeproj/project.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | D972AADA-A024-4F84-8741-945633B797B8
21 | ../../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/caigee/ios_--.git
25 | IDESourceControlProjectVersion
26 | 110
27 | IDESourceControlProjectWCCIdentifier
28 | D972AADA-A024-4F84-8741-945633B797B8
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | D972AADA-A024-4F84-8741-945633B797B8
36 | IDESourceControlWCCName
37 | ios_基础
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/ClassForward/ClassForward.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/ClassForward/ClassForward.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/ClassForward/ClassForward.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ClassForward/ClassForward.xcodeproj/project.xcworkspace/xcuserdata/tinybro.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/ClassForward/ClassForward.xcodeproj/project.xcworkspace/xcuserdata/tinybro.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/ClassForward/ClassForward.xcodeproj/xcuserdata/Steven.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ClassForward.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9BCCBABA195FCA8A00A5DD83
16 |
17 | primary
18 |
19 |
20 | 9BCCBAD5195FCA8A00A5DD83
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/ClassForward/ClassForward.xcodeproj/xcuserdata/tinybro.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
8 |
20 |
21 |
22 |
24 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/ClassForward/ClassForward.xcodeproj/xcuserdata/tinybro.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ClassForward.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9BCCBABA195FCA8A00A5DD83
16 |
17 | primary
18 |
19 |
20 | 9BCCBAD5195FCA8A00A5DD83
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/ClassForward/ClassForward/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ClassForward
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ClassForward/ClassForward/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // ClassForward
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "RootVC.h"
11 |
12 | @implementation AppDelegate
13 |
14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 | {
16 | self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]autorelease];
17 |
18 | RootVC *root = [[RootVC alloc]init];
19 |
20 |
21 | self.window.rootViewController = root;
22 | [root release];
23 |
24 | // Override point for customization after application launch.
25 | self.window.backgroundColor = [UIColor whiteColor];
26 | [self.window makeKeyAndVisible];
27 | return YES;
28 | }
29 |
30 | - (void)applicationWillResignActive:(UIApplication *)application
31 | {
32 | // 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.
33 | // 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.
34 | }
35 |
36 | - (void)applicationDidEnterBackground:(UIApplication *)application
37 | {
38 | // 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.
39 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
40 | }
41 |
42 | - (void)applicationWillEnterForeground:(UIApplication *)application
43 | {
44 | // 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.
45 | }
46 |
47 | - (void)applicationDidBecomeActive:(UIApplication *)application
48 | {
49 | // 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.
50 | }
51 |
52 | - (void)applicationWillTerminate:(UIApplication *)application
53 | {
54 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
55 | }
56 |
57 | @end
58 |
--------------------------------------------------------------------------------
/ClassForward/ClassForward/ClassForward-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.caigee.Sample
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/ClassForward/ClassForward/ClassForward-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/ClassForward/ClassForward/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/ClassForward/ClassForward/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/ClassForward/ClassForward/NSNull+InternalNullExtention.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSNull+InternalNullExtention.h
3 | // ClassForward
4 | //
5 | // Created by caigee on 14-6-30.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSNull (InternalNullExtention)
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ClassForward/ClassForward/NSNull+InternalNullExtention.m:
--------------------------------------------------------------------------------
1 | //
2 | // NSNull+InternalNullExtention.m
3 | // ClassForward
4 | //
5 | // Created by caigee on 14-6-30.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | //来源于 http://blog.rpplusplus.me/blog/2014/03/28/nsnull-category/
10 |
11 | #define NSNullObjects @[@"",@0,@{},@[]]
12 |
13 | #import "NSNull+InternalNullExtention.h"
14 |
15 | @implementation NSNull (InternalNullExtention)
16 |
17 | - (NSMethodSignature*)methodSignatureForSelector:(SEL)selector
18 | {
19 | NSMethodSignature* signature = [super methodSignatureForSelector:selector];
20 | if (!signature) {
21 | for (NSObject *object in NSNullObjects) {
22 | signature = [object methodSignatureForSelector:selector];
23 | if (signature) {
24 | break;
25 | }
26 | }
27 |
28 | }
29 | return signature;
30 | }
31 |
32 | - (void)forwardInvocation:(NSInvocation *)anInvocation
33 | {
34 | SEL aSelector = [anInvocation selector];
35 |
36 | for (NSObject *object in NSNullObjects) {
37 | if ([object respondsToSelector:aSelector]) {
38 | [anInvocation invokeWithTarget:object];
39 | return;
40 | }
41 | }
42 |
43 | [self doesNotRecognizeSelector:aSelector];
44 | }
45 |
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/ClassForward/ClassForward/RootVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.h
3 | // ClassSample
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface RootVC : UIViewController
12 |
13 | @property (nonatomic,retain)UILabel *displayLabel;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ClassForward/ClassForward/RootVC.m:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.m
3 | // ClassSample
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "RootVC.h"
10 |
11 | @interface RootVC ()
12 |
13 | @end
14 |
15 | @implementation RootVC
16 |
17 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
18 | {
19 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
20 | if (self) {
21 | // Custom initialization
22 | }
23 | return self;
24 | }
25 |
26 | - (void)viewDidLoad
27 | {
28 | [super viewDidLoad];
29 |
30 | self.title = @"Root";
31 |
32 | [self addButton];
33 | // Do any additional setup after loading the view.
34 | }
35 |
36 | -(void)addButton
37 | {
38 | UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
39 | btn.frame = CGRectMake(20.0, 100.0, 100.0, 40.0);
40 | [btn setTitle:@"Next" forState:UIControlStateNormal];
41 | [btn setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
42 | [btn addTarget:self action:@selector(naviNext) forControlEvents:UIControlEventTouchUpInside];
43 | [self.view addSubview:btn];
44 |
45 | UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(20.0, 140.0, 200.0, 30.0)];
46 | self.displayLabel = label;
47 | [self.view addSubview:label];
48 | [label release];
49 |
50 | [self setText:@"你好"]; //这里setText是不能被自己接受的,但是应为在下面做了消息转发,最后事件由self.displayLabel 接受了
51 | }
52 |
53 | -(NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
54 | {
55 | NSMethodSignature *signature = [super methodSignatureForSelector:aSelector];
56 | if (!signature) {
57 | signature = [self.displayLabel methodSignatureForSelector:aSelector];
58 | }
59 | return signature;
60 | }
61 |
62 | -(void)forwardInvocation:(NSInvocation *)anInvocation
63 | {
64 | SEL selector = [anInvocation selector];
65 | if ([self.displayLabel respondsToSelector:selector]) {
66 | [anInvocation invokeWithTarget:self.displayLabel];
67 | }
68 | }
69 |
70 |
71 | -(void)naviNext
72 | {
73 |
74 | }
75 |
76 | - (void)didReceiveMemoryWarning
77 | {
78 | [super didReceiveMemoryWarning];
79 | // Dispose of any resources that can be recreated.
80 | }
81 |
82 | /*
83 | #pragma mark - Navigation
84 |
85 | // In a storyboard-based application, you will often want to do a little preparation before navigation
86 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
87 | {
88 | // Get the new view controller using [segue destinationViewController].
89 | // Pass the selected object to the new view controller.
90 | }
91 | */
92 |
93 | @end
94 |
--------------------------------------------------------------------------------
/ClassForward/ClassForward/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/ClassForward/ClassForward/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ClassForward
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/ClassForward/ClassForwardTests/ClassForwardTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/ClassForward/ClassForwardTests/ClassForwardTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // ClassForwardTests.m
3 | // ClassForwardTests
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ClassForwardTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation ClassForwardTests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/ClassForward/ClassForwardTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/CoreDataDemo/CoreDataDemo.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo.xcodeproj/xcuserdata/Steven.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo.xcodeproj/xcuserdata/Steven.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | CoreDataDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B014E3E61963B92F00C57A8E
16 |
17 | primary
18 |
19 |
20 | B014E4011963B92F00C57A8E
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // CoreDataDemo
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // CoreDataDemo
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "RootVC.h"
11 |
12 | @implementation AppDelegate
13 |
14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 | {
16 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
17 | // Override point for customization after application launch.
18 |
19 | RootVC *rootVC = [[RootVC alloc]init];
20 | UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:rootVC];
21 | self.window.rootViewController = nav;
22 |
23 | self.window.backgroundColor = [UIColor whiteColor];
24 | [self.window makeKeyAndVisible];
25 | return YES;
26 | }
27 |
28 | - (void)applicationWillResignActive:(UIApplication *)application
29 | {
30 | // 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.
31 | // 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.
32 | }
33 |
34 | - (void)applicationDidEnterBackground:(UIApplication *)application
35 | {
36 | // 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.
37 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
38 | }
39 |
40 | - (void)applicationWillEnterForeground:(UIApplication *)application
41 | {
42 | // 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.
43 | }
44 |
45 | - (void)applicationDidBecomeActive:(UIApplication *)application
46 | {
47 | // 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.
48 | }
49 |
50 | - (void)applicationWillTerminate:(UIApplication *)application
51 | {
52 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
53 | }
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo/CoreDataDemo-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | CoreDataDemo
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.caigee.Sample
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo/CoreDataDemo-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo/CoreDataManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // CoreDataManager.h
3 | // CoreDataDemo
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CoreDataManager : NSObject
12 |
13 | @property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
14 | @property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
15 | @property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;
16 |
17 |
18 | +(id)sharedCoreDataManager;
19 | - (BOOL)saveContext;
20 |
21 | // Context Operations
22 | - (void)undo;
23 | - (void)redo;
24 | - (void)rollback;
25 | - (void)reset;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo/DemoModel.xcdatamodeld/DemoModel.xcdatamodel/contents:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "ipad",
20 | "size" : "29x29",
21 | "scale" : "1x"
22 | },
23 | {
24 | "idiom" : "ipad",
25 | "size" : "29x29",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "ipad",
30 | "size" : "40x40",
31 | "scale" : "1x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "40x40",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "76x76",
41 | "scale" : "1x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "76x76",
46 | "scale" : "2x"
47 | }
48 | ],
49 | "info" : {
50 | "version" : 1,
51 | "author" : "xcode"
52 | }
53 | }
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | },
18 | {
19 | "orientation" : "portrait",
20 | "idiom" : "ipad",
21 | "extent" : "full-screen",
22 | "minimum-system-version" : "7.0",
23 | "scale" : "1x"
24 | },
25 | {
26 | "orientation" : "landscape",
27 | "idiom" : "ipad",
28 | "extent" : "full-screen",
29 | "minimum-system-version" : "7.0",
30 | "scale" : "1x"
31 | },
32 | {
33 | "orientation" : "portrait",
34 | "idiom" : "ipad",
35 | "extent" : "full-screen",
36 | "minimum-system-version" : "7.0",
37 | "scale" : "2x"
38 | },
39 | {
40 | "orientation" : "landscape",
41 | "idiom" : "ipad",
42 | "extent" : "full-screen",
43 | "minimum-system-version" : "7.0",
44 | "scale" : "2x"
45 | }
46 | ],
47 | "info" : {
48 | "version" : 1,
49 | "author" : "xcode"
50 | }
51 | }
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo/RootVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.h
3 | // CoreDataDemo
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "TimeEntityManager.h"
11 |
12 | @interface RootVC : UIViewController
13 | {
14 | NSMutableArray *timesArray;
15 | TimeEntityManager *sharedManager;
16 |
17 | int currentNmumber;
18 |
19 | }
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo/TimeEntity.h:
--------------------------------------------------------------------------------
1 | //
2 | // TimeEntity.h
3 | // CoreDataDemo
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 |
13 | @interface TimeEntity : NSManagedObject
14 |
15 | @property (nonatomic, retain) NSString * timeCreated;
16 | @property (nonatomic, retain) NSNumber * number;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo/TimeEntity.m:
--------------------------------------------------------------------------------
1 | //
2 | // TimeEntity.m
3 | // CoreDataDemo
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "TimeEntity.h"
10 |
11 |
12 | @implementation TimeEntity
13 |
14 | @dynamic timeCreated;
15 | @dynamic number;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo/TimeEntityManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // TimeEntityManager.h
3 | // CoreDataDemo
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "CoreDataManager.h"
10 | #import "TimeEntity.h"
11 |
12 | @interface TimeEntityManager : CoreDataManager
13 |
14 | -(NSArray *)timeEntities;
15 | -(NSArray *)timeEntitiesWithTitle:(NSString *)title;
16 | -(TimeEntity *)makeEntityWithTime:(NSString *)time;
17 | -(BOOL)removeTimeEnities:(NSArray *)timeEArray;
18 | -(BOOL)removeALLTimeEnities;
19 |
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // CoreDataDemo
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemoTests/CoreDataDemoTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemoTests/CoreDataDemoTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // CoreDataDemoTests.m
3 | // CoreDataDemoTests
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CoreDataDemoTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation CoreDataDemoTests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/CoreDataDemo/CoreDataDemoTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelf.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelf.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelf.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelf.xcodeproj/xcuserdata/Steven.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | CoreImageMySelf.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B071A93E19669E51007ED6BE
16 |
17 | primary
18 |
19 |
20 | B071A95919669E51007ED6BE
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelf/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // CoreImageMySelf
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelf/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // CoreImageMySelf
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "RootVC.h"
11 |
12 | @implementation AppDelegate
13 |
14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 | {
16 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
17 | // Override point for customization after application launch.
18 | RootVC *root = [[RootVC alloc]init];
19 | self.window.rootViewController = root;
20 |
21 | self.window.backgroundColor = [UIColor whiteColor];
22 | [self.window makeKeyAndVisible];
23 | return YES;
24 | }
25 |
26 | - (void)applicationWillResignActive:(UIApplication *)application
27 | {
28 | // 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.
29 | // 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.
30 | }
31 |
32 | - (void)applicationDidEnterBackground:(UIApplication *)application
33 | {
34 | // 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.
35 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
36 | }
37 |
38 | - (void)applicationWillEnterForeground:(UIApplication *)application
39 | {
40 | // 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.
41 | }
42 |
43 | - (void)applicationDidBecomeActive:(UIApplication *)application
44 | {
45 | // 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.
46 | }
47 |
48 | - (void)applicationWillTerminate:(UIApplication *)application
49 | {
50 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelf/CoreImageMySelf-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | CoreImageDemo
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.caigee.Sample
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations~ipad
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationPortraitUpsideDown
35 | UIInterfaceOrientationLandscapeLeft
36 | UIInterfaceOrientationLandscapeRight
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelf/CoreImageMySelf-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelf/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "ipad",
5 | "size" : "29x29",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "ipad",
10 | "size" : "29x29",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "ipad",
15 | "size" : "40x40",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "ipad",
20 | "size" : "40x40",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "ipad",
25 | "size" : "76x76",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "ipad",
30 | "size" : "76x76",
31 | "scale" : "2x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelf/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "ipad",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "1x"
9 | },
10 | {
11 | "orientation" : "landscape",
12 | "idiom" : "ipad",
13 | "extent" : "full-screen",
14 | "minimum-system-version" : "7.0",
15 | "scale" : "1x"
16 | },
17 | {
18 | "orientation" : "portrait",
19 | "idiom" : "ipad",
20 | "extent" : "full-screen",
21 | "minimum-system-version" : "7.0",
22 | "scale" : "2x"
23 | },
24 | {
25 | "orientation" : "landscape",
26 | "idiom" : "ipad",
27 | "extent" : "full-screen",
28 | "minimum-system-version" : "7.0",
29 | "scale" : "2x"
30 | }
31 | ],
32 | "info" : {
33 | "version" : 1,
34 | "author" : "xcode"
35 | }
36 | }
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelf/RootVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.h
3 | // CoreImageMySelf
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface RootVC : UIViewController
12 |
13 | @property (nonatomic,strong)IBOutlet UIImageView *myImageView;
14 |
15 | @property (nonatomic,strong)UIImage *originalImage;
16 | @property (nonatomic,strong)CIContext *imageContext;
17 |
18 | -(IBAction)defaultImage:(id)sender;
19 | -(IBAction)autoImage:(id)sender;
20 | -(IBAction)sepiaTone:(id)sender;
21 | -(IBAction)faceDetect:(id)sender;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelf/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelf/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // CoreImageMySelf
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelf/test.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelf/test.JPG
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelfTests/CoreImageMySelfTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelfTests/CoreImageMySelfTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // CoreImageMySelfTests.m
3 | // CoreImageMySelfTests
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CoreImageMySelfTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation CoreImageMySelfTests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/CoreImageMySelf/CoreImageMySelfTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage.xcodeproj/project.xcworkspace/xcuserdata/shawnwelch.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage.xcodeproj/project.xcworkspace/xcuserdata/shawnwelch.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage.xcodeproj/project.xcworkspace/xcuserdata/shawnwelch.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildLocationStyle
6 | UseAppPreferences
7 | DerivedDataLocationStyle
8 | Default
9 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
10 |
11 | IDEWorkspaceUserSettings_BuildLocationStyle
12 | 0
13 | IDEWorkspaceUserSettings_BuildSubfolderNameStyle
14 | 0
15 | IDEWorkspaceUserSettings_DerivedDataLocationStyle
16 | 0
17 | IDEWorkspaceUserSettings_IssueFilterStyle
18 | 0
19 | IDEWorkspaceUserSettings_LiveSourceIssuesEnabled
20 |
21 | IDEWorkspaceUserSettings_SnapshotAutomaticallyBeforeSignificantChanges
22 |
23 | IDEWorkspaceUserSettings_SnapshotLocationStyle
24 | 0
25 | IssueFilterStyle
26 | ShowActiveSchemeOnly
27 | LiveSourceIssuesEnabled
28 |
29 | SnapshotAutomaticallyBeforeSignificantChanges
30 |
31 | SnapshotLocationStyle
32 | Default
33 |
34 |
35 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage.xcodeproj/xcuserdata/Steven.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage.xcodeproj/xcuserdata/Steven.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DemoCoreImage.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | BE5F8980144F5CED00C63B35
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage.xcodeproj/xcuserdata/shawnwelch.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage.xcodeproj/xcuserdata/shawnwelch.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DemoCoreImage.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | BE5F8980144F5CED00C63B35
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage/AdjustmentsController.h:
--------------------------------------------------------------------------------
1 | //
2 | // AdjustmentsController.h
3 | // DemoCoreImage
4 | //
5 | // Created by Shawn Welch on 10/20/11.
6 | // Copyright (c) 2011 anythingsimple.com_. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AdjustmentsTableViewCell.h"
11 |
12 | @protocol AdjustmentsControllerDelegate;
13 | @interface AdjustmentsController : UITableViewController {
14 |
15 | }
16 |
17 | @property (nonatomic, assign) id delegate;
18 | @property (nonatomic, strong) NSMutableArray *filters;
19 | @property (nonatomic, strong) NSMutableArray *sliderValues, *sliderValuesDefault;
20 |
21 | - (IBAction)sliderValueChanged:(UISlider*)sender;
22 |
23 |
24 | @end
25 |
26 | @protocol AdjustmentsControllerDelegate
27 |
28 | - (void)filterName:(NSString*)filterName didUpdateFilterNumberValue:(CGFloat)newValue forAttribtueKey:(NSString*)attributeKey;
29 | - (void)didUpdateFiltersWithValues:(NSArray*)filterValues;
30 |
31 | @end
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage/AdjustmentsTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // AdjustmentsTableViewCell.h
3 | // DemoCoreImage
4 | //
5 | // Created by Shawn Welch on 10/20/11.
6 | // Copyright (c) 2011 anythingsimple.com_. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @protocol AdjustmentsTableViewCellDelegate;
12 | @interface AdjustmentsTableViewCell : UITableViewCell
13 |
14 | @property (nonatomic, assign) id delegate;
15 | @property (nonatomic, strong) UISlider *slider;
16 | @property (nonatomic, strong) UILabel *attributeLabel;
17 | @property (nonatomic, strong) NSString *filterName, *attributeKey;
18 |
19 |
20 | @end
21 |
22 | @protocol AdjustmentsTableViewCellDelegate
23 |
24 | - (void)sliderValueChanged:(AdjustmentsTableViewCell*)cell;
25 |
26 | @end
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage/AdjustmentsTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // AdjustmentsTableViewCell.m
3 | // DemoCoreImage
4 | //
5 | // Created by Shawn Welch on 10/20/11.
6 | // Copyright (c) 2011 anythingsimple.com_. All rights reserved.
7 | //
8 |
9 | #import "AdjustmentsTableViewCell.h"
10 |
11 | @implementation AdjustmentsTableViewCell
12 | @synthesize delegate = _delegate;
13 | @synthesize slider = _slider, attributeLabel = _attributeLabel, filterName = _filterName, attributeKey = _attributeKey;
14 |
15 | - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
16 | {
17 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
18 | if (self) {
19 | // Initialization code
20 |
21 | _slider = [[UISlider alloc] init];
22 | [_slider addTarget:self action:@selector(sliderValueChanged:) forControlEvents:UIControlEventValueChanged];
23 | _attributeLabel = [[UILabel alloc] initWithFrame:CGRectZero];
24 |
25 | [self.contentView addSubview:_slider];
26 | [self.contentView addSubview:_attributeLabel];
27 | }
28 | return self;
29 | }
30 |
31 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated
32 | {
33 | [super setSelected:selected animated:animated];
34 |
35 | // Configure the view for the selected state
36 | }
37 |
38 | #pragma mark - Slider Target
39 |
40 | - (void)sliderValueChanged:(UISlider*)slider{
41 | [_delegate sliderValueChanged:self];
42 | }
43 |
44 | #pragma mark - UITableViewCell Overrides
45 |
46 | - (void)layoutSubviews{
47 | [super layoutSubviews];
48 |
49 | _slider.frame = CGRectMake(10, 0, self.bounds.size.width-40, 40);
50 |
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DemoCoreImage
4 | //
5 | // Created by Shawn Welch on 10/19/11.
6 | // Copyright (c) 2011 anythingsimple.com_. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // DemoCoreImage
4 | //
5 | // Created by Shawn Welch on 10/19/11.
6 | // Copyright (c) 2011 anythingsimple.com_. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "DemoCoreImageViewController.h"
11 |
12 | @implementation AppDelegate
13 |
14 | @synthesize window = _window;
15 |
16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
17 | {
18 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
19 | self.window.backgroundColor = [UIColor blackColor];
20 | // Override point for customization after application launch.
21 |
22 |
23 | DemoCoreImageViewController *root = [[DemoCoreImageViewController alloc] initWithNibName:@"DemoCoreImageViewController_iPad" bundle:nil];
24 | [self.window setRootViewController:root];
25 |
26 | [self.window makeKeyAndVisible];
27 | return YES;
28 | }
29 |
30 | - (void)applicationWillResignActive:(UIApplication *)application
31 | {
32 | /*
33 | 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.
34 | 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.
35 | */
36 | }
37 |
38 | - (void)applicationDidEnterBackground:(UIApplication *)application
39 | {
40 | /*
41 | 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.
42 | If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
43 | */
44 | }
45 |
46 | - (void)applicationWillEnterForeground:(UIApplication *)application
47 | {
48 | /*
49 | 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.
50 | */
51 | }
52 |
53 | - (void)applicationDidBecomeActive:(UIApplication *)application
54 | {
55 | /*
56 | 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.
57 | */
58 | }
59 |
60 | - (void)applicationWillTerminate:(UIApplication *)application
61 | {
62 | /*
63 | Called when the application is about to terminate.
64 | Save data if appropriate.
65 | See also applicationDidEnterBackground:.
66 | */
67 | }
68 |
69 | @end
70 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage/DemoCoreImage-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIconFiles
12 |
13 | CFBundleIdentifier
14 | com.anythingsimple.${PRODUCT_NAME:rfc1034identifier}
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | ${PRODUCT_NAME}
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | 1.0
23 | CFBundleSignature
24 | ????
25 | CFBundleVersion
26 | 1.0
27 | LSRequiresIPhoneOS
28 |
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage/DemoCoreImage-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'DemoCoreImage' target in the 'DemoCoreImage' project
3 | //
4 |
5 | #import
6 |
7 | #ifndef __IPHONE_3_0
8 | #warning "This project uses features only available in iOS SDK 3.0 and later."
9 | #endif
10 |
11 | #ifdef __OBJC__
12 | #import
13 | #import
14 | #import
15 | #endif
16 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage/DemoCoreImageViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // DemoCoreImageViewController.h
3 | // DemoCoreImage
4 | //
5 | // Created by Shawn Welch on 10/19/11.
6 | // Copyright (c) 2011 anythingsimple.com_. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "AdjustmentsController.h"
12 |
13 |
14 | @interface DemoCoreImageViewController : UIViewController {
15 | IBOutlet UIBarButtonItem *_sourceButton;
16 | IBOutlet UIBarButtonItem *_actionButton;
17 | IBOutlet UISwitch *_showsFacesSwith;
18 |
19 | NSMutableDictionary *_defaultFilterValues;
20 |
21 | @private
22 | UIActionSheet *_actions;
23 | UIActionSheet *_source;
24 | NSMutableArray *_faceBoxes;
25 |
26 | BOOL _applyingFilter;
27 |
28 | UIPopoverController *_imagePickerPopover;
29 | UIPopoverController *_adjustmentsPopover;
30 | }
31 |
32 |
33 | @property (nonatomic, strong) CIContext *imageContext;
34 | @property (nonatomic, strong) IBOutlet UIImageView *imageView;
35 | @property (nonatomic, strong) UIImage *originalImage;
36 |
37 | @property (nonatomic, strong) IBOutlet UIActivityIndicatorView *adjustSpinner;
38 | @property (nonatomic, strong) IBOutlet UIActivityIndicatorView *faceSpinner;
39 |
40 | - (IBAction)actionButtonPressed:(UIBarButtonItem*)sender;
41 | - (IBAction)selectSourceButtonPressed:(UIBarButtonItem*)sender;
42 | - (IBAction)toggleShowsFaces:(UISwitch*)showsFacesSwitch;
43 | - (IBAction)autoAdjustButtonPressed:(UIBarButtonItem*)sender;
44 |
45 |
46 | // Core Image Operations
47 |
48 | - (CGImageRef)autoAdjustImage;
49 | - (void)updateFaceBoxes;
50 | - (CIImage*)makeBoxForFace:(CIFaceFeature*)face;
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage/IMG_4230.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage/IMG_4230.JPG
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/CoreImageDemos/DemoCoreImage/DemoCoreImage/DemoCoreImage/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DemoCoreImage
4 | //
5 | // Created by Shawn Welch on 10/19/11.
6 | // Copyright (c) 2011 anythingsimple.com_. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char *argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/DelgateSample/ClassSample/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ClassSample
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/DelgateSample/ClassSample/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // ClassSample
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "RootVC.h"
11 |
12 | @implementation AppDelegate
13 |
14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 | {
16 | self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]autorelease];
17 | // Override point for customization after application launch.
18 | RootVC *rootVC = [[RootVC alloc]init];
19 | UINavigationController *navGation = [[UINavigationController alloc]initWithRootViewController:rootVC];
20 | [rootVC release];
21 | self.window.rootViewController = navGation;
22 | [navGation release];
23 |
24 | self.window.backgroundColor = [UIColor whiteColor];
25 | [self.window makeKeyAndVisible];
26 | return YES;
27 | }
28 |
29 | - (void)applicationWillResignActive:(UIApplication *)application
30 | {
31 | // 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.
32 | // 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.
33 | }
34 |
35 | - (void)applicationDidEnterBackground:(UIApplication *)application
36 | {
37 | // 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.
38 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
39 | }
40 |
41 | - (void)applicationWillEnterForeground:(UIApplication *)application
42 | {
43 | // 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.
44 | }
45 |
46 | - (void)applicationDidBecomeActive:(UIApplication *)application
47 | {
48 | // 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.
49 | }
50 |
51 | - (void)applicationWillTerminate:(UIApplication *)application
52 | {
53 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
54 | }
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/DelgateSample/ClassSample/DelegateSample-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | 代理/协议
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.caigee.Sample
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/DelgateSample/ClassSample/DelegateSample-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/DelgateSample/ClassSample/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/DelgateSample/ClassSample/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/DelgateSample/ClassSample/NextVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // NextVC.h
3 | // ClassSample
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @protocol textSendDelegate;
13 |
14 | @interface NextVC : UIViewController
15 | {
16 | UITextField *_myTextField;
17 | }
18 | // 协议的实例
19 | @property (nonatomic,assign)id delegate;
20 |
21 |
22 | @end
23 |
24 |
25 | // 协议的声明
26 | @protocol textSendDelegate
27 |
28 | //一定要实现的
29 | @required
30 | -(void)textSend:(NSString *)textString;
31 | //可选实现
32 | @optional
33 | -(void)logOfTextSend;
34 |
35 | @end
--------------------------------------------------------------------------------
/DelgateSample/ClassSample/NextVC.m:
--------------------------------------------------------------------------------
1 | //
2 | // NextVC.m
3 | // ClassSample
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "NextVC.h"
10 |
11 | @interface NextVC ()
12 |
13 | @end
14 |
15 | @implementation NextVC
16 |
17 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
18 | {
19 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
20 | if (self) {
21 | // Custom initialization
22 | }
23 | return self;
24 | }
25 |
26 | -(void)dealloc
27 | {
28 | [_myTextField release];
29 | [super dealloc];
30 | }
31 |
32 | - (void)viewDidLoad
33 | {
34 | [super viewDidLoad];
35 | self.title = @"Next";
36 | self.view.backgroundColor = [UIColor grayColor];
37 |
38 | [self addInput];
39 | // Do any additional setup after loading the view.
40 | }
41 |
42 | -(void)addInput
43 | {
44 | UITextField *textf = [[UITextField alloc]initWithFrame:CGRectMake(20.0, 100.0, 200.0, 30.0)];
45 | textf.backgroundColor = [UIColor whiteColor];
46 | [textf.layer setCornerRadius:4.0];
47 | _myTextField = textf;
48 | [self.view addSubview:textf];
49 |
50 | UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
51 | btn.frame = CGRectMake(20.0, 130, 100.0, 40.0);
52 | [btn setTitle:@"Send" forState:UIControlStateNormal];
53 | [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
54 | [btn addTarget:self action:@selector(SendTextByDelegate) forControlEvents:UIControlEventTouchUpInside];
55 | [self.view addSubview:btn];
56 | }
57 |
58 | // 协议方法的触发
59 | -(void)SendTextByDelegate
60 | {
61 | if (self.delegate && [self.delegate respondsToSelector:@selector(textSend:)]) {
62 | [self.delegate textSend:_myTextField.text];
63 | }
64 | if (self.delegate && [self.delegate respondsToSelector:@selector(logOfTextSend)]) {
65 | [self.delegate logOfTextSend];
66 | }
67 |
68 | [self.navigationController popViewControllerAnimated:YES];
69 | }
70 |
71 | - (void)didReceiveMemoryWarning
72 | {
73 | [super didReceiveMemoryWarning];
74 | // Dispose of any resources that can be recreated.
75 | }
76 |
77 |
78 | /*
79 | #pragma mark - Navigation
80 |
81 | // In a storyboard-based application, you will often want to do a little preparation before navigation
82 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
83 | {
84 | // Get the new view controller using [segue destinationViewController].
85 | // Pass the selected object to the new view controller.
86 | }
87 | */
88 |
89 | @end
90 |
--------------------------------------------------------------------------------
/DelgateSample/ClassSample/RootVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.h
3 | // ClassSample
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "NextVC.h"
11 |
12 | // 申明协议实现
13 | @interface RootVC : UIViewController
14 |
15 | @property (nonatomic,retain)UILabel *displayLabel;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/DelgateSample/ClassSample/RootVC.m:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.m
3 | // ClassSample
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "RootVC.h"
10 | #import "NextVC.h"
11 |
12 | @interface RootVC ()
13 |
14 | @end
15 |
16 | @implementation RootVC
17 |
18 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
19 | {
20 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
21 | if (self) {
22 | // Custom initialization
23 | }
24 | return self;
25 | }
26 |
27 | - (void)viewDidLoad
28 | {
29 | [super viewDidLoad];
30 |
31 | self.title = @"Root";
32 |
33 | [self addButton];
34 | // Do any additional setup after loading the view.
35 | }
36 |
37 | -(void)addButton
38 | {
39 | UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
40 | btn.frame = CGRectMake(20.0, 100.0, 100.0, 40.0);
41 | [btn setTitle:@"Next" forState:UIControlStateNormal];
42 | [btn setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
43 | [btn addTarget:self action:@selector(naviNext) forControlEvents:UIControlEventTouchUpInside];
44 | [self.view addSubview:btn];
45 |
46 | UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(20.0, 140.0, 200.0, 30.0)];
47 | self.displayLabel = label;
48 | [self.view addSubview:label];
49 | [label release];
50 |
51 | }
52 |
53 |
54 | -(void)naviNext
55 | {
56 | //协议的绑定
57 | NextVC *next = [[NextVC alloc]init];
58 | next.delegate =self;
59 | [self.navigationController pushViewController:next animated:YES];
60 | [next release];
61 | }
62 |
63 | // 协议实现
64 | -(void)textSend:(NSString *)textString
65 | {
66 | self.displayLabel.text = textString;
67 | }
68 |
69 | -(void)logOfTextSend
70 | {
71 | NSLog(@"a text is send to RootVC");
72 | }
73 |
74 | - (void)didReceiveMemoryWarning
75 | {
76 | [super didReceiveMemoryWarning];
77 | // Dispose of any resources that can be recreated.
78 | }
79 |
80 | /*
81 | #pragma mark - Navigation
82 |
83 | // In a storyboard-based application, you will often want to do a little preparation before navigation
84 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
85 | {
86 | // Get the new view controller using [segue destinationViewController].
87 | // Pass the selected object to the new view controller.
88 | }
89 | */
90 |
91 | @end
92 |
--------------------------------------------------------------------------------
/DelgateSample/ClassSample/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/DelgateSample/ClassSample/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ClassSample
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/DelgateSample/ClassSampleTests/ClassSampleTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // ClassSampleTests.m
3 | // ClassSampleTests
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ClassSampleTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation ClassSampleTests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/DelgateSample/ClassSampleTests/DelegateSampleTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/DelgateSample/ClassSampleTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/DelgateSample/DelegateSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DelgateSample/DelegateSample.xcodeproj/project.xcworkspace/xcshareddata/ClassSample.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 98BED858-E1A4-42EE-AAA3-6201013D2BC0
9 | IDESourceControlProjectName
10 | ClassSample
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | D972AADA-A024-4F84-8741-945633B797B8
14 | https://github.com/caigee/ios_--.git
15 |
16 | IDESourceControlProjectPath
17 | ClassSample/ClassSample.xcodeproj/project.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | D972AADA-A024-4F84-8741-945633B797B8
21 | ../../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/caigee/ios_--.git
25 | IDESourceControlProjectVersion
26 | 110
27 | IDESourceControlProjectWCCIdentifier
28 | D972AADA-A024-4F84-8741-945633B797B8
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | D972AADA-A024-4F84-8741-945633B797B8
36 | IDESourceControlWCCName
37 | ios_基础
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/DelgateSample/DelegateSample.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/DelgateSample/DelegateSample.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DelgateSample/DelegateSample.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/DelgateSample/DelegateSample.xcodeproj/project.xcworkspace/xcuserdata/tinybro.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/DelgateSample/DelegateSample.xcodeproj/project.xcworkspace/xcuserdata/tinybro.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DelgateSample/DelegateSample.xcodeproj/xcuserdata/Steven.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ClassSample.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9B541B89195F1E4200E529A9
16 |
17 | primary
18 |
19 |
20 | 9B541BA4195F1E4200E529A9
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/DelgateSample/DelegateSample.xcodeproj/xcuserdata/tinybro.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/DelgateSample/DelegateSample.xcodeproj/xcuserdata/tinybro.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | ClassSample.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9B541B89195F1E4200E529A9
16 |
17 | primary
18 |
19 |
20 | 9B541BA4195F1E4200E529A9
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/DemoAudio/DemoAudio.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DemoAudio/DemoAudio.xcodeproj/project.xcworkspace/xcuserdata/shawnwelch.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/DemoAudio/DemoAudio.xcodeproj/project.xcworkspace/xcuserdata/shawnwelch.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DemoAudio/DemoAudio.xcodeproj/project.xcworkspace/xcuserdata/shawnwelch.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildLocationStyle
6 | UseAppPreferences
7 | CustomBuildLocationType
8 | RelativeToDerivedData
9 | DerivedDataLocationStyle
10 | Default
11 | IssueFilterStyle
12 | ShowActiveSchemeOnly
13 | LiveSourceIssuesEnabled
14 |
15 | SnapshotAutomaticallyBeforeSignificantChanges
16 |
17 | SnapshotLocationStyle
18 | Default
19 |
20 |
21 |
--------------------------------------------------------------------------------
/DemoAudio/DemoAudio.xcodeproj/xcuserdata/shawnwelch.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/DemoAudio/DemoAudio.xcodeproj/xcuserdata/shawnwelch.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DemoAudio.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | BEA891AE1458FC0B00CB52C2
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/DemoAudio/DemoAudio/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DemoAudio
4 | //
5 | // Created by Shawn Welch on 10/26/11.
6 | // Copyright (c) 2011 anythingsimple.com. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/DemoAudio/DemoAudio/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // DemoAudio
4 | //
5 | // Created by Shawn Welch on 10/26/11.
6 | // Copyright (c) 2011 anythingsimple.com. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "DemoAudioViewController.h"
11 |
12 | @implementation AppDelegate
13 |
14 | @synthesize window = _window;
15 |
16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
17 | {
18 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
19 | // Override point for customization after application launch.
20 | self.window.backgroundColor = [UIColor blackColor];
21 |
22 | DemoAudioViewController *root = [[DemoAudioViewController alloc] initWithNibName:@"DemoAudioViewController_iPhone" bundle:nil];
23 | [self.window setRootViewController:root];
24 |
25 | [self.window makeKeyAndVisible];
26 | return YES;
27 | }
28 |
29 | - (void)applicationWillResignActive:(UIApplication *)application
30 | {
31 | /*
32 | 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.
33 | 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.
34 | */
35 | }
36 |
37 | - (void)applicationDidEnterBackground:(UIApplication *)application
38 | {
39 | /*
40 | 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.
41 | If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
42 | */
43 | }
44 |
45 | - (void)applicationWillEnterForeground:(UIApplication *)application
46 | {
47 | /*
48 | 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.
49 | */
50 | }
51 |
52 | - (void)applicationDidBecomeActive:(UIApplication *)application
53 | {
54 | /*
55 | 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.
56 | */
57 | }
58 |
59 | - (void)applicationWillTerminate:(UIApplication *)application
60 | {
61 | /*
62 | Called when the application is about to terminate.
63 | Save data if appropriate.
64 | See also applicationDidEnterBackground:.
65 | */
66 | }
67 |
68 | @end
69 |
--------------------------------------------------------------------------------
/DemoAudio/DemoAudio/DemoAudio-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIconFiles
12 |
13 | CFBundleIdentifier
14 | com.anythingsimple.${PRODUCT_NAME:rfc1034identifier}
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | ${PRODUCT_NAME}
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | 1.0
23 | CFBundleSignature
24 | ????
25 | CFBundleURLTypes
26 |
27 |
28 |
29 | CFBundleVersion
30 | 1.0
31 | LSRequiresIPhoneOS
32 |
33 | UIRequiredDeviceCapabilities
34 |
35 | armv7
36 |
37 | UISupportedInterfaceOrientations
38 |
39 | UIInterfaceOrientationPortrait
40 |
41 | UISupportedInterfaceOrientations~ipad
42 |
43 | UIInterfaceOrientationPortrait
44 | UIInterfaceOrientationPortraitUpsideDown
45 | UIInterfaceOrientationLandscapeLeft
46 | UIInterfaceOrientationLandscapeRight
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/DemoAudio/DemoAudio/DemoAudio-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'DemoAudio' target in the 'DemoAudio' project
3 | //
4 |
5 | #import
6 |
7 | #ifndef __IPHONE_3_0
8 | #warning "This project uses features only available in iOS SDK 3.0 and later."
9 | #endif
10 |
11 | #ifdef __OBJC__
12 | #import
13 | #import
14 | #endif
15 |
--------------------------------------------------------------------------------
/DemoAudio/DemoAudio/DemoAudioViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // DemoAudioViewController.h
3 | // DemoAudio
4 | //
5 | // Created by Shawn Welch on 10/26/11.
6 | // Copyright (c) 2011 anythingsimple.com. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 | #import "MediaPlayer/MediaPlayer.h"
13 |
14 | @interface DemoAudioViewController : UIViewController
15 |
16 | @property (nonatomic, strong) MPMusicPlayerController *player;
17 | @property (nonatomic, strong) AVAudioPlayer *backgroundPlayer;
18 | @property (nonatomic, strong) IBOutlet UILabel *songLabel, *artistLabel;
19 | @property (nonatomic, strong) IBOutlet UISlider *volumeSlider;
20 | @property (nonatomic, strong) IBOutlet UIButton *playButton;
21 | @property (nonatomic, strong) IBOutlet UISwitch *backgroundMusicSwitch, *ambientSoloSwitch;
22 |
23 | - (IBAction)playTogglePressed:(id)sender;
24 | - (IBAction)musicLibraryButton:(id)sender;
25 | - (IBAction)volumeSliderChange:(id)sender;
26 | - (IBAction)backgroundMusicSwitchChange:(id)sender;
27 | - (IBAction)ambientSoloSwitchChange:(id)sender;
28 |
29 |
30 | - (void)updateMainUI:(NSNotification*)notification;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/DemoAudio/DemoAudio/background-loop_01.aif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/DemoAudio/DemoAudio/background-loop_01.aif
--------------------------------------------------------------------------------
/DemoAudio/DemoAudio/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/DemoAudio/DemoAudio/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DemoAudio
4 | //
5 | // Created by Shawn Welch on 10/26/11.
6 | // Copyright (c) 2011 anythingsimple.com. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char *argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/DemoCoreAnimation/DemoCoreAnimation.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation.xcodeproj/xcuserdata/Steven.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation.xcodeproj/xcuserdata/Steven.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DemoCoreAnimation.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B00DEE29196A362C00DD6F61
16 |
17 | primary
18 |
19 |
20 | B00DEE44196A362C00DD6F61
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DemoCoreAnimation
4 | //
5 | // Created by caigee on 14-7-7.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // DemoCoreAnimation
4 | //
5 | // Created by caigee on 14-7-7.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "RootVC.h"
11 |
12 | @implementation AppDelegate
13 |
14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 | {
16 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
17 | // Override point for customization after application launch.
18 | RootVC *root = [[RootVC alloc]init];
19 | self.window.rootViewController = root;
20 |
21 | self.window.backgroundColor = [UIColor whiteColor];
22 | [self.window makeKeyAndVisible];
23 | return YES;
24 | }
25 |
26 | - (void)applicationWillResignActive:(UIApplication *)application
27 | {
28 | // 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.
29 | // 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.
30 | }
31 |
32 | - (void)applicationDidEnterBackground:(UIApplication *)application
33 | {
34 | // 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.
35 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
36 | }
37 |
38 | - (void)applicationWillEnterForeground:(UIApplication *)application
39 | {
40 | // 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.
41 | }
42 |
43 | - (void)applicationDidBecomeActive:(UIApplication *)application
44 | {
45 | // 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.
46 | }
47 |
48 | - (void)applicationWillTerminate:(UIApplication *)application
49 | {
50 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation/DemoCoreAnimation-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation/DemoCoreAnimation-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation/FireworksView.h:
--------------------------------------------------------------------------------
1 | //
2 | // EmitterView.h
3 | // CAEmitterDemo
4 | //
5 | // Created by Shawn Welch on 10/6/11.
6 | // Copyright (c) 2011 anythingsimple.com. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface FireworksView : UIView{
13 |
14 |
15 | }
16 |
17 | - (void)launchFirework;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation/RootVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.h
3 | // DemoCoreAnimation
4 | //
5 | // Created by caigee on 14-7-7.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface RootVC : UIViewController
12 |
13 | @property (nonatomic,strong)UIView *_box;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation/fire.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/DemoCoreAnimation/DemoCoreAnimation/fire.png
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DemoCoreAnimation
4 | //
5 | // Created by caigee on 14-7-7.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation/smoke.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/DemoCoreAnimation/DemoCoreAnimation/smoke.png
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimation/tspark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/DemoCoreAnimation/DemoCoreAnimation/tspark.png
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimationTests/DemoCoreAnimationTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimationTests/DemoCoreAnimationTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // DemoCoreAnimationTests.m
3 | // DemoCoreAnimationTests
4 | //
5 | // Created by caigee on 14-7-7.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DemoCoreAnimationTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation DemoCoreAnimationTests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/DemoCoreAnimation/DemoCoreAnimationTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/DemoCoreGraphics/DemoCoreGraphics.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges
6 |
7 | SnapshotAutomaticallyBeforeSignificantChanges
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics.xcodeproj/project.xcworkspace/xcuserdata/tinybro.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/DemoCoreGraphics/DemoCoreGraphics.xcodeproj/project.xcworkspace/xcuserdata/tinybro.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics.xcodeproj/xcuserdata/Steven.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DemoCoreGraphics.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B071A9801966B544007ED6BE
16 |
17 | primary
18 |
19 |
20 | B071A99B1966B544007ED6BE
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics.xcodeproj/xcuserdata/tinybro.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DemoCoreGraphics.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B071A9801966B544007ED6BE
16 |
17 | primary
18 |
19 |
20 | B071A99B1966B544007ED6BE
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DemoCoreGraphics
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // DemoCoreGraphics
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "RootVC.h"
11 |
12 | @implementation AppDelegate
13 |
14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 | {
16 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
17 | // Override point for customization after application launch.
18 | RootVC *root = [[RootVC alloc]init];
19 | self.window.rootViewController =root;
20 |
21 | self.window.backgroundColor = [UIColor whiteColor];
22 | [self.window makeKeyAndVisible];
23 | return YES;
24 | }
25 |
26 | - (void)applicationWillResignActive:(UIApplication *)application
27 | {
28 | // 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.
29 | // 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.
30 | }
31 |
32 | - (void)applicationDidEnterBackground:(UIApplication *)application
33 | {
34 | // 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.
35 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
36 | }
37 |
38 | - (void)applicationWillEnterForeground:(UIApplication *)application
39 | {
40 | // 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.
41 | }
42 |
43 | - (void)applicationDidBecomeActive:(UIApplication *)application
44 | {
45 | // 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.
46 | }
47 |
48 | - (void)applicationWillTerminate:(UIApplication *)application
49 | {
50 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics/Common.h:
--------------------------------------------------------------------------------
1 | //
2 | // Common.h
3 | // CoolTable
4 | //
5 | // Created by Ray Wenderlich on 9/29/10.
6 | // Copyright 2010 Ray Wenderlich. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | /**
12 | * 填充线性渐变颜色
13 | *
14 | * @since 1.0
15 | */
16 | void drawLinearGradient(CGContextRef context, CGRect rect, CGColorRef startColor, CGColorRef endColor);
17 |
18 |
19 | /**
20 | * 修正画一个像素的rect
21 | *
22 | * @since 1.0
23 | */
24 | CGRect rectFor1PxStroke(CGRect rect);
25 |
26 | /**
27 | * 画一条线,从起点到终点
28 | *
29 | * @since 1.0
30 | */
31 | void draw1PxStroke(CGContextRef context, CGPoint startPoint, CGPoint endPoint, CGColorRef color);
32 |
33 |
34 | void drawGlossAndGradient(CGContextRef context, CGRect rect, CGColorRef startColor, CGColorRef endColor,BOOL isFat);
35 | static inline double radians (double degrees) { return degrees * M_PI/180; }
36 | CGMutablePathRef createArcPathFromBottomOfRect(CGRect rect, CGFloat arcHeight);
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics/CoolButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // CoolButton.h
3 | // caigee
4 | //
5 | // Created by caigee on 14-5-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CoolButton : UIButton
12 |
13 | @property(nonatomic)BOOL isFlat;
14 | @property(nonatomic,retain)UIColor *upColor;
15 | @property(nonatomic,retain)UIColor *downColor;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics/DemoCoreGraphics-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics/DemoCoreGraphics-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics/DrawView.h:
--------------------------------------------------------------------------------
1 | //
2 | // DrawView.h
3 | // caigee
4 | //
5 | // Created by caigee on 14-5-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DrawView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics/RootVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.h
3 | // DemoCoreGraphics
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface RootVC : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics/RootVC.m:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.m
3 | // DemoCoreGraphics
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "RootVC.h"
10 | #import "DrawView.h"
11 | #import "CoolButton.h"
12 |
13 | @interface RootVC ()
14 |
15 | @end
16 |
17 | @implementation RootVC
18 |
19 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
20 | {
21 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
22 | if (self) {
23 | // Custom initialization
24 | }
25 | return self;
26 | }
27 |
28 | - (void)viewDidLoad
29 | {
30 | [super viewDidLoad];
31 |
32 | DrawView *drawView = [[DrawView alloc]initWithFrame:CGRectMake(0.0, 0.0, 320.0, 536)];
33 | [self.view addSubview:drawView];
34 |
35 | NSString *str = @"你好";
36 |
37 | CGSize size= [str sizeWithFont:[UIFont systemFontOfSize:15] forWidth:200 lineBreakMode:NSLineBreakByCharWrapping];
38 | CoolButton *cool = [[CoolButton alloc]initWithFrame:CGRectMake(20.0, 300.0, size.width +40, size.height +20)];
39 | cool.isFlat = YES;
40 | cool.upColor = [UIColor orangeColor];
41 | cool.downColor = [UIColor redColor];
42 | [cool setTitle:@"你好" forState:UIControlStateNormal];
43 | [self.view addSubview:cool];
44 |
45 | // Do any additional setup after loading the view.
46 | }
47 |
48 | - (void)didReceiveMemoryWarning
49 | {
50 | [super didReceiveMemoryWarning];
51 | // Dispose of any resources that can be recreated.
52 | }
53 |
54 | /*
55 | #pragma mark - Navigation
56 |
57 | // In a storyboard-based application, you will often want to do a little preparation before navigation
58 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
59 | {
60 | // Get the new view controller using [segue destinationViewController].
61 | // Pass the selected object to the new view controller.
62 | }
63 | */
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphics/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DemoCoreGraphics
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphicsTests/DemoCoreGraphicsTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphicsTests/DemoCoreGraphicsTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // DemoCoreGraphicsTests.m
3 | // DemoCoreGraphicsTests
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DemoCoreGraphicsTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation DemoCoreGraphicsTests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/DemoCoreGraphics/DemoCoreGraphicsTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/DemoCoreText/MyFirstCoreText/DemoCoreText.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText.xcodeproj/xcuserdata/Steven.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText.xcodeproj/xcuserdata/Steven.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | DemoCoreText.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B05FE6D4196BA36D00620F60
16 |
17 | primary
18 |
19 |
20 | B05FE6EF196BA36D00620F60
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DemoCoreText
4 | //
5 | // Created by caigee on 14-7-8.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // DemoCoreText
4 | //
5 | // Created by caigee on 14-7-8.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "RootVC.h"
11 |
12 | @implementation AppDelegate
13 |
14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 | {
16 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
17 | // Override point for customization after application launch.
18 | RootVC *root = [[RootVC alloc]init];
19 | self.window.rootViewController = root;
20 |
21 | self.window.backgroundColor = [UIColor whiteColor];
22 | [self.window makeKeyAndVisible];
23 | return YES;
24 | }
25 |
26 | - (void)applicationWillResignActive:(UIApplication *)application
27 | {
28 | // 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.
29 | // 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.
30 | }
31 |
32 | - (void)applicationDidEnterBackground:(UIApplication *)application
33 | {
34 | // 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.
35 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
36 | }
37 |
38 | - (void)applicationWillEnterForeground:(UIApplication *)application
39 | {
40 | // 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.
41 | }
42 |
43 | - (void)applicationDidBecomeActive:(UIApplication *)application
44 | {
45 | // 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.
46 | }
47 |
48 | - (void)applicationWillTerminate:(UIApplication *)application
49 | {
50 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText/DemoCoreText-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations~ipad
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationPortraitUpsideDown
35 | UIInterfaceOrientationLandscapeLeft
36 | UIInterfaceOrientationLandscapeRight
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText/DemoCoreText-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "ipad",
5 | "size" : "29x29",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "ipad",
10 | "size" : "29x29",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "ipad",
15 | "size" : "40x40",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "ipad",
20 | "size" : "40x40",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "ipad",
25 | "size" : "76x76",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "ipad",
30 | "size" : "76x76",
31 | "scale" : "2x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "ipad",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "1x"
9 | },
10 | {
11 | "orientation" : "landscape",
12 | "idiom" : "ipad",
13 | "extent" : "full-screen",
14 | "minimum-system-version" : "7.0",
15 | "scale" : "1x"
16 | },
17 | {
18 | "orientation" : "portrait",
19 | "idiom" : "ipad",
20 | "extent" : "full-screen",
21 | "minimum-system-version" : "7.0",
22 | "scale" : "2x"
23 | },
24 | {
25 | "orientation" : "landscape",
26 | "idiom" : "ipad",
27 | "extent" : "full-screen",
28 | "minimum-system-version" : "7.0",
29 | "scale" : "2x"
30 | }
31 | ],
32 | "info" : {
33 | "version" : 1,
34 | "author" : "xcode"
35 | }
36 | }
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText/MyCoreText.h:
--------------------------------------------------------------------------------
1 | //
2 | // MyCoreText.h
3 | // DemoCoreText
4 | //
5 | // Created by caigee on 14-7-10.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MyCoreText : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText/RootVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.h
3 | // DemoCoreText
4 | //
5 | // Created by caigee on 14-7-9.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface RootVC : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText/RootVC.m:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.m
3 | // DemoCoreText
4 | //
5 | // Created by caigee on 14-7-9.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "RootVC.h"
10 | #import "MyCoreText.h"
11 |
12 | @interface RootVC ()
13 |
14 | @end
15 |
16 | @implementation RootVC
17 |
18 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
19 | {
20 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
21 | if (self) {
22 | // Custom initialization
23 | }
24 | return self;
25 | }
26 |
27 | - (void)viewDidLoad
28 | {
29 | [super viewDidLoad];
30 |
31 | MyCoreText *myText = [[MyCoreText alloc]initWithFrame:CGRectMake(0.0, 40, 320.0, 440.0)];
32 | myText.backgroundColor = [UIColor whiteColor];
33 | [self.view addSubview:myText];
34 | // Do any additional setup after loading the view.
35 | }
36 |
37 | - (void)didReceiveMemoryWarning
38 | {
39 | [super didReceiveMemoryWarning];
40 | // Dispose of any resources that can be recreated.
41 | }
42 |
43 | /*
44 | #pragma mark - Navigation
45 |
46 | // In a storyboard-based application, you will often want to do a little preparation before navigation
47 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
48 | {
49 | // Get the new view controller using [segue destinationViewController].
50 | // Pass the selected object to the new view controller.
51 | }
52 | */
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DemoCoreText
4 | //
5 | // Created by caigee on 14-7-8.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreText/meile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/DemoCoreText/MyFirstCoreText/DemoCoreText/meile.png
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreTextTests/DemoCoreTextTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreTextTests/DemoCoreTextTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // DemoCoreTextTests.m
3 | // DemoCoreTextTests
4 | //
5 | // Created by caigee on 14-7-8.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DemoCoreTextTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation DemoCoreTextTests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/DemoCoreText/MyFirstCoreText/DemoCoreTextTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/KVOdemo/KVOdemo.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo.xcodeproj/xcuserdata/Steven.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo.xcodeproj/xcuserdata/Steven.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | KVOdemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B014E4761964024F00C57A8E
16 |
17 | primary
18 |
19 |
20 | B014E4911964024F00C57A8E
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // KVOdemo
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // KVOdemo
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "ChangeDetectiveVC.h"
11 | #import "Book.h"
12 |
13 | @implementation AppDelegate
14 |
15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
16 | {
17 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
18 |
19 | ChangeDetectiveVC *detailVC = [[ChangeDetectiveVC alloc]init];
20 | self.window.rootViewController = detailVC;
21 |
22 | // Override point for customization after application launch.
23 |
24 |
25 |
26 |
27 |
28 |
29 | // Book *book4=[[Book alloc] init];
30 | // ChangeDetectiveVC *detail = [[ChangeDetectiveVC alloc]init:book4];
31 | //
32 | //// NSArray *bookProperties=[NSArray arrayWithObjects:@"name",@"price",nil];
33 | //// NSDictionary *bookPropertiesDictionary=[book4 dictionaryWithValuesForKeys:bookProperties];
34 | //
35 | //
36 | //
37 | //
38 | // NSDictionary *newBookPropertiesDictionary=[NSDictionary dictionaryWithObjectsAndKeys:
39 | // @"book name",@"name",
40 | // @"20.5",@"price",nil];
41 | // [book4 setValuesForKeysWithDictionary:newBookPropertiesDictionary];
42 | //
43 | // [book4 setValue:@"34.0" forKey:@"price"];
44 |
45 |
46 |
47 |
48 |
49 |
50 | self.window.backgroundColor = [UIColor whiteColor];
51 | [self.window makeKeyAndVisible];
52 | return YES;
53 | }
54 |
55 | - (void)applicationWillResignActive:(UIApplication *)application
56 | {
57 | // 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.
58 | // 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.
59 | }
60 |
61 | - (void)applicationDidEnterBackground:(UIApplication *)application
62 | {
63 | // 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.
64 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
65 | }
66 |
67 | - (void)applicationWillEnterForeground:(UIApplication *)application
68 | {
69 | // 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.
70 | }
71 |
72 | - (void)applicationDidBecomeActive:(UIApplication *)application
73 | {
74 | // 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.
75 | }
76 |
77 | - (void)applicationWillTerminate:(UIApplication *)application
78 | {
79 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
80 | }
81 |
82 | @end
83 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo/Book.h:
--------------------------------------------------------------------------------
1 | //
2 | // Book.h
3 | // KVOdemo
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface Book : NSObject
12 |
13 | @property (nonatomic,strong)NSString *name;
14 | @property (nonatomic,strong)NSString *price;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo/Book.m:
--------------------------------------------------------------------------------
1 | //
2 | // Book.m
3 | // KVOdemo
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "Book.h"
10 |
11 | @implementation Book
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo/ChangeDetectiveVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // ChangeDetectiveVC.h
3 | // KVOdemo
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "Book.h"
11 |
12 | @interface ChangeDetectiveVC : UIViewController
13 |
14 | @property (nonatomic,strong)Book *abook;
15 |
16 | -(id)init:(Book *)theBook;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo/ChangeDetectiveVC.m:
--------------------------------------------------------------------------------
1 | //
2 | // ChangeDetectiveVC.m
3 | // KVOdemo
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "ChangeDetectiveVC.h"
10 | #import "Book.h"
11 |
12 | @interface ChangeDetectiveVC ()
13 | {
14 |
15 | }
16 |
17 | @end
18 |
19 | @implementation ChangeDetectiveVC
20 |
21 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
22 | {
23 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
24 | if (self) {
25 | // Custom initialization
26 | }
27 | return self;
28 | }
29 |
30 | -(id)init:(Book *)theBook
31 | {
32 | if (self = [super init]) {
33 | _abook = theBook;
34 |
35 | [_abook addObserver:self forKeyPath:@"price" options:NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew context:nil];
36 | }
37 | return self;
38 |
39 | }
40 |
41 | - (void)viewDidLoad
42 | {
43 | [super viewDidLoad];
44 |
45 | //添加监听
46 | self.abook = [[Book alloc]init];
47 | [_abook addObserver:self forKeyPath:@"price" options:NSKeyValueObservingOptionOld|NSKeyValueObservingOptionNew context:nil];
48 |
49 | UIButton *abtn = [UIButton buttonWithType:UIButtonTypeCustom];
50 | abtn.frame = CGRectMake(80, 90.0, 80, 30);
51 | [abtn setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
52 | [abtn setTitle:@"Change" forState:UIControlStateNormal];
53 | [abtn addTarget:self action:@selector(change) forControlEvents:UIControlEventTouchUpInside];
54 | [self.view addSubview:abtn];
55 |
56 | // Do any additional setup after loading the view.
57 | }
58 |
59 | -(void)change
60 | {
61 | //两种方法触发监听
62 | NSDictionary *newBookPropertiesDictionary=[NSDictionary dictionaryWithObjectsAndKeys:
63 | @"book name",@"name",
64 | @"20.5",@"price",nil];
65 | [self.abook setValuesForKeysWithDictionary:newBookPropertiesDictionary];
66 |
67 | [self.abook setValue:@"34.0" forKey:@"price"];
68 | }
69 |
70 | -(void)dealloc
71 | {
72 | //移除监听
73 | [_abook removeObserver:self forKeyPath:@"price"];
74 | }
75 |
76 | //实现监听
77 | -(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
78 | {
79 | if ([keyPath isEqual:@"price"]) {
80 | NSLog(@"old price: %@",[change objectForKey:@"old"]);
81 | NSLog(@"new price: %@",[change objectForKey:@"new"]);
82 | }
83 | }
84 |
85 | - (void)didReceiveMemoryWarning
86 | {
87 | [super didReceiveMemoryWarning];
88 | // Dispose of any resources that can be recreated.
89 | }
90 |
91 | /*
92 | #pragma mark - Navigation
93 |
94 | // In a storyboard-based application, you will often want to do a little preparation before navigation
95 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
96 | {
97 | // Get the new view controller using [segue destinationViewController].
98 | // Pass the selected object to the new view controller.
99 | }
100 | */
101 |
102 | @end
103 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo/KVOdemo-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo/KVOdemo-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // KVOdemo
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemoTests/KVOdemoTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemoTests/KVOdemoTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // KVOdemoTests.m
3 | // KVOdemoTests
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface KVOdemoTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation KVOdemoTests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/KVOdemo/KVOdemoTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | iosdev_sample
2 | =============
3 |
4 | IOS开发了一段时间,发现所学知识不够系统。我需要整理思路并实现 demo,所以有了这个工程。
5 | iosdev_sample 里面放了以下内容
6 |
7 | 介绍OC消息转发ClassForward
8 | CoreData框架CoreDataDemo
9 | CoreImage框架CoreImageDemos
10 | Deletage框架DelgateSample
11 | DemoAudio框架DemoAudio
12 | CoreGraphics框架DemoCoreGraphics
13 | KVO的使用KVOdemo
14 | 单例的使用Singleton
15 | IOS常用视图切换控件TabedNavVC
16 | UIWebview 加载本地文件失败解决方案UIWebLoadLocalFiles
17 |
--------------------------------------------------------------------------------
/Singleton/Singleton.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Singleton/Singleton.xcodeproj/project.xcworkspace/xcshareddata/Singleton.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | B2E0005F-8F1A-4E88-A105-05A46C8EDB00
9 | IDESourceControlProjectName
10 | Singleton
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | D972AADA-A024-4F84-8741-945633B797B8
14 | https://github.com/caigee/ios_--.git
15 |
16 | IDESourceControlProjectPath
17 | Singleton/Singleton.xcodeproj/project.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | D972AADA-A024-4F84-8741-945633B797B8
21 | ../../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/caigee/ios_--.git
25 | IDESourceControlProjectVersion
26 | 110
27 | IDESourceControlProjectWCCIdentifier
28 | D972AADA-A024-4F84-8741-945633B797B8
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | D972AADA-A024-4F84-8741-945633B797B8
36 | IDESourceControlWCCName
37 | ios_基础
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Singleton/Singleton.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/Singleton/Singleton.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Singleton/Singleton.xcodeproj/project.xcworkspace/xcuserdata/tinybro.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/Singleton/Singleton.xcodeproj/project.xcworkspace/xcuserdata/tinybro.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/Singleton/Singleton.xcodeproj/xcuserdata/Steven.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Singleton.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9BCCBA75195FAB7E00A5DD83
16 |
17 | primary
18 |
19 |
20 | 9BCCBA90195FAB7E00A5DD83
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Singleton/Singleton.xcodeproj/xcuserdata/tinybro.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/Singleton/Singleton.xcodeproj/xcuserdata/tinybro.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Singleton.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 9BCCBA75195FAB7E00A5DD83
16 |
17 | primary
18 |
19 |
20 | 9BCCBA90195FAB7E00A5DD83
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Singleton/Singleton/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Singleton
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Singleton/Singleton/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // Singleton
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "RootVC.h"
11 |
12 | @implementation AppDelegate
13 |
14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 | {
16 | self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]autorelease];
17 | // Override point for customization after application launch.
18 | RootVC *root = [[RootVC alloc]init];
19 | self.window.rootViewController = root;
20 | [root release];
21 |
22 | self.window.backgroundColor = [UIColor whiteColor];
23 | [self.window makeKeyAndVisible];
24 | return YES;
25 | }
26 |
27 | - (void)applicationWillResignActive:(UIApplication *)application
28 | {
29 | // 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.
30 | // 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.
31 | }
32 |
33 | - (void)applicationDidEnterBackground:(UIApplication *)application
34 | {
35 | // 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.
36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
37 | }
38 |
39 | - (void)applicationWillEnterForeground:(UIApplication *)application
40 | {
41 | // 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.
42 | }
43 |
44 | - (void)applicationDidBecomeActive:(UIApplication *)application
45 | {
46 | // 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.
47 | }
48 |
49 | - (void)applicationWillTerminate:(UIApplication *)application
50 | {
51 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
52 | }
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/Singleton/Singleton/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/Singleton/Singleton/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/Singleton/Singleton/RootVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.h
3 | // Singleton
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface RootVC : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Singleton/Singleton/RootVC.m:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.m
3 | // Singleton
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "RootVC.h"
10 | #import "UIView+UpsideDown.h"
11 | #import "Singleton.h"
12 |
13 | @interface RootVC ()
14 |
15 | @end
16 |
17 | @implementation RootVC
18 |
19 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
20 | {
21 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
22 | if (self) {
23 | // Custom initialization
24 | }
25 | return self;
26 | }
27 |
28 | - (void)viewDidLoad
29 | {
30 | [super viewDidLoad];
31 | UILabel *aLabel = [[UILabel alloc]initWithFrame:CGRectMake(20.0, 100.0, 200.0, 40.0)];
32 | [aLabel setBackgroundColor:[UIColor grayColor]];
33 | [aLabel setText:@"类别的使用"];
34 | [aLabel upsideDown]; //这一句话使用了类别
35 | [self.view addSubview:aLabel];
36 | [aLabel release];
37 |
38 |
39 | [self testSigleTon];
40 | // Do any additional setup after loading the view.
41 | }
42 |
43 | -(void)testSigleTon
44 | {
45 | //单例的结果就是,调用类方法,只返回一个共有的对象
46 | Singleton *single = [Singleton sharedInstance];
47 | Singleton *single2 = [Singleton sharedInstance];
48 | if (single == single2) {
49 | NSLog(@"两个单例方法生成的对象指向同一个对象");
50 | }
51 |
52 |
53 | }
54 |
55 | - (void)didReceiveMemoryWarning
56 | {
57 | [super didReceiveMemoryWarning];
58 | // Dispose of any resources that can be recreated.
59 | }
60 |
61 | /*
62 | #pragma mark - Navigation
63 |
64 | // In a storyboard-based application, you will often want to do a little preparation before navigation
65 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
66 | {
67 | // Get the new view controller using [segue destinationViewController].
68 | // Pass the selected object to the new view controller.
69 | }
70 | */
71 |
72 | @end
73 |
--------------------------------------------------------------------------------
/Singleton/Singleton/Singleton-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | 单例和类别
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.caigee.Sample
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/Singleton/Singleton/Singleton-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/Singleton/Singleton/Singleton.h:
--------------------------------------------------------------------------------
1 | //
2 | // Singleton.h
3 | // Singleton
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class Singleton;
12 | // 用static申明一个类的静态实例,
13 | static Singleton *_sharedInstance = nil;
14 |
15 | @interface Singleton : NSObject
16 | // "+" 表示类的方法,由类调用
17 | +(Singleton *)sharedInstance;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/Singleton/Singleton/Singleton.m:
--------------------------------------------------------------------------------
1 | //
2 | // Singleton.m
3 | // Singleton
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "Singleton.h"
10 |
11 | @implementation Singleton
12 |
13 | +(Singleton *)sharedInstance
14 | {
15 | if (!_sharedInstance) {
16 | _sharedInstance =[[self alloc]init];
17 | }
18 | return _sharedInstance;
19 | }
20 |
21 | // 避免生成两个_sharedInstance,仅在多线程下需要这样做
22 | +(id)allocWithZone:(struct _NSZone *)zone
23 | {
24 | @synchronized(self)
25 | {
26 | if (_sharedInstance ==nil) {
27 | _sharedInstance = [super allocWithZone:zone];
28 | return _sharedInstance;
29 | }
30 | }
31 | return nil;
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/Singleton/Singleton/UIView+UpsideDown.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+UpsideDown.h
3 | // Singleton
4 | //
5 | // Created by caigee on 14-6-30.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 | //类别主要用于对已有的类拓展,可以是系统的,也可以是自己写的
11 | @interface UIView (UpsideDown)
12 |
13 | -(void)upsideDown;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Singleton/Singleton/UIView+UpsideDown.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+UpsideDown.m
3 | // Singleton
4 | //
5 | // Created by caigee on 14-6-30.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "UIView+UpsideDown.h"
10 | #import
11 |
12 | @implementation UIView (UpsideDown)
13 |
14 | -(void)upsideDown
15 | {
16 | CGFloat angle = M_PI;
17 | CGAffineTransform transform = CGAffineTransformMakeRotation(angle);
18 | [self setTransform:transform];
19 | }
20 |
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/Singleton/Singleton/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/Singleton/Singleton/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Singleton
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Singleton/SingletonTests/SingletonTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Singleton/SingletonTests/SingletonTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // SingletonTests.m
3 | // SingletonTests
4 | //
5 | // Created by caigee on 14-6-29.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SingletonTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation SingletonTests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/Singleton/SingletonTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/TabedNavVC/TabedNavVC.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC.xcodeproj/xcuserdata/Steven.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC.xcodeproj/xcuserdata/Steven.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | TabedNavVC.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B014E4321963E96A00C57A8E
16 |
17 | primary
18 |
19 |
20 | B014E44D1963E96A00C57A8E
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // TabedNavVC
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // TabedNavVC
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "RootVC.h"
11 |
12 | @implementation AppDelegate
13 |
14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 | {
16 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
17 | // Override point for customization after application launch.
18 | RootVC *root = [[RootVC alloc]init];
19 | self.window.rootViewController = root;
20 |
21 | self.window.backgroundColor = [UIColor whiteColor];
22 | [self.window makeKeyAndVisible];
23 | return YES;
24 | }
25 |
26 | - (void)applicationWillResignActive:(UIApplication *)application
27 | {
28 | // 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.
29 | // 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.
30 | }
31 |
32 | - (void)applicationDidEnterBackground:(UIApplication *)application
33 | {
34 | // 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.
35 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
36 | }
37 |
38 | - (void)applicationWillEnterForeground:(UIApplication *)application
39 | {
40 | // 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.
41 | }
42 |
43 | - (void)applicationDidBecomeActive:(UIApplication *)application
44 | {
45 | // 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.
46 | }
47 |
48 | - (void)applicationWillTerminate:(UIApplication *)application
49 | {
50 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC/FirstVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // FirstVC.h
3 | // TabedNavVC
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FirstVC : UIViewController
12 |
13 | @property int currentIndex;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC/FirstVC.m:
--------------------------------------------------------------------------------
1 | //
2 | // FirstVC.m
3 | // TabedNavVC
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "FirstVC.h"
10 |
11 | @interface FirstVC ()
12 |
13 | @end
14 |
15 | @implementation FirstVC
16 |
17 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
18 | {
19 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
20 | if (self) {
21 | // Custom initialization
22 | }
23 | return self;
24 | }
25 |
26 | - (void)viewDidLoad
27 | {
28 | [super viewDidLoad];
29 |
30 | self.title = [NSString stringWithFormat:@"page:%d",self.currentIndex];
31 |
32 | UIButton *btn = [[UIButton alloc]initWithFrame:CGRectMake(20.0, 80.0, 280, 40)];
33 | [btn setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
34 | [btn setTitle:@"NEXT" forState:UIControlStateNormal];
35 | [btn addTarget:self action:@selector(next) forControlEvents:UIControlEventTouchUpInside];
36 | [self.view addSubview:btn];
37 | // Do any additional setup after loading the view.
38 | }
39 |
40 | -(void)next
41 | {
42 | FirstVC *first = [[FirstVC alloc]init];
43 | first.currentIndex = self.currentIndex +1;
44 | [self.navigationController pushViewController:first animated:YES];
45 | }
46 |
47 | - (void)didReceiveMemoryWarning
48 | {
49 | [super didReceiveMemoryWarning];
50 | // Dispose of any resources that can be recreated.
51 | }
52 |
53 | /*
54 | #pragma mark - Navigation
55 |
56 | // In a storyboard-based application, you will often want to do a little preparation before navigation
57 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
58 | {
59 | // Get the new view controller using [segue destinationViewController].
60 | // Pass the selected object to the new view controller.
61 | }
62 | */
63 |
64 | @end
65 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC/RootVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.h
3 | // TabedNavVC
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface RootVC : UIViewController
12 |
13 | @property (nonatomic,strong)UITabBarController *topTabBarController;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC/RootVC.m:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.m
3 | // TabedNavVC
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "RootVC.h"
10 | #import "FirstVC.h"
11 | #import "SecondVC.h"
12 |
13 | @interface RootVC ()
14 |
15 | @end
16 |
17 | @implementation RootVC
18 |
19 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
20 | {
21 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
22 | if (self) {
23 | // Custom initialization
24 | }
25 | return self;
26 | }
27 |
28 | - (void)viewDidLoad
29 | {
30 | [super viewDidLoad];
31 |
32 | UITabBarController *tabBarController = [[UITabBarController alloc]init];
33 | tabBarController.delegate = self;
34 |
35 | FirstVC *firstVC = [[FirstVC alloc]init];
36 | UINavigationController *firstNav = [[UINavigationController alloc]initWithRootViewController:firstVC];
37 | firstNav.tabBarItem = [[UITabBarItem alloc]initWithTabBarSystemItem:UITabBarSystemItemRecents tag:0];
38 |
39 | SecondVC *secondVC = [[SecondVC alloc]init];
40 | UINavigationController *secondNav = [[UINavigationController alloc]initWithRootViewController:secondVC];
41 | secondNav.tabBarItem = [[UITabBarItem alloc]initWithTabBarSystemItem:UITabBarSystemItemRecents tag:1];
42 |
43 | tabBarController.viewControllers = [NSArray arrayWithObjects:firstNav,secondNav, nil];
44 |
45 | // 重要:一定不能让 tabBarController 释放掉,否则会引起崩溃
46 | self.topTabBarController = tabBarController;
47 | [self.view addSubview:tabBarController.view];
48 | self.view.backgroundColor = [UIColor whiteColor];
49 | // Do any additional setup after loading the view.
50 | }
51 |
52 | - (void)didReceiveMemoryWarning
53 | {
54 | [super didReceiveMemoryWarning];
55 | // Dispose of any resources that can be recreated.
56 | }
57 |
58 | /*
59 | #pragma mark - Navigation
60 |
61 | // In a storyboard-based application, you will often want to do a little preparation before navigation
62 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
63 | {
64 | // Get the new view controller using [segue destinationViewController].
65 | // Pass the selected object to the new view controller.
66 | }
67 | */
68 |
69 | @end
70 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC/SecondVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // SecondVC.h
3 | // TabedNavVC
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SecondVC : UIViewController
12 |
13 | @property int currentIndex;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC/SecondVC.m:
--------------------------------------------------------------------------------
1 | //
2 | // SecondVC.m
3 | // TabedNavVC
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "SecondVC.h"
10 |
11 | @interface SecondVC ()
12 |
13 | @end
14 |
15 | @implementation SecondVC
16 |
17 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
18 | {
19 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
20 | if (self) {
21 | // Custom initialization
22 | }
23 | return self;
24 | }
25 |
26 | - (void)viewDidLoad
27 | {
28 | [super viewDidLoad];
29 | self.view.backgroundColor = [UIColor grayColor];
30 |
31 | self.title = [NSString stringWithFormat:@"Another page:%d",self.currentIndex];
32 |
33 | UIButton *btn = [[UIButton alloc]initWithFrame:CGRectMake(20.0, 80.0, 280, 40)];
34 | [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
35 | [btn setTitle:@"POP" forState:UIControlStateNormal];
36 | [btn addTarget:self action:@selector(next) forControlEvents:UIControlEventTouchUpInside];
37 | [self.view addSubview:btn];
38 |
39 | do {
40 | UIButton *btn = [[UIButton alloc]initWithFrame:CGRectMake(20.0, 140, 280, 40)];
41 | [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
42 | [btn setTitle:@"Dismiss" forState:UIControlStateNormal];
43 | [btn addTarget:self action:@selector(disMiss) forControlEvents:UIControlEventTouchUpInside];
44 | [self.view addSubview:btn];
45 | } while (0);
46 | // Do any additional setup after loading the view.
47 | }
48 |
49 | -(void)disMiss
50 | {
51 | [self dismissViewControllerAnimated:YES completion:nil];
52 | }
53 |
54 | -(void)next
55 | {
56 | SecondVC *second = [[SecondVC alloc]init];
57 | second.currentIndex = self.currentIndex +1;
58 | [self presentViewController:second animated:YES completion:nil];
59 | }
60 |
61 | - (void)didReceiveMemoryWarning
62 | {
63 | [super didReceiveMemoryWarning];
64 | // Dispose of any resources that can be recreated.
65 | }
66 |
67 | /*
68 | #pragma mark - Navigation
69 |
70 | // In a storyboard-based application, you will often want to do a little preparation before navigation
71 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
72 | {
73 | // Get the new view controller using [segue destinationViewController].
74 | // Pass the selected object to the new view controller.
75 | }
76 | */
77 |
78 | @end
79 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC/TabedNavVC-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | 视图导航
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.caigee.Sample
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC/TabedNavVC-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVC/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // TabedNavVC
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVCTests/TabedNavVCTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVCTests/TabedNavVCTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // TabedNavVCTests.m
3 | // TabedNavVCTests
4 | //
5 | // Created by caigee on 14-7-2.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TabedNavVCTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation TabedNavVCTests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/TabedNavVC/TabedNavVCTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/UIWebLoadLocalFiles/UIWebLoadLocalFiles.xcodeproj/project.xcworkspace/xcuserdata/Steven.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles.xcodeproj/xcuserdata/Steven.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles.xcodeproj/xcuserdata/Steven.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | UIWebLoadLocalFiles.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | B0AB8F4B196655CC0080FD55
16 |
17 | primary
18 |
19 |
20 | B0AB8F66196655CD0080FD55
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // UIWebLoadLocalFiles
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // UIWebLoadLocalFiles
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "RootVC.h"
11 |
12 | @implementation AppDelegate
13 |
14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 | {
16 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
17 | // Override point for customization after application launch.
18 | RootVC *root = [[RootVC alloc]init];
19 | self.window.rootViewController = root;
20 |
21 | self.window.backgroundColor = [UIColor whiteColor];
22 | [self.window makeKeyAndVisible];
23 | return YES;
24 | }
25 |
26 | - (void)applicationWillResignActive:(UIApplication *)application
27 | {
28 | // 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.
29 | // 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.
30 | }
31 |
32 | - (void)applicationDidEnterBackground:(UIApplication *)application
33 | {
34 | // 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.
35 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
36 | }
37 |
38 | - (void)applicationWillEnterForeground:(UIApplication *)application
39 | {
40 | // 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.
41 | }
42 |
43 | - (void)applicationDidBecomeActive:(UIApplication *)application
44 | {
45 | // 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.
46 | }
47 |
48 | - (void)applicationWillTerminate:(UIApplication *)application
49 | {
50 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "40x40",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "60x60",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "ipad",
20 | "size" : "29x29",
21 | "scale" : "1x"
22 | },
23 | {
24 | "idiom" : "ipad",
25 | "size" : "29x29",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "ipad",
30 | "size" : "40x40",
31 | "scale" : "1x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "40x40",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "76x76",
41 | "scale" : "1x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "76x76",
46 | "scale" : "2x"
47 | }
48 | ],
49 | "info" : {
50 | "version" : 1,
51 | "author" : "xcode"
52 | }
53 | }
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "7.0",
8 | "scale" : "2x"
9 | },
10 | {
11 | "orientation" : "portrait",
12 | "idiom" : "iphone",
13 | "subtype" : "retina4",
14 | "extent" : "full-screen",
15 | "minimum-system-version" : "7.0",
16 | "scale" : "2x"
17 | },
18 | {
19 | "orientation" : "portrait",
20 | "idiom" : "ipad",
21 | "extent" : "full-screen",
22 | "minimum-system-version" : "7.0",
23 | "scale" : "1x"
24 | },
25 | {
26 | "orientation" : "landscape",
27 | "idiom" : "ipad",
28 | "extent" : "full-screen",
29 | "minimum-system-version" : "7.0",
30 | "scale" : "1x"
31 | },
32 | {
33 | "orientation" : "portrait",
34 | "idiom" : "ipad",
35 | "extent" : "full-screen",
36 | "minimum-system-version" : "7.0",
37 | "scale" : "2x"
38 | },
39 | {
40 | "orientation" : "landscape",
41 | "idiom" : "ipad",
42 | "extent" : "full-screen",
43 | "minimum-system-version" : "7.0",
44 | "scale" : "2x"
45 | }
46 | ],
47 | "info" : {
48 | "version" : 1,
49 | "author" : "xcode"
50 | }
51 | }
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles/RootVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.h
3 | // UIWebLoadLocalFiles
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface RootVC : UIViewController
12 |
13 | @property (nonatomic,strong)UIWebView *aWebView;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles/RootVC.m:
--------------------------------------------------------------------------------
1 | //
2 | // RootVC.m
3 | // UIWebLoadLocalFiles
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import "RootVC.h"
10 |
11 | @interface RootVC ()
12 |
13 | @end
14 |
15 | @implementation RootVC
16 |
17 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
18 | {
19 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
20 | if (self) {
21 | // Custom initialization
22 | }
23 | return self;
24 | }
25 |
26 | - (void)viewDidLoad
27 | {
28 | [super viewDidLoad];
29 |
30 | CGRect webFrame = [UIScreen mainScreen].bounds;
31 | UIWebView *aWebView = [[UIWebView alloc]initWithFrame:webFrame];
32 | aWebView.scalesPageToFit = YES;
33 |
34 |
35 |
36 |
37 | // NSString *htmlPath = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"];
38 | // NSURL *url = [NSURL fileURLWithPath:htmlPath];
39 | // [aWebView loadRequest:[NSURLRequest requestWithURL:url]];
40 |
41 | // NSString *filePath = [[NSBundle mainBundle]pathForResource:@"index" ofType:@"html"];
42 | // NSString *htmlString = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil];
43 | // [aWebView loadHTMLString:htmlString baseURL:[NSURL URLWithString:filePath]];
44 |
45 | NSString *bundleFile = [[NSBundle mainBundle] pathForResource:@"xxx" ofType:@"bundle"];
46 | NSString *htmlFile = [bundleFile stringByAppendingPathComponent:@"/index.html"];
47 |
48 | NSData *htmlData = [NSData dataWithContentsOfFile:htmlFile];
49 | [aWebView loadData:htmlData MIMEType:@"text/html" textEncodingName:@"UTF-8" baseURL:[NSURL fileURLWithPath:bundleFile]];
50 |
51 | self.aWebView = aWebView;
52 | [self.view addSubview:aWebView];
53 | // Do any additional setup after loading the view.
54 | }
55 |
56 | - (void)didReceiveMemoryWarning
57 | {
58 | [super didReceiveMemoryWarning];
59 | // Dispose of any resources that can be recreated.
60 | }
61 |
62 | /*
63 | #pragma mark - Navigation
64 |
65 | // In a storyboard-based application, you will often want to do a little preparation before navigation
66 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
67 | {
68 | // Get the new view controller using [segue destinationViewController].
69 | // Pass the selected object to the new view controller.
70 | }
71 | */
72 |
73 | @end
74 |
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles/UIWebLoadLocalFiles-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIdentifier
12 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles/UIWebLoadLocalFiles-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // UIWebLoadLocalFiles
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles/xxx.bundle/aImage/aImage/test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xm15/iosdev_sample/88d669687f23550b47d7ba45826f90679a804e9f/UIWebLoadLocalFiles/UIWebLoadLocalFiles/xxx.bundle/aImage/aImage/test.png
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFiles/xxx.bundle/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIWebview Load local files
6 |
7 |
8 |
9 |
10 | This will display a image
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFilesTests/UIWebLoadLocalFilesTests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | com.caigee.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFilesTests/UIWebLoadLocalFilesTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIWebLoadLocalFilesTests.m
3 | // UIWebLoadLocalFilesTests
4 | //
5 | // Created by caigee on 14-7-4.
6 | // Copyright (c) 2014年 caigee. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIWebLoadLocalFilesTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation UIWebLoadLocalFilesTests
16 |
17 | - (void)setUp
18 | {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown
24 | {
25 | // Put teardown code here. This method is called after the invocation of each test method in the class.
26 | [super tearDown];
27 | }
28 |
29 | - (void)testExample
30 | {
31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/UIWebLoadLocalFiles/UIWebLoadLocalFilesTests/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------