├── .DS_Store
├── .gitignore
├── AboutTimeForiOSDemo
├── AboutTimeForiOSDemo.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── AboutTimeForiOSDemo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── AddSubviewToLayout
├── AddSubviewToLayout.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── AddSubviewToLayout
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── View1.h
│ ├── View1.m
│ ├── View2.h
│ ├── View2.m
│ ├── View3.h
│ ├── View3.m
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── AnimationBlockDelegateTest
├── AnimationBlockDelegateTest.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── AnimationBlockDelegateTest
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── JXTAnimationBlockDelegate.h
│ ├── JXTAnimationBlockDelegate.m
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── CAAnimationDelegateTest
├── AnimationTest.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── AnimationTest
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ └── LaunchScreen.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── CategoryDelegateUnsafeTest
├── CategoryDelegateUnsafeTest.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── CategoryDelegateUnsafeTest
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── UIView+Add1.h
│ ├── UIView+Add1.m
│ ├── UIView+MyExt0.h
│ ├── UIView+MyExt0.m
│ ├── UIView+MyExt1.h
│ ├── UIView+MyExt1.m
│ ├── UIView+MyExt2.h
│ ├── UIView+MyExt2.m
│ ├── UIView+MyExt3.h
│ ├── UIView+MyExt3.m
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── CategoryDuplicationProperty
├── CategoryDuplicationProperty.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── CategoryDuplicationProperty
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── UIView+MyProperty.h
│ ├── UIView+MyProperty.m
│ ├── UIViewController+MyProperty.h
│ ├── UIViewController+MyProperty.m
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── ChildViewControllerTest
├── ChildViewControllerTest.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── ChildViewControllerTest
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ └── LaunchScreen.storyboard
│ ├── BaseViewController.h
│ ├── BaseViewController.m
│ ├── ContainerViewController.h
│ ├── ContainerViewController.m
│ ├── Info.plist
│ ├── VC1.h
│ ├── VC1.m
│ ├── VC2.h
│ ├── VC2.m
│ ├── VC3.h
│ ├── VC3.m
│ └── main.m
├── ClassPropertyTest
├── ClassPropertyTest.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── ClassPropertyTest
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── MyObject.h
│ ├── MyObject.m
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── CountDownButton
├── TimeDownButton.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── TimeDownButton
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── DelegateOptimizeTest
├── DelegateOptimizeTest.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── DelegateOptimizeTest
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── ViewController2.h
│ ├── ViewController2.m
│ ├── ViewController3.h
│ ├── ViewController3.m
│ └── main.m
├── DoWhile0MacroTest
├── DoWhile0MacroTest.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── DoWhile0MacroTest
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── FindAllEnumOptions
├── FindAllEnumOptions.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── FindAllEnumOptions
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── GlobalStaticValueTest
├── GlobalStaticValueTest.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── GlobalStaticValueTest
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── GlobalValue.h
│ ├── GlobalValue.m
│ ├── Info.plist
│ ├── PrefixHeader.pch
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── ViewController2.h
│ ├── ViewController2.m
│ └── main.m
├── IfNilTest
├── IfNilTest.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── IfNilTest
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── JXTAboutNavigationBar
├── ScrollScale.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── ScrollScale
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ └── LaunchScreen.storyboard
│ ├── HideBarViewController.h
│ ├── HideBarViewController.m
│ ├── Info.plist
│ ├── JXTNavigationController.h
│ ├── JXTNavigationController.m
│ ├── JXTPrefixHeader.pch
│ ├── JXTScaleViewController.h
│ ├── JXTScaleViewController.m
│ ├── JXTTransparentBarVC.h
│ ├── JXTTransparentBarVC.m
│ ├── backImage.png
│ ├── head@2x.png
│ ├── head@3x.png
│ └── main.m
├── JXTAlertView
├── JXTAlertView.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── JXTAlertView
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ └── LaunchScreen.storyboard
│ ├── Info.plist
│ ├── JXTAlertView.h
│ ├── JXTAlertView.m
│ ├── JXTAlertViewController.h
│ ├── JXTAlertViewController.m
│ ├── JXTViewController.h
│ ├── JXTViewController.m
│ ├── MyNavigationController.h
│ ├── MyNavigationController.m
│ ├── VerifyNumberView.h
│ ├── VerifyNumberView.m
│ └── main.m
├── JXTKit
├── JXTKit.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── JXTKit
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Foundation
│ │ ├── NSString+JXTAdd.h
│ │ └── NSString+JXTAdd.m
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── JXTKitTests
│ ├── Info.plist
│ └── JXTKitTests.m
└── JXTKitUITests
│ ├── Info.plist
│ └── JXTKitUITests.m
├── JXTTwinkleStarView
├── JXTTwinkleStarView.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── JXTTwinkleStarView
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── JXTTwinkleStarView.h
│ ├── JXTTwinkleStarView.m
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── emitter_star@2x.png
│ ├── main.m
│ └── star.png
├── JXT_MVC_Demo
├── JXT_MVC_Demo.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── JXT_MVC_Demo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ └── LaunchScreen.storyboard
│ ├── BaseClasses
│ ├── Controllers
│ │ ├── BaseNavigationViewController.h
│ │ ├── BaseNavigationViewController.m
│ │ ├── BaseViewController.h
│ │ └── BaseViewController.m
│ ├── Model
│ │ ├── BaseModel.h
│ │ ├── BaseModel.m
│ │ ├── UIResponder+JXTDataModelManager.h
│ │ └── UIResponder+JXTDataModelManager.m
│ └── Views
│ │ ├── BaseTableArrayDataSource.h
│ │ └── BaseTableArrayDataSource.m
│ ├── Info.plist
│ ├── Interfaces
│ ├── Detail
│ │ ├── DetailViewController.h
│ │ └── DetailViewController.m
│ ├── Login
│ │ ├── LoginViewController.h
│ │ └── LoginViewController.m
│ └── Main
│ │ ├── MainModel.h
│ │ ├── MainModel.m
│ │ ├── MainNetworkManager.h
│ │ ├── MainNetworkManager.m
│ │ ├── MainTableFooterView.h
│ │ ├── MainTableFooterView.m
│ │ ├── MainTableHeaderView.h
│ │ ├── MainTableHeaderView.m
│ │ ├── MainTableView.h
│ │ ├── MainTableView.m
│ │ ├── MainTableViewCell.h
│ │ ├── MainTableViewCell.m
│ │ ├── MainViewController.h
│ │ └── MainViewController.m
│ ├── ThirdLibrary
│ └── Network
│ │ ├── BaseNetworkManager.h
│ │ └── BaseNetworkManager.m
│ └── main.m
├── KVCTest
├── KVCTest.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── KVCTest
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── KVCContainer.h
│ ├── KVCContainer.m
│ ├── KVCObj.h
│ ├── KVCObj.m
│ ├── KVCSubObj.h
│ ├── KVCSubObj.m
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── KVOForInstanceVarTest
├── KVOForInstanceVarTest.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── KVOForInstanceVarTest
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── TestModel.h
│ ├── TestModel.m
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── LICENSE
├── MVCDemo
├── MVCDemo.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── MVCDemo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ └── LaunchScreen.storyboard
│ ├── BaseModel.h
│ ├── BaseModel.m
│ ├── BaseTableArrayDataSource.h
│ ├── BaseTableArrayDataSource.m
│ ├── BaseTableViewCell.h
│ ├── BaseTableViewCell.m
│ ├── BaseViewController.h
│ ├── BaseViewController.m
│ ├── DetailViewController.h
│ ├── DetailViewController.m
│ ├── Info.plist
│ ├── MainModel.h
│ ├── MainModel.m
│ ├── MainTableFooterView.h
│ ├── MainTableFooterView.m
│ ├── MainTableHeaderView.h
│ ├── MainTableHeaderView.m
│ ├── MainTableView.h
│ ├── MainTableView.m
│ ├── MainTableViewCell.h
│ ├── MainTableViewCell.m
│ ├── MainViewController.h
│ ├── MainViewController.m
│ ├── NetworkManager.h
│ ├── NetworkManager.m
│ └── main.m
├── NSErrorTest
├── NSErrorTest.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── NSErrorTest
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── PassthroughView
├── PassthroughView
│ ├── PassthroughView.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── PassthroughView
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── PassthroughView.h
│ │ ├── PassthroughView.m
│ │ ├── ViewController.h
│ │ ├── ViewController.m
│ │ └── main.m
└── WEPopover-master(带穿透视图)
│ ├── Classes
│ ├── Popover
│ │ ├── UIBarButtonItem+WEPopover.h
│ │ ├── UIBarButtonItem+WEPopover.m
│ │ ├── UIView+WEPopover.h
│ │ ├── UIView+WEPopover.m
│ │ ├── WEBlockingGestureRecognizer.h
│ │ ├── WEBlockingGestureRecognizer.m
│ │ ├── WEPopoverContainerView.h
│ │ ├── WEPopoverContainerView.m
│ │ ├── WEPopoverContainerViewProperties.h
│ │ ├── WEPopoverContainerViewProperties.m
│ │ ├── WEPopoverController.h
│ │ ├── WEPopoverController.m
│ │ ├── WEPopoverParentView.h
│ │ ├── WETouchableView.h
│ │ ├── WETouchableView.m
│ │ ├── WEWeakReference.h
│ │ └── WEWeakReference.m
│ ├── WEColorUtils.h
│ ├── WEColorUtils.m
│ ├── WECustomPopoverController.h
│ ├── WECustomPopoverController.m
│ ├── WEPopoverAppDelegate.h
│ ├── WEPopoverAppDelegate.m
│ ├── WEPopoverContentViewController.h
│ ├── WEPopoverContentViewController.m
│ ├── WEPopoverTableViewController.h
│ ├── WEPopoverTableViewController.m
│ ├── WEPopoverViewController.h
│ └── WEPopoverViewController.m
│ ├── LICENSE
│ ├── README
│ ├── Resources
│ ├── MainWindow.xib
│ ├── Popover
│ │ ├── Custom
│ │ │ └── CustomPopover.xcassets
│ │ │ │ ├── Contents.json
│ │ │ │ └── arrow-flyout.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── arrow-flyout.pdf
│ │ ├── popoverArrowDown-white@2x.png
│ │ ├── popoverArrowDown.png
│ │ ├── popoverArrowDown@2x.png
│ │ ├── popoverArrowDownSimple.png
│ │ ├── popoverArrowLeft-white@2x.png
│ │ ├── popoverArrowLeft.png
│ │ ├── popoverArrowLeft@2x.png
│ │ ├── popoverArrowLeftSimple.png
│ │ ├── popoverArrowRight-white@2x.png
│ │ ├── popoverArrowRight.png
│ │ ├── popoverArrowRight@2x.png
│ │ ├── popoverArrowRightSimple.png
│ │ ├── popoverArrowUp-white@2x.png
│ │ ├── popoverArrowUp.png
│ │ ├── popoverArrowUp@2x.png
│ │ ├── popoverArrowUpSimple.png
│ │ ├── popoverBg-white@2x.png
│ │ ├── popoverBg.png
│ │ ├── popoverBg@2x.png
│ │ └── popoverBgSimple.png
│ └── WEPopoverViewController.xib
│ ├── WEPopover-Info.plist
│ ├── WEPopover.podspec.json
│ ├── WEPopover.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ ├── WEPopover_Prefix.pch
│ └── main.m
├── PerformSelectorDemo
├── PerformSelectorDemo.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── PerformSelectorDemo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── PerformSelectorDemoTests
│ ├── Info.plist
│ └── PerformSelectorDemoTests.m
└── PerformSelectorDemoUITests
│ ├── Info.plist
│ └── PerformSelectorDemoUITests.m
├── Quartz2DDemo
├── Quartz2DDemo.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── Quartz2DDemo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ └── LaunchScreen.storyboard
│ ├── CanvasView.h
│ ├── CanvasView.m
│ ├── CanvasViewController.h
│ ├── CanvasViewController.m
│ ├── Info.plist
│ ├── TableViewController.h
│ ├── TableViewController.m
│ ├── main.m
│ └── test_image.jpg
├── README.md
├── RandomStringForTest
├── RandomStringForTest.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── RandomStringForTest
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── NSString+JXTRandomString.h
│ ├── NSString+JXTRandomString.m
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── RemoveSingleElementFromArrayDemo
├── RemoveSingleElementFromArrayDemo.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── RemoveSingleElementFromArrayDemo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── StructForLayoutDemo
├── StructForLayoutDemo.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── StructForLayoutDemo
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── TableViewCellAnimationTest
├── TableViewCellAnimationTest.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── TableViewCellAnimationTest
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── ThreadArrayTest
├── ThreadSafetyArray.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── ThreadSafetyArray
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
├── ViewBoundsInitErrorTest
├── ViewBoundsInitErrorTest.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── ViewBoundsInitErrorTest
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── ViewController.h
│ ├── ViewController.m
│ └── main.m
└── WeakStrongDanceDemo
├── WeakStrongDanceDemo.xcodeproj
├── project.pbxproj
└── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
└── WeakStrongDanceDemo
├── AppDelegate.h
├── AppDelegate.m
├── Assets.xcassets
└── AppIcon.appiconset
│ └── Contents.json
├── Base.lproj
├── LaunchScreen.storyboard
└── Main.storyboard
├── Info.plist
├── ViewController.h
├── ViewController.m
└── main.m
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/.DS_Store
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata
19 |
20 | ## Other
21 | *.xccheckout
22 | *.moved-aside
23 | *.xcuserstate
24 | *.xcscmblueprint
25 |
26 | ## Obj-C/Swift specific
27 | *.hmap
28 | *.ipa
29 |
30 | # CocoaPods
31 | #
32 | # We recommend against adding the Pods directory to your .gitignore. However
33 | # you should judge for yourself, the pros and cons are mentioned at:
34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
35 | #
36 | # Pods/
37 |
38 | # Carthage
39 | #
40 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
41 | # Carthage/Checkouts
42 |
43 | Carthage/Build
44 |
45 | # fastlane
46 | #
47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48 | # screenshots whenever they are needed.
49 | # For more information about the recommended setup visit:
50 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md
51 |
52 | fastlane/report.xml
53 | fastlane/screenshots
54 |
--------------------------------------------------------------------------------
/AboutTimeForiOSDemo/AboutTimeForiOSDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AboutTimeForiOSDemo/AboutTimeForiOSDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // AboutTimeForiOSDemo
4 | //
5 | // Created by JXT on 2018/1/25.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/AboutTimeForiOSDemo/AboutTimeForiOSDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // AboutTimeForiOSDemo
4 | //
5 | // Created by JXT on 2018/1/25.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/AboutTimeForiOSDemo/AboutTimeForiOSDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // AboutTimeForiOSDemo
4 | //
5 | // Created by JXT on 2018/1/25.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/AddSubviewToLayout/AddSubviewToLayout.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AddSubviewToLayout/AddSubviewToLayout/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // AddSubviewToLayout
4 | //
5 | // Created by JXT on 2017/3/9.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/AddSubviewToLayout/AddSubviewToLayout/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/AddSubviewToLayout/AddSubviewToLayout/View1.h:
--------------------------------------------------------------------------------
1 | //
2 | // View1.h
3 | // AddSubviewToLayout
4 | //
5 | // Created by JXT on 2017/3/9.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface View1 : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/AddSubviewToLayout/AddSubviewToLayout/View1.m:
--------------------------------------------------------------------------------
1 | //
2 | // View1.m
3 | // AddSubviewToLayout
4 | //
5 | // Created by JXT on 2017/3/9.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "View1.h"
10 |
11 | #import "View2.h"
12 |
13 | @implementation View1
14 |
15 | - (instancetype)initWithFrame:(CGRect)frame
16 | {
17 | if (self = [super initWithFrame:frame]) {
18 | View2 *v = [[View2 alloc] initWithFrame:CGRectMake(0, 0, 20, 20)];
19 | v.backgroundColor = [UIColor blackColor];
20 | v.tag = 201;
21 | [self addSubview:v];
22 | }
23 | return self;
24 | }
25 |
26 | - (void)layoutSubviews
27 | {
28 | [super layoutSubviews];
29 | NSLog(@"view1 - layout");
30 | NSLog(@"tag:%zd", self.tag);
31 | }
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/AddSubviewToLayout/AddSubviewToLayout/View2.h:
--------------------------------------------------------------------------------
1 | //
2 | // View2.h
3 | // AddSubviewToLayout
4 | //
5 | // Created by JXT on 2017/3/9.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface View2 : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/AddSubviewToLayout/AddSubviewToLayout/View2.m:
--------------------------------------------------------------------------------
1 | //
2 | // View2.m
3 | // AddSubviewToLayout
4 | //
5 | // Created by JXT on 2017/3/9.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "View2.h"
10 |
11 | @implementation View2
12 |
13 | - (void)layoutSubviews
14 | {
15 | [super layoutSubviews];
16 | NSLog(@"view2 - layout");
17 | NSLog(@"tag:%zd", self.tag);
18 | }
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/AddSubviewToLayout/AddSubviewToLayout/View3.h:
--------------------------------------------------------------------------------
1 | //
2 | // View3.h
3 | // AddSubviewToLayout
4 | //
5 | // Created by JXT on 2017/3/9.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface View3 : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/AddSubviewToLayout/AddSubviewToLayout/View3.m:
--------------------------------------------------------------------------------
1 | //
2 | // View3.m
3 | // AddSubviewToLayout
4 | //
5 | // Created by JXT on 2017/3/9.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "View3.h"
10 |
11 | @implementation View3
12 |
13 | - (void)layoutSubviews
14 | {
15 | [super layoutSubviews];
16 | NSLog(@"view3 - layout");
17 | NSLog(@"tag:%zd", self.tag);
18 | }
19 |
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/AddSubviewToLayout/AddSubviewToLayout/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // AddSubviewToLayout
4 | //
5 | // Created by JXT on 2017/3/9.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/AddSubviewToLayout/AddSubviewToLayout/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // AddSubviewToLayout
4 | //
5 | // Created by JXT on 2017/3/9.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | #import "View1.h"
12 | #import "View2.h"
13 | #import "View3.h"
14 |
15 | @interface ViewController ()
16 |
17 | @end
18 |
19 | @implementation ViewController
20 |
21 | - (void)viewDidLoad
22 | {
23 | [super viewDidLoad];
24 |
25 | View1 *v1 = [[View1 alloc] initWithFrame:CGRectMake(100, 100, 200, 100)];
26 | v1.backgroundColor = [UIColor redColor];
27 | v1.tag = 100;
28 | // [self.view addSubview:v1];
29 |
30 | View2 *v2 = [[View2 alloc] initWithFrame:CGRectMake(0, 0, 100, 50)];
31 | v2.backgroundColor = [[UIColor greenColor] colorWithAlphaComponent:0.5];
32 | v2.tag = 200;
33 | [v1 addSubview:v2];
34 |
35 | View3 *v3 = [[View3 alloc] initWithFrame:CGRectMake(0, 0, 50, 40)];
36 | v3.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.4];
37 | v3.tag = 300;
38 | [v2 addSubview:v3];
39 |
40 | //addSubview会触发layoutSubviews
41 | //但是真正开始触发的是从显示层开始的,逐层往下
42 | [self.view addSubview:v1];
43 | }
44 |
45 |
46 | - (void)didReceiveMemoryWarning {
47 | [super didReceiveMemoryWarning];
48 | // Dispose of any resources that can be recreated.
49 | }
50 |
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/AddSubviewToLayout/AddSubviewToLayout/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // AddSubviewToLayout
4 | //
5 | // Created by JXT on 2017/3/9.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/AnimationBlockDelegateTest/AnimationBlockDelegateTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/AnimationBlockDelegateTest/AnimationBlockDelegateTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // AnimationBlockDelegateTest
4 | //
5 | // Created by JXT on 2017/5/23.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/AnimationBlockDelegateTest/AnimationBlockDelegateTest/JXTAnimationBlockDelegate.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : AnimationBlockDelegateTest
3 | //文件名称 : JXTAnimationBlockDelegate.h
4 | //创建时间 : 2017/5/23
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | #if defined(__IPHONE_10_0) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0)
14 | @interface JXTAnimationBlockDelegate : NSObject
15 | #else
16 | @interface JXTAnimationBlockDelegate : NSObject
17 | #endif
18 |
19 | /**
20 | CAAnimationDelegate代理对象初始化
21 |
22 | @param animationDidStart 动画开始执行block回调
23 | @param animationDidStop 动画结束执行block回调
24 | @return 代理对象实例
25 | */
26 | + (instancetype)animationBlockDelegateWithAnimationDidStart:(void(^)(void))animationDidStart
27 | animationDidStop:(void(^)(BOOL finished))animationDidStop;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/AnimationBlockDelegateTest/AnimationBlockDelegateTest/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // AnimationBlockDelegateTest
4 | //
5 | // Created by JXT on 2017/5/23.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/AnimationBlockDelegateTest/AnimationBlockDelegateTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // AnimationBlockDelegateTest
4 | //
5 | // Created by JXT on 2017/5/23.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CAAnimationDelegateTest/AnimationTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CAAnimationDelegateTest/AnimationTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // AnimationTest
4 | //
5 | // Created by JXT on 2016/9/25.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/CAAnimationDelegateTest/AnimationTest/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/CAAnimationDelegateTest/AnimationTest/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // AnimationTest
4 | //
5 | // Created by JXT on 2016/9/25.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/CAAnimationDelegateTest/AnimationTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // AnimationTest
4 | //
5 | // Created by JXT on 2016/9/25.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CategoryDelegateUnsafeTest/CategoryDelegateUnsafeTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CategoryDelegateUnsafeTest/CategoryDelegateUnsafeTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // CategoryDelegateUnsafeTest
4 | //
5 | // Created by JXT on 2017/1/20.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/CategoryDelegateUnsafeTest/CategoryDelegateUnsafeTest/UIView+Add1.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Add1.h
3 | // CategoryDelegateUnsafeTest
4 | //
5 | // Created by JXT on 2017/1/20.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (Add1)
12 |
13 | - (void)jxt_addTextFielAdd1;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/CategoryDelegateUnsafeTest/CategoryDelegateUnsafeTest/UIView+Add1.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Add1.m
3 | // CategoryDelegateUnsafeTest
4 | //
5 | // Created by JXT on 2017/1/20.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "UIView+Add1.h"
10 |
11 | @implementation UIView (Add1)
12 |
13 | - (void)jxt_addTextFielAdd1
14 | {
15 | UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 10, 200, 50)];
16 | textField.borderStyle = UITextBorderStyleRoundedRect;
17 | textField.backgroundColor = [UIColor redColor];
18 | textField.placeholder = @"TextField-Add1";
19 | textField.delegate = self;
20 | [self addSubview:textField];
21 | }
22 |
23 | - (BOOL)textFieldShouldReturn:(UITextField *)textField
24 | {
25 | NSLog(@"UIView+Add1");
26 | return YES;
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/CategoryDelegateUnsafeTest/CategoryDelegateUnsafeTest/UIView+MyExt0.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MyExt0.h
3 | // CategoryDelegateUnsafeTest
4 | //
5 | // Created by JXT on 2017/1/20.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (MyExt0)
12 |
13 | - (void)jxt_addTextField0;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/CategoryDelegateUnsafeTest/CategoryDelegateUnsafeTest/UIView+MyExt0.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MyExt0.m
3 | // CategoryDelegateUnsafeTest
4 | //
5 | // Created by JXT on 2017/1/20.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "UIView+MyExt0.h"
10 |
11 | @implementation UIView (MyExt0)
12 |
13 | - (void)jxt_addTextField0
14 | {
15 | UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 10, 200, 50)];
16 | textField.borderStyle = UITextBorderStyleRoundedRect;
17 | textField.backgroundColor = [UIColor redColor];
18 | textField.placeholder = @"TextField-0";
19 | textField.delegate = self;
20 | [self addSubview:textField];
21 | }
22 |
23 | - (BOOL)textFieldShouldReturn:(UITextField *)textField
24 | {
25 | NSLog(@"UIView+MyExt0");
26 | return YES;
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/CategoryDelegateUnsafeTest/CategoryDelegateUnsafeTest/UIView+MyExt1.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MyExt1.h
3 | // CategoryDelegateUnsafeTest
4 | //
5 | // Created by JXT on 2017/1/20.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (MyExt1)
12 |
13 | - (void)jxt_addTextField1;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/CategoryDelegateUnsafeTest/CategoryDelegateUnsafeTest/UIView+MyExt1.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MyExt1.m
3 | // CategoryDelegateUnsafeTest
4 | //
5 | // Created by JXT on 2017/1/20.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "UIView+MyExt1.h"
10 |
11 | @implementation UIView (MyExt1)
12 |
13 | - (void)jxt_addTextField1
14 | {
15 | UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 10, 200, 50)];
16 | textField.borderStyle = UITextBorderStyleRoundedRect;
17 | textField.backgroundColor = [UIColor redColor];
18 | textField.placeholder = @"TextField-1";
19 | textField.delegate = self;
20 | [self addSubview:textField];
21 | }
22 |
23 | - (BOOL)textFieldShouldReturn:(UITextField *)textField
24 | {
25 | NSLog(@"UIView+MyExt1");
26 | if ([textField isFirstResponder]) {
27 | [textField resignFirstResponder];
28 | }
29 | return YES;
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/CategoryDelegateUnsafeTest/CategoryDelegateUnsafeTest/UIView+MyExt2.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MyExt2.h
3 | // CategoryDelegateUnsafeTest
4 | //
5 | // Created by JXT on 2017/1/20.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (MyExt2)
12 |
13 | - (void)jxt_addTextField2;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/CategoryDelegateUnsafeTest/CategoryDelegateUnsafeTest/UIView+MyExt2.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MyExt2.m
3 | // CategoryDelegateUnsafeTest
4 | //
5 | // Created by JXT on 2017/1/20.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "UIView+MyExt2.h"
10 |
11 | @implementation UIView (MyExt2)
12 |
13 | - (void)jxt_addTextField2
14 | {
15 | UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 10, 200, 50)];
16 | textField.borderStyle = UITextBorderStyleBezel;
17 | textField.backgroundColor = [UIColor greenColor];
18 | textField.placeholder = @"TextField-2";
19 | textField.delegate = self;
20 | [self addSubview:textField];
21 | }
22 |
23 | - (BOOL)textFieldShouldReturn:(UITextField *)textField
24 | {
25 | NSLog(@"UIView+MyExt2");
26 | return YES;
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/CategoryDelegateUnsafeTest/CategoryDelegateUnsafeTest/UIView+MyExt3.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MyExt3.h
3 | // CategoryDelegateUnsafeTest
4 | //
5 | // Created by JXT on 2017/1/20.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (MyExt3)
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/CategoryDelegateUnsafeTest/CategoryDelegateUnsafeTest/UIView+MyExt3.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MyExt3.m
3 | // CategoryDelegateUnsafeTest
4 | //
5 | // Created by JXT on 2017/1/20.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "UIView+MyExt3.h"
10 |
11 | @implementation UIView (MyExt3)
12 |
13 | - (void)jxt_addTextField3
14 | {
15 | UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 10, 200, 50)];
16 | textField.borderStyle = UITextBorderStyleRoundedRect;
17 | textField.backgroundColor = [UIColor redColor];
18 | textField.placeholder = @"TextField-3";
19 | textField.delegate = self;
20 | [self addSubview:textField];
21 | }
22 |
23 | - (BOOL)textFieldShouldReturn:(UITextField *)textField
24 | {
25 | NSLog(@"UIView+MyExt3");
26 | if ([textField isFirstResponder]) {
27 | [textField resignFirstResponder];
28 | }
29 | return YES;
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/CategoryDelegateUnsafeTest/CategoryDelegateUnsafeTest/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // CategoryDelegateUnsafeTest
4 | //
5 | // Created by JXT on 2017/1/20.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/CategoryDelegateUnsafeTest/CategoryDelegateUnsafeTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // CategoryDelegateUnsafeTest
4 | //
5 | // Created by JXT on 2017/1/20.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CategoryDuplicationProperty/CategoryDuplicationProperty.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CategoryDuplicationProperty/CategoryDuplicationProperty/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // CategoryDuplicationProperty
4 | //
5 | // Created by JXT on 2017/3/3.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/CategoryDuplicationProperty/CategoryDuplicationProperty/UIView+MyProperty.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MyProperty.h
3 | // CategoryDuplicationProperty
4 | //
5 | // Created by JXT on 2017/3/3.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (MyProperty)
12 |
13 | @property (nonatomic, assign) NSInteger frame;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/CategoryDuplicationProperty/CategoryDuplicationProperty/UIView+MyProperty.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+MyProperty.m
3 | // CategoryDuplicationProperty
4 | //
5 | // Created by JXT on 2017/3/3.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "UIView+MyProperty.h"
10 |
11 | #import
12 |
13 | static const void *kMyFramePropertyKey = &kMyFramePropertyKey;
14 |
15 | @implementation UIView (MyProperty)
16 |
17 | - (NSInteger)frame
18 | {
19 | NSNumber *num = objc_getAssociatedObject(self, kMyFramePropertyKey);
20 | return num.integerValue;
21 | }
22 |
23 | - (void)setFrame:(NSInteger)frame
24 | {
25 | objc_setAssociatedObject(self, kMyFramePropertyKey, @(frame), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/CategoryDuplicationProperty/CategoryDuplicationProperty/UIViewController+MyProperty.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+MyProperty.h
3 | // CategoryDuplicationProperty
4 | //
5 | // Created by JXT on 2017/3/3.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIViewController (MyProperty)
12 |
13 | //属性覆盖后,黑屏
14 | //@property (nonatomic, strong) NSNumber * view;
15 |
16 | //重名方法
17 | - (UIView *)view;
18 |
19 | @property (nonatomic, assign) NSInteger title;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/CategoryDuplicationProperty/CategoryDuplicationProperty/UIViewController+MyProperty.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIViewController+MyProperty.m
3 | // CategoryDuplicationProperty
4 | //
5 | // Created by JXT on 2017/3/3.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "UIViewController+MyProperty.h"
10 |
11 | #import
12 |
13 | static const void *kMyNumberPropertyKey = &kMyNumberPropertyKey;
14 |
15 | @implementation UIViewController (MyProperty)
16 |
17 | //- (NSNumber *)view
18 | //{
19 | // return objc_getAssociatedObject(self, kMyNumberPropertyKey);
20 | //}
21 | //
22 | //- (void)setView:(NSNumber *)view
23 | //{
24 | // objc_setAssociatedObject(self, kMyNumberPropertyKey, view, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
25 | //}
26 |
27 | - (UIView *)view
28 | {
29 | UIView *aView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 100)];
30 | aView.backgroundColor = [UIColor lightGrayColor];
31 | return aView;
32 | }
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/CategoryDuplicationProperty/CategoryDuplicationProperty/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // CategoryDuplicationProperty
4 | //
5 | // Created by JXT on 2017/3/3.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/CategoryDuplicationProperty/CategoryDuplicationProperty/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // CategoryDuplicationProperty
4 | //
5 | // Created by JXT on 2017/3/3.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)loadView
18 | {
19 | [super loadView];
20 |
21 | NSLog(@"%@", self.view.class);
22 | NSLog(@"%zd", self.view.frame);
23 | // NSLog(@"%@", NSStringFromCGRect(self.view.frame));
24 | }
25 |
26 | - (void)viewDidLoad
27 | {
28 | [super viewDidLoad];
29 |
30 | NSLog(@"%@", self.view.class);
31 | // NSLog(@"%@", NSStringFromCGRect(self.view.frame));
32 |
33 | NSLog(@"%zd", self.title);
34 | }
35 |
36 |
37 | - (void)didReceiveMemoryWarning {
38 | [super didReceiveMemoryWarning];
39 | // Dispose of any resources that can be recreated.
40 | }
41 |
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/CategoryDuplicationProperty/CategoryDuplicationProperty/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // CategoryDuplicationProperty
4 | //
5 | // Created by JXT on 2017/3/3.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ChildViewControllerTest/ChildViewControllerTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ChildViewControllerTest/ChildViewControllerTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ChildViewControllerTest
4 | //
5 | // Created by JXT on 2017/2/13.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/ChildViewControllerTest/ChildViewControllerTest/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/ChildViewControllerTest/ChildViewControllerTest/BaseViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // BaseViewController.h
3 | // ChildViewControllerTest
4 | //
5 | // Created by JXT on 2017/2/13.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface BaseViewController : UIViewController
12 |
13 | @property (nonatomic, strong) UIButton * testButton;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/ChildViewControllerTest/ChildViewControllerTest/BaseViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // BaseViewController.m
3 | // ChildViewControllerTest
4 | //
5 | // Created by JXT on 2017/2/13.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "BaseViewController.h"
10 |
11 | @interface BaseViewController ()
12 |
13 | @end
14 |
15 | @implementation BaseViewController
16 |
17 | - (void)viewDidLoad
18 | {
19 | [super viewDidLoad];
20 |
21 | UIButton *testButton = [UIButton buttonWithType:UIButtonTypeCustom];
22 | testButton.frame = CGRectMake(arc4random_uniform(200)+50, arc4random_uniform(300)+50, 100, 50);
23 | [testButton setTitle:@"button" forState:UIControlStateNormal];
24 | testButton.backgroundColor = [UIColor orangeColor];
25 | [testButton addTarget:self action:@selector(testButtonAction:) forControlEvents:UIControlEventTouchUpInside];
26 | self.testButton = testButton;
27 | }
28 |
29 | - (void)didReceiveMemoryWarning {
30 | [super didReceiveMemoryWarning];
31 | // Dispose of any resources that can be recreated.
32 | }
33 |
34 | - (void)testButtonAction:(UIButton *)aSender
35 | {
36 | NSLog(@"%@", self);
37 |
38 | if(aSender.tag == 1001)
39 | {
40 | NSLog(@"VC1");
41 | }
42 | else if(aSender.tag == 1002)
43 | {
44 | NSLog(@"VC2");
45 | }
46 | else if(aSender.tag == 1003)
47 | {
48 | NSLog(@"VC3");
49 | }
50 | }
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/ChildViewControllerTest/ChildViewControllerTest/ContainerViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ContainerViewController.h
3 | // ChildViewControllerTest
4 | //
5 | // Created by JXT on 2017/2/14.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ContainerViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ChildViewControllerTest/ChildViewControllerTest/VC1.h:
--------------------------------------------------------------------------------
1 | //
2 | // VC1.h
3 | // ChildViewControllerTest
4 | //
5 | // Created by JXT on 2017/2/13.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "BaseViewController.h"
10 |
11 | @interface VC1 : BaseViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ChildViewControllerTest/ChildViewControllerTest/VC1.m:
--------------------------------------------------------------------------------
1 | //
2 | // VC1.m
3 | // ChildViewControllerTest
4 | //
5 | // Created by JXT on 2017/2/13.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "VC1.h"
10 |
11 | @interface VC1 ()
12 |
13 | @end
14 |
15 | @implementation VC1
16 |
17 | - (void)viewDidLoad
18 | {
19 | [super viewDidLoad];
20 |
21 | NSLog(@"viewDidLoad - %@", self);
22 |
23 | self.view.backgroundColor = [UIColor whiteColor];
24 | self.testButton.tag = 1001;
25 | [self.view addSubview:self.testButton];
26 | }
27 |
28 | - (void)didReceiveMemoryWarning {
29 | [super didReceiveMemoryWarning];
30 | // Dispose of any resources that can be recreated.
31 | }
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/ChildViewControllerTest/ChildViewControllerTest/VC2.h:
--------------------------------------------------------------------------------
1 | //
2 | // VC2.h
3 | // ChildViewControllerTest
4 | //
5 | // Created by JXT on 2017/2/13.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "BaseViewController.h"
10 |
11 | @interface VC2 : BaseViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ChildViewControllerTest/ChildViewControllerTest/VC2.m:
--------------------------------------------------------------------------------
1 | //
2 | // VC2.m
3 | // ChildViewControllerTest
4 | //
5 | // Created by JXT on 2017/2/13.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "VC2.h"
10 |
11 | @interface VC2 ()
12 |
13 | @end
14 |
15 | @implementation VC2
16 |
17 | - (void)viewDidLoad
18 | {
19 | [super viewDidLoad];
20 |
21 | NSLog(@"viewDidLoad - %@", self);
22 |
23 | self.view.backgroundColor = [UIColor lightGrayColor];
24 | self.testButton.tag = 1002;
25 | [self.view addSubview:self.testButton];
26 | }
27 |
28 | - (void)didReceiveMemoryWarning {
29 | [super didReceiveMemoryWarning];
30 | // Dispose of any resources that can be recreated.
31 | }
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/ChildViewControllerTest/ChildViewControllerTest/VC3.h:
--------------------------------------------------------------------------------
1 | //
2 | // VC3.h
3 | // ChildViewControllerTest
4 | //
5 | // Created by JXT on 2017/2/13.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "BaseViewController.h"
10 |
11 | @interface VC3 : BaseViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ChildViewControllerTest/ChildViewControllerTest/VC3.m:
--------------------------------------------------------------------------------
1 | //
2 | // VC3.m
3 | // ChildViewControllerTest
4 | //
5 | // Created by JXT on 2017/2/13.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "VC3.h"
10 |
11 | @interface VC3 ()
12 |
13 | @end
14 |
15 | @implementation VC3
16 |
17 | - (void)viewDidLoad
18 | {
19 | [super viewDidLoad];
20 |
21 | NSLog(@"viewDidLoad - %@", self);
22 |
23 | self.view.backgroundColor = [UIColor grayColor];
24 | self.testButton.tag = 1003;
25 | [self.view addSubview:self.testButton];
26 | }
27 |
28 | - (void)didReceiveMemoryWarning {
29 | [super didReceiveMemoryWarning];
30 | // Dispose of any resources that can be recreated.
31 | }
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/ChildViewControllerTest/ChildViewControllerTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ChildViewControllerTest
4 | //
5 | // Created by JXT on 2017/2/13.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ClassPropertyTest/ClassPropertyTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ClassPropertyTest/ClassPropertyTest.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ClassPropertyTest/ClassPropertyTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ClassPropertyTest
4 | //
5 | // Created by JXT on 2017/3/14.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/ClassPropertyTest/ClassPropertyTest/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/ClassPropertyTest/ClassPropertyTest/MyObject.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : ClassPropertyTest
3 | //文件名称 : MyObject.h
4 | //创建时间 : 2017/3/14
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @interface MyObject : NSObject
14 |
15 | //实例属性
16 | @property (nonatomic, strong) NSObject * instanceProperty;
17 |
18 | //类属性1(不加'class'修饰,点方法会报错)
19 | @property (nonatomic, strong, class) NSObject * classProperty;
20 |
21 | //类属性2
22 | @property (nonatomic, strong, class) NSObject * classProperty2;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/ClassPropertyTest/ClassPropertyTest/MyObject.m:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : ClassPropertyTest
3 | //文件名称 : MyObject.m
4 | //创建时间 : 2017/3/14
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "MyObject.h"
12 |
13 | #import
14 |
15 | static NSObject *__myobj_globalVariable = nil;
16 |
17 | @implementation MyObject
18 |
19 | + (NSObject *)classProperty
20 | {
21 | return objc_getAssociatedObject(self, _cmd);
22 | }
23 |
24 | + (void)setClassProperty:(NSObject *)classProperty
25 | {
26 | objc_setAssociatedObject(self, @selector(classProperty), classProperty, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
27 | }
28 |
29 |
30 | + (void)setClassProperty2:(NSObject *)classProperty2
31 | {
32 | __myobj_globalVariable = classProperty2;
33 | }
34 | + (NSObject *)classProperty2
35 | {
36 | return __myobj_globalVariable;
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/ClassPropertyTest/ClassPropertyTest/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // ClassPropertyTest
4 | //
5 | // Created by JXT on 2017/3/14.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/ClassPropertyTest/ClassPropertyTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ClassPropertyTest
4 | //
5 | // Created by JXT on 2017/3/14.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CountDownButton/TimeDownButton.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CountDownButton/TimeDownButton/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // TimeDownButton
4 | //
5 | // Created by JXT on 16/2/23.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/CountDownButton/TimeDownButton/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/CountDownButton/TimeDownButton/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | zh_CN
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/CountDownButton/TimeDownButton/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // TimeDownButton
4 | //
5 | // Created by JXT on 16/2/23.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/CountDownButton/TimeDownButton/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // TimeDownButton
4 | //
5 | // Created by JXT on 16/2/23.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/DelegateOptimizeTest/DelegateOptimizeTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DelegateOptimizeTest/DelegateOptimizeTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DelegateOptimizeTest
4 | //
5 | // Created by JXT on 2017/1/12.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/DelegateOptimizeTest/DelegateOptimizeTest/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/DelegateOptimizeTest/DelegateOptimizeTest/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // DelegateOptimizeTest
4 | //
5 | // Created by JXT on 2017/1/12.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/DelegateOptimizeTest/DelegateOptimizeTest/ViewController2.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController2.h
3 | // DelegateOptimizeTest
4 | //
5 | // Created by JXT on 2017/1/12.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class ViewController2;
12 | @protocol VC2DataSourceDelegate
13 |
14 | @optional
15 | - (void)carryVC2Title:(NSString *)title fetcher:(ViewController2 *)vc2;
16 | - (void)carryVC2Message:(NSString *)message;
17 |
18 | @required
19 | - (void)receivedNetWorkDataDict:(NSDictionary *)dict;
20 |
21 | @end
22 |
23 |
24 | @interface ViewController2 : UIViewController
25 |
26 | @property (nonatomic, weak) id delegate;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/DelegateOptimizeTest/DelegateOptimizeTest/ViewController3.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController3.h
3 | // DelegateOptimizeTest
4 | //
5 | // Created by JXT on 2017/3/17.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController3 : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/DelegateOptimizeTest/DelegateOptimizeTest/ViewController3.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController3.m
3 | // DelegateOptimizeTest
4 | //
5 | // Created by JXT on 2017/3/17.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "ViewController3.h"
10 |
11 | @interface ViewController3 ()
12 |
13 | @end
14 |
15 | @implementation ViewController3
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
28 | {
29 | [self.navigationController popViewControllerAnimated:YES];
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/DelegateOptimizeTest/DelegateOptimizeTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DelegateOptimizeTest
4 | //
5 | // Created by JXT on 2017/1/12.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/DoWhile0MacroTest/DoWhile0MacroTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/DoWhile0MacroTest/DoWhile0MacroTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // DoWhile0MacroTest
4 | //
5 | // Created by JXT on 2017/9/25.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/DoWhile0MacroTest/DoWhile0MacroTest/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // DoWhile0MacroTest
4 | //
5 | // Created by JXT on 2017/9/25.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/DoWhile0MacroTest/DoWhile0MacroTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // DoWhile0MacroTest
4 | //
5 | // Created by JXT on 2017/9/25.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/FindAllEnumOptions/FindAllEnumOptions.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/FindAllEnumOptions/FindAllEnumOptions.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/FindAllEnumOptions/FindAllEnumOptions/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // FindAllEnumOptions
4 | //
5 | // Created by JXT on 2018/7/9.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/FindAllEnumOptions/FindAllEnumOptions/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/FindAllEnumOptions/FindAllEnumOptions/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // FindAllEnumOptions
4 | //
5 | // Created by JXT on 2018/7/9.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/FindAllEnumOptions/FindAllEnumOptions/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // FindAllEnumOptions
4 | //
5 | // Created by JXT on 2018/7/9.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/GlobalStaticValueTest/GlobalStaticValueTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GlobalStaticValueTest/GlobalStaticValueTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // GlobalStaticValueTest
4 | //
5 | // Created by JXT on 2017/9/8.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/GlobalStaticValueTest/GlobalStaticValueTest/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/GlobalStaticValueTest/GlobalStaticValueTest/GlobalValue.h:
--------------------------------------------------------------------------------
1 | //
2 | // GlobalValue.h
3 | // GlobalStaticValueTest
4 | //
5 | // Created by JXT on 2017/9/8.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | extern NSInteger globalIntValue;
12 |
13 | static NSInteger globalIntValueStatic = 0;
14 |
--------------------------------------------------------------------------------
/GlobalStaticValueTest/GlobalStaticValueTest/GlobalValue.m:
--------------------------------------------------------------------------------
1 | //
2 | // GlobalValue.m
3 | // GlobalStaticValueTest
4 | //
5 | // Created by JXT on 2017/9/8.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "GlobalValue.h"
10 |
11 | NSInteger globalIntValue = 0;
12 |
--------------------------------------------------------------------------------
/GlobalStaticValueTest/GlobalStaticValueTest/PrefixHeader.pch:
--------------------------------------------------------------------------------
1 | //
2 | // PrefixHeader.pch
3 | // GlobalStaticValueTest
4 | //
5 | // Created by JXT on 2017/9/8.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #ifndef PrefixHeader_pch
10 | #define PrefixHeader_pch
11 |
12 | // Include any system framework and library headers here that should be included in all compilation units.
13 | // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
14 | #ifdef __OBJC__ //保证只有oc文件可以调用pch里面的头文件
15 |
16 | #import
17 |
18 | #import "GlobalValue.h"
19 |
20 | #endif
21 |
22 | #endif /* PrefixHeader_pch */
23 |
--------------------------------------------------------------------------------
/GlobalStaticValueTest/GlobalStaticValueTest/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // GlobalStaticValueTest
4 | //
5 | // Created by JXT on 2017/9/8.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/GlobalStaticValueTest/GlobalStaticValueTest/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // GlobalStaticValueTest
4 | //
5 | // Created by JXT on 2017/9/8.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad
18 | {
19 | [super viewDidLoad];
20 |
21 | self.view.backgroundColor = [UIColor whiteColor];
22 |
23 | NSLog(@"%@", self);
24 |
25 | NSLog(@"globalIntValue - %zd - %p", globalIntValue, &globalIntValue);
26 | globalIntValue = 2;
27 | NSLog(@"globalIntValue - %zd - %p", globalIntValue, &globalIntValue);
28 |
29 | NSLog(@"globalIntValueStatic - %zd - %p", globalIntValueStatic, &globalIntValueStatic);
30 | globalIntValueStatic = 3;
31 | NSLog(@"globalIntValueStatic - %zd - %p", globalIntValueStatic, &globalIntValueStatic);
32 |
33 | }
34 |
35 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
36 | {
37 | [self presentViewController:[NSClassFromString(@"ViewController2") new] animated:YES completion:NULL];
38 | }
39 |
40 |
41 | - (void)didReceiveMemoryWarning {
42 | [super didReceiveMemoryWarning];
43 | // Dispose of any resources that can be recreated.
44 | }
45 |
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/GlobalStaticValueTest/GlobalStaticValueTest/ViewController2.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController2.h
3 | // GlobalStaticValueTest
4 | //
5 | // Created by JXT on 2017/9/8.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController2 : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/GlobalStaticValueTest/GlobalStaticValueTest/ViewController2.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController2.m
3 | // GlobalStaticValueTest
4 | //
5 | // Created by JXT on 2017/9/8.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "ViewController2.h"
10 |
11 | @interface ViewController2 ()
12 |
13 | @end
14 |
15 | @implementation ViewController2
16 |
17 | - (void)viewDidLoad
18 | {
19 | [super viewDidLoad];
20 |
21 | self.view.backgroundColor = [UIColor lightGrayColor];
22 |
23 | NSLog(@"%@", self);
24 |
25 | NSLog(@"globalIntValue - %zd - %p", globalIntValue, &globalIntValue);
26 | globalIntValue = 200;
27 | NSLog(@"globalIntValue - %zd - %p", globalIntValue, &globalIntValue);
28 |
29 | NSLog(@"globalIntValueStatic - %zd - %p", globalIntValueStatic, &globalIntValueStatic);
30 | globalIntValueStatic = 300;
31 | NSLog(@"globalIntValueStatic - %zd - %p", globalIntValueStatic, &globalIntValueStatic);
32 | }
33 |
34 | - (void)didReceiveMemoryWarning {
35 | [super didReceiveMemoryWarning];
36 | // Dispose of any resources that can be recreated.
37 | }
38 |
39 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
40 | {
41 | [self dismissViewControllerAnimated:YES completion:NULL];
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/GlobalStaticValueTest/GlobalStaticValueTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // GlobalStaticValueTest
4 | //
5 | // Created by JXT on 2017/9/8.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/IfNilTest/IfNilTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/IfNilTest/IfNilTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // IfNilTest
4 | //
5 | // Created by JXT on 2017/9/25.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/IfNilTest/IfNilTest/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // IfNilTest
4 | //
5 | // Created by JXT on 2017/9/25.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/IfNilTest/IfNilTest/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // IfNilTest
4 | //
5 | // Created by JXT on 2017/9/25.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad
18 | {
19 | [super viewDidLoad];
20 |
21 | NSArray *array = nil;
22 |
23 | //http://www.cocoachina.com/ios/20141119/10247.html
24 |
25 | //下面这个判断条件是有歧义的
26 | if (array.count == 0) {
27 | NSLog(@"array.count == 0");
28 | }
29 |
30 | //这个才是包含了所有的条件
31 | if (array) {
32 | if (array.count == 0) {
33 | NSLog(@"array.count == 0");
34 | }
35 | else {
36 | NSLog(@"array.count != 0");
37 | }
38 | }
39 | else {
40 | NSLog(@"array == nil");
41 | }
42 |
43 | NSLog(@"%p", 0);
44 | NSLog(@"%p", (void *)0);
45 | NSLog(@"%p", nil);
46 |
47 | }
48 |
49 | - (void)didReceiveMemoryWarning {
50 | [super didReceiveMemoryWarning];
51 | // Dispose of any resources that can be recreated.
52 | }
53 |
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/IfNilTest/IfNilTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // IfNilTest
4 | //
5 | // Created by JXT on 2017/9/25.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/JXTAboutNavigationBar/ScrollScale.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/JXTAboutNavigationBar/ScrollScale.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/JXTAboutNavigationBar/ScrollScale/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ScrollScale
4 | //
5 | // Created by JXT on 16/3/10.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 | // ***
9 | // * GitHub:https://github.com/kukumaluCN/JXT_iOS_Demos
10 | // * 博客:http://www.jianshu.com/users/c8f8558a4b1d/latest_articles
11 | // * 邮箱:1145049339@qq.com
12 | // ***
13 |
14 | #import
15 |
16 | @interface AppDelegate : UIResponder
17 |
18 | @property (strong, nonatomic) UIWindow *window;
19 |
20 |
21 | @end
22 |
23 |
--------------------------------------------------------------------------------
/JXTAboutNavigationBar/ScrollScale/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/JXTAboutNavigationBar/ScrollScale/HideBarViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HideBarViewController.h
3 | // ScrollScale
4 | //
5 | // Created by JXT on 16/3/18.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 | // ***
9 | // * GitHub:https://github.com/kukumaluCN/JXT_iOS_Demos
10 | // * 博客:http://www.jianshu.com/users/c8f8558a4b1d/latest_articles
11 | // * 邮箱:1145049339@qq.com
12 | // ***
13 |
14 | #import
15 |
16 | @interface HideBarViewController : UIViewController
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/JXTAboutNavigationBar/ScrollScale/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | zh_CN
7 | CFBundleDisplayName
8 | 霖溦Demo
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
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
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/JXTAboutNavigationBar/ScrollScale/JXTNavigationController.h:
--------------------------------------------------------------------------------
1 | //
2 | // JXTNavigationController.h
3 | // ScrollScale
4 | //
5 | // Created by JXT on 16/3/14.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 | // ***
9 | // * GitHub:https://github.com/kukumaluCN/JXT_iOS_Demos
10 | // * 博客:http://www.jianshu.com/users/c8f8558a4b1d/latest_articles
11 | // * 邮箱:1145049339@qq.com
12 | // ***
13 |
14 | #import
15 |
16 | @interface JXTNavigationController : UINavigationController
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/JXTAboutNavigationBar/ScrollScale/JXTPrefixHeader.pch:
--------------------------------------------------------------------------------
1 | //
2 | // JXTPrefixHeader.pch
3 | // ScrollScale
4 | //
5 | // Created by JXT on 16/3/21.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 | // ***
9 | // * GitHub:https://github.com/kukumaluCN/JXT_iOS_Demos
10 | // * 博客:http://www.jianshu.com/users/c8f8558a4b1d/latest_articles
11 | // * 邮箱:1145049339@qq.com
12 | // ***
13 |
14 | #ifndef JXTPrefixHeader_pch
15 | #define JXTPrefixHeader_pch
16 |
17 | // Include any system framework and library headers here that should be included in all compilation units.
18 | // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
19 |
20 |
21 | #define ScreenWidth [UIScreen mainScreen].bounds.size.width
22 | #define ScreenHeight [UIScreen mainScreen].bounds.size.height
23 |
24 | #endif /* JXTPrefixHeader_pch */
25 |
--------------------------------------------------------------------------------
/JXTAboutNavigationBar/ScrollScale/JXTScaleViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // JXTScaleViewController.h
3 | // ScrollScale
4 | //
5 | // Created by JXT on 16/3/11.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 | // ***
9 | // * GitHub:https://github.com/kukumaluCN/JXT_iOS_Demos
10 | // * 博客:http://www.jianshu.com/users/c8f8558a4b1d/latest_articles
11 | // * 邮箱:1145049339@qq.com
12 | // ***
13 |
14 | #import
15 |
16 | @interface JXTScaleViewController : UIViewController
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/JXTAboutNavigationBar/ScrollScale/JXTTransparentBarVC.h:
--------------------------------------------------------------------------------
1 | //
2 | // JXTTransparentBarVC.h
3 | // ScrollScale
4 | //
5 | // Created by JXT on 16/3/11.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 | // ***
9 | // * GitHub:https://github.com/kukumaluCN/JXT_iOS_Demos
10 | // * 博客:http://www.jianshu.com/users/c8f8558a4b1d/latest_articles
11 | // * 邮箱:1145049339@qq.com
12 | // ***
13 |
14 | #import
15 |
16 | typedef void(^AlphaBlock)(CGFloat alpha);
17 |
18 | @interface JXTTransparentBarVC : UIViewController
19 |
20 | @property (nonatomic, copy) AlphaBlock alphaBlock;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/JXTAboutNavigationBar/ScrollScale/backImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/JXTAboutNavigationBar/ScrollScale/backImage.png
--------------------------------------------------------------------------------
/JXTAboutNavigationBar/ScrollScale/head@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/JXTAboutNavigationBar/ScrollScale/head@2x.png
--------------------------------------------------------------------------------
/JXTAboutNavigationBar/ScrollScale/head@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/JXTAboutNavigationBar/ScrollScale/head@3x.png
--------------------------------------------------------------------------------
/JXTAboutNavigationBar/ScrollScale/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ScrollScale
4 | //
5 | // Created by JXT on 16/3/10.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/JXTAlertView/JXTAlertView.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/JXTAlertView/JXTAlertView/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // JXTAlertView
4 | //
5 | // Created by JXT on 16/3/5.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/JXTAlertView/JXTAlertView/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/JXTAlertView/JXTAlertView/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | zh_CN
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/JXTAlertView/JXTAlertView/JXTAlertView.h:
--------------------------------------------------------------------------------
1 | //
2 | // JXTAlertView.h
3 | // JXTAlertView
4 | //
5 | // Created by JXT on 16/3/5.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 | //
9 | // ***
10 | // * GitHub:https://github.com/kukumaluCN/JXT_iOS_Demos
11 | // * 博客:http://www.jianshu.com/users/c8f8558a4b1d/latest_articles
12 | // * 邮箱:1145049339@qq.com
13 | // ***
14 |
15 | #import
16 |
17 | #import "VerifyNumberView.h"
18 |
19 | typedef void(^ClickBlock)(NSString * inputText);
20 | typedef void(^ReloadBlock)();
21 |
22 | @interface JXTAlertView : UIView
23 |
24 | + (JXTAlertView *)sharedAlertView;
25 |
26 | - (void)showAlertViewWithConfirmAction:(ClickBlock)confirmBlock andReloadAction:(ReloadBlock)refreshBlcok;
27 |
28 | - (void)refreshVerifyImage:(UIImage *)verifyImage;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/JXTAlertView/JXTAlertView/JXTAlertViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // JXTAlertViewController.h
3 | // JXTAlertView
4 | //
5 | // Created by JXT on 16/3/7.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 | //
9 | // ***
10 | // * GitHub:https://github.com/kukumaluCN/JXT_iOS_Demos
11 | // * 博客:http://www.jianshu.com/users/c8f8558a4b1d/latest_articles
12 | // * 邮箱:1145049339@qq.com
13 | // ***
14 |
15 |
16 | #import
17 |
18 | #import "VerifyNumberView.h"
19 |
20 | typedef void(^ClickBlock)(NSString * inputText);
21 | typedef void(^CancelBlock)();
22 |
23 | @interface JXTAlertViewController : UIViewController
24 |
25 | - (instancetype)initWithConfirmAction:(ClickBlock)confirmBlock andCancelAction:(CancelBlock)cancelBlcok;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/JXTAlertView/JXTAlertView/JXTViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // JXTViewController.h
3 | // JXTAlertView
4 | //
5 | // Created by JXT on 16/3/5.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface JXTViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/JXTAlertView/JXTAlertView/MyNavigationController.h:
--------------------------------------------------------------------------------
1 | //
2 | // MyNavigationController.h
3 | // JXTAlertView
4 | //
5 | // Created by JXT on 16/3/7.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface MyNavigationController : UINavigationController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/JXTAlertView/JXTAlertView/MyNavigationController.m:
--------------------------------------------------------------------------------
1 | //
2 | // MyNavigationController.m
3 | // JXTAlertView
4 | //
5 | // Created by JXT on 16/3/7.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 |
9 | #import "MyNavigationController.h"
10 |
11 | @interface MyNavigationController ()
12 |
13 | @end
14 |
15 | @implementation MyNavigationController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view.
20 | }
21 |
22 | - (UIStatusBarStyle)preferredStatusBarStyle
23 | {
24 | UIViewController * topVC = self.topViewController;
25 | return [topVC preferredStatusBarStyle];
26 | }
27 |
28 | - (void)didReceiveMemoryWarning {
29 | [super didReceiveMemoryWarning];
30 | // Dispose of any resources that can be recreated.
31 | }
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/JXTAlertView/JXTAlertView/VerifyNumberView.h:
--------------------------------------------------------------------------------
1 | //
2 | // VerifyNumberView.h
3 | // JXTAlertView
4 | //
5 | // Created by JXT on 16/3/6.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface VerifyNumberView : UIView
12 |
13 | + (UIImage *)verifyNumberImage;
14 | + (UIImage *)iniVerifyNumberImage;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/JXTAlertView/JXTAlertView/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // JXTAlertView
4 | //
5 | // Created by JXT on 16/3/5.
6 | // Copyright © 2016年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/JXTKit/JXTKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/JXTKit/JXTKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/JXTKit/JXTKit/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // JXTKit
4 | //
5 | // Created by JXT on 2018/11/22.
6 | // Copyright © 2018 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/JXTKit/JXTKit/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/JXTKit/JXTKit/Foundation/NSString+JXTAdd.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+JXTAdd.h
3 | // JXTKit
4 | //
5 | // Created by JXT on 2018/11/22.
6 | // Copyright © 2018 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSString (JXTAdd)
12 |
13 | /**
14 | 遍历字符串中所有的重复子串
15 |
16 | @param searchString 子串,如果子串不属于被筛选串、length==0,直接return
17 | @param block 遍历执行,可以获得每一个子串的range和序号
18 | */
19 | - (void)jxt_enumerateRangeOfString:(NSString *)searchString usingBlock:(void (^)(NSRange searchStringRange, NSUInteger idx, BOOL *stop))block;
20 |
21 |
22 | /**
23 | 获取字符串中所有子串的rangeValue数组
24 |
25 | @param searchString 子串,如果子串不属于被筛选串,返回nil,length==0,返回为nil
26 | @return NSRange->NSValue数组
27 | */
28 | - (NSArray *)jxt_rangeValuesOfString:(NSString *)searchString;
29 |
30 |
31 | /**
32 | 将字符串按句子拆分为子串,具体规则见`NSStringEnumerationBySentences`
33 |
34 | @param block 执行block
35 | */
36 | - (void)jxt_enumerateStringBySentencesUsingBlock:(void (^)(NSString * substring, NSRange substringRange, BOOL *stop))block;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/JXTKit/JXTKit/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // JXTKit
4 | //
5 | // Created by JXT on 2018/11/22.
6 | // Copyright © 2018 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/JXTKit/JXTKit/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // JXTKit
4 | //
5 | // Created by JXT on 2018/11/22.
6 | // Copyright © 2018 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/JXTKit/JXTKitTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/JXTKit/JXTKitTests/JXTKitTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // JXTKitTests.m
3 | // JXTKitTests
4 | //
5 | // Created by JXT on 2018/11/22.
6 | // Copyright © 2018 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface JXTKitTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation JXTKitTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/JXTKit/JXTKitUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/JXTKit/JXTKitUITests/JXTKitUITests.m:
--------------------------------------------------------------------------------
1 | //
2 | // JXTKitUITests.m
3 | // JXTKitUITests
4 | //
5 | // Created by JXT on 2018/11/22.
6 | // Copyright © 2018 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface JXTKitUITests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation JXTKitUITests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 |
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 |
22 | // In UI tests it is usually best to stop immediately when a failure occurs.
23 | self.continueAfterFailure = NO;
24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
25 | [[[XCUIApplication alloc] init] launch];
26 |
27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
28 | }
29 |
30 | - (void)tearDown {
31 | // Put teardown code here. This method is called after the invocation of each test method in the class.
32 | [super tearDown];
33 | }
34 |
35 | - (void)testExample {
36 | // Use recording to get started writing UI tests.
37 | // Use XCTAssert and related functions to verify your tests produce the correct results.
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/JXTTwinkleStarView/JXTTwinkleStarView.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/JXTTwinkleStarView/JXTTwinkleStarView/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // JXTTwinkleStarView
4 | //
5 | // Created by JXT on 2017/6/13.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/JXTTwinkleStarView/JXTTwinkleStarView/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/JXTTwinkleStarView/JXTTwinkleStarView/JXTTwinkleStarView.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : JXTTwinkleStarView
3 | //文件名称 : JXTTwinkleStarView.h
4 | //创建时间 : 2017/6/13
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | /**
14 | 星星视图范围形状
15 |
16 | - JXTTwinkleStarViewShapeRound: 圆形
17 | - JXTTwinkleStarViewShapeSquare: 方形
18 | */
19 | typedef NS_ENUM(NSUInteger, JXTTwinkleStarViewShape) {
20 | JXTTwinkleStarViewShapeRound,
21 | JXTTwinkleStarViewShapeSquare
22 | };
23 |
24 |
25 | @interface JXTTwinkleStarView : UIView
26 |
27 | /**
28 | 创建星星闪烁视图
29 |
30 | @param frame frame
31 | @param number 数量(不建议太大,因为不复用,消耗内存的)
32 | @param shape 外观形状
33 | @param overflowRadius 圆形溢出半径(JXTTwinkleStarViewShapeSquare设置无效)
34 | @return 视图
35 | */
36 | + (instancetype)twinkleStarViewWithFrame:(CGRect)frame
37 | number:(NSUInteger)number
38 | shape:(JXTTwinkleStarViewShape)shape
39 | overflowRadius:(CGFloat)overflowRadius;
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/JXTTwinkleStarView/JXTTwinkleStarView/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // JXTTwinkleStarView
4 | //
5 | // Created by JXT on 2017/6/13.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/JXTTwinkleStarView/JXTTwinkleStarView/emitter_star@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/JXTTwinkleStarView/JXTTwinkleStarView/emitter_star@2x.png
--------------------------------------------------------------------------------
/JXTTwinkleStarView/JXTTwinkleStarView/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // JXTTwinkleStarView
4 | //
5 | // Created by JXT on 2017/6/13.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/JXTTwinkleStarView/JXTTwinkleStarView/star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/JXTTwinkleStarView/JXTTwinkleStarView/star.png
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // JXT_MVC_Demo
4 | //
5 | // Created by JXT on 2017/3/3.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/BaseClasses/Controllers/BaseNavigationViewController.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : JXT_MVCP_Demo
3 | //文件名称 : BaseNavigationViewController.h
4 | //创建时间 : 2017/3/3
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @interface BaseNavigationViewController : UINavigationController
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/BaseClasses/Controllers/BaseViewController.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : BaseViewController.h
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @interface BaseViewController : UIViewController
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/BaseClasses/Model/BaseModel.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : BaseModel.h
4 | //创建时间 : 2017/3/1
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | #import "UIResponder+JXTDataModelManager.h"
14 |
15 | @interface BaseModel : NSObject
16 |
17 | /**
18 | Model基类KVC构造
19 |
20 | @param dict 数据字典
21 | @return model
22 | */
23 | - (instancetype)initWithDict:(NSDictionary *)dict;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/BaseClasses/Model/BaseModel.m:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : BaseModel.m
4 | //创建时间 : 2017/3/1
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "BaseModel.h"
12 |
13 | @implementation BaseModel
14 |
15 | - (instancetype)initWithDict:(NSDictionary *)dict
16 | {
17 | if (self = [super init]) {
18 | [self setValuesForKeysWithDictionary:dict];
19 | }
20 | return self;
21 | }
22 |
23 | - (void)setValue:(id)value forUndefinedKey:(NSString *)key
24 | {
25 |
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/BaseClasses/Model/UIResponder+JXTDataModelManager.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : JXT_MVC_Demo
3 | //文件名称 : UIResponder+JXTDataModelManager.h
4 | //创建时间 : 2017/3/5
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 | #import
11 |
12 | @interface UIResponder (JXTDataModelManager)
13 |
14 | /**
15 | 前向型数据模型,用于正向数据通信,同步刷新UI(例如点击列表前,列表详情数据已经获取,只是加载显示)
16 | */
17 | @property (nonatomic, strong, nonnull) id jxt_forwardDataModel;
18 |
19 |
20 |
21 | /**
22 | 回调型数据模型,用于迟后加载,异步回调刷新UI(例如点击列表前,列表详情数据未获取,跳转至新页面后异步加载)
23 | 触发该属性set方法,回自动触发对应子类覆写的'jxt_reloadDataWithModelForView'方法
24 |
25 | @param callbackDataModel 设置数据源
26 | */
27 | - (void)jxt_setCallbackDataModel:(nonnull id)callbackDataModel;
28 |
29 | /**
30 | 基类抽象方法,子类必须覆盖,根据数据源更新UI显示
31 |
32 | @param callbackDataModel 回调数据源
33 | */
34 | - (void)jxt_refreshUIWithCallbackDataModel:(nonnull id)callbackDataModel;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/BaseClasses/Views/BaseTableArrayDataSource.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : BaseTableArrayDataSource.h
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @interface BaseTableArrayDataSource : NSObject
14 |
15 | /**
16 | TableViewDataSource代理共有类,构造单section、单样式cell的TableView
17 |
18 | @param cellClass cell具体实现类
19 | @return TableViewDataSource代理对象
20 | */
21 | - (instancetype)initWithCellClass:(Class)cellClass;
22 |
23 |
24 | /**
25 | TableView数据源模型数组
26 | */
27 | @property (nonatomic, strong) NSArray * cellsDataArray;
28 |
29 |
30 | /**
31 | 获取
32 |
33 | @param indexPath tableView对应的indexPath
34 | @return 对应cell的数据源模型
35 | */
36 | - (id)getCellDataModelAtIndexPath:(NSIndexPath *)indexPath;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/Interfaces/Detail/DetailViewController.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : DetailViewController.h
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "BaseViewController.h"
12 |
13 | @interface DetailViewController : BaseViewController
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/Interfaces/Detail/DetailViewController.m:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : DetailViewController.m
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "DetailViewController.h"
12 |
13 | #import "MainModel.h"
14 |
15 | @interface DetailViewController ()
16 |
17 | @end
18 |
19 | @implementation DetailViewController
20 |
21 | #pragma mark - Intial Methods
22 |
23 |
24 | #pragma mark - LifeCycle
25 |
26 | - (void)viewDidLoad
27 | {
28 | [super viewDidLoad];
29 |
30 | self.view.backgroundColor = [UIColor whiteColor];
31 |
32 | SubMainModel *subMainModel = self.jxt_forwardDataModel;
33 | self.navigationItem.title = subMainModel.title;
34 | }
35 |
36 | - (void)didReceiveMemoryWarning {
37 | [super didReceiveMemoryWarning];
38 | // Dispose of any resources that can be recreated.
39 | }
40 |
41 |
42 | #pragma mark - Other
43 |
44 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
45 | {
46 | [self dismissViewControllerAnimated:YES completion:^{
47 |
48 | }];
49 | }
50 |
51 | @end
52 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/Interfaces/Login/LoginViewController.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : JXT_MVC_Demo
3 | //文件名称 : LoginViewController.h
4 | //创建时间 : 2017/3/4
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "BaseViewController.h"
12 |
13 | @interface LoginViewController : BaseViewController
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/Interfaces/Main/MainModel.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainModel.h
4 | //创建时间 : 2017/3/1
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "BaseModel.h"
12 |
13 | @interface SubMainModel : BaseModel
14 |
15 | @property (nonatomic, strong) NSNumber * order;
16 | @property (nonatomic, copy) NSString * title;
17 |
18 | @end
19 |
20 |
21 | @interface MainModel : BaseModel
22 |
23 | @property (nonatomic, copy) NSString * headUrl;
24 | @property (nonatomic, copy) NSString * nameText;
25 | @property (nonatomic, strong) NSArray * listDatas; //SubMainModel数组
26 |
27 | + (MainModel *)modelWithDict:(NSDictionary *)dict;
28 |
29 | @end
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/Interfaces/Main/MainModel.m:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainModel.m
4 | //创建时间 : 2017/3/1
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "MainModel.h"
12 |
13 | @implementation SubMainModel
14 |
15 | + (SubMainModel *)subModelWithDict:(NSDictionary *)dict
16 | {
17 | return [[SubMainModel alloc] initWithDict:dict];
18 | }
19 |
20 | @end
21 |
22 |
23 |
24 | @implementation MainModel
25 |
26 | + (MainModel *)modelWithDict:(NSDictionary *)dict
27 | {
28 | return [[MainModel alloc] initWithDict:dict];
29 | }
30 |
31 | - (instancetype)initWithDict:(NSDictionary *)dict
32 | {
33 | if (self = [super initWithDict:dict])
34 | {
35 | if ([self.listDatas isKindOfClass:[NSArray class]])
36 | {
37 | NSMutableArray *arr = [NSMutableArray array];
38 | for (NSDictionary *subDict in self.listDatas)
39 | {
40 | SubMainModel *subModel = [SubMainModel subModelWithDict:subDict];
41 | [arr addObject:subModel];
42 | }
43 | self.listDatas = [NSArray arrayWithArray:arr];
44 | }
45 | }
46 | return self;
47 | }
48 |
49 | @end
50 |
51 |
52 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/Interfaces/Main/MainNetworkManager.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : JXT_MVCP_Demo
3 | //文件名称 : MainNetworkManager.h
4 | //创建时间 : 2017/3/3
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "BaseNetworkManager.h"
12 |
13 | @interface MainNetworkManager : BaseNetworkManager
14 |
15 | + (void)requestMainVCListDataCompletion:(_Nonnull MVCPBaseNetworkCompletion)completion;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/Interfaces/Main/MainTableFooterView.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainTableFooterView.h
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @interface MainTableFooterView : UIView
14 |
15 | /**
16 | 加载失败样式显示
17 |
18 | @param errorMag 失败提示信息
19 | @param handler 加载失败点击方法回调
20 | */
21 | - (void)loadFailureMessage:(NSString *)errorMag andReloadWithHandler:(void(^)())handler;
22 |
23 | /**
24 | 加载成功样式配置
25 | */
26 | - (void)loadSuccess;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/Interfaces/Main/MainTableHeaderView.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainTableHeaderView.h
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @interface MainTableHeaderView : UIView
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/Interfaces/Main/MainTableView.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainTableView.h
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @interface MainTableView : UITableView
14 | /**
15 | MainTableView初始化
16 |
17 | @param aDelegate delegate对象
18 | @return MainTableView对象
19 | */
20 | - (instancetype)initWithDelegate:(id)aDelegate;
21 | @end
22 |
23 |
24 |
25 | @interface MainTableView (ConfigDataForTableView)
26 | /**
27 | 获取对应indexPath的cell的数据源模型
28 |
29 | @param indexPath indexPath
30 | @return cell的数据源模型
31 | */
32 | - (id)cellDataModelAtIndexPath:(NSIndexPath *)indexPath;
33 | @end
34 |
35 |
36 |
37 | @interface MainTableView (TableFooterViewMethods)
38 |
39 | /**
40 | 加载失败列表样式显示
41 |
42 | @param errorMag 失败提示信息
43 | @param handler 加载失败点击方法回调
44 | */
45 | - (void)loadFailureMessage:(NSString *)errorMag andReloadWithHandler:(void(^)())handler;
46 | @end
47 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/Interfaces/Main/MainTableViewCell.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainTableViewCell.h
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @interface MainTableViewCell : UITableViewCell
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/Interfaces/Main/MainTableViewCell.m:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainTableViewCell.m
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "MainTableViewCell.h"
12 |
13 | #import "MainModel.h"
14 |
15 | @implementation MainTableViewCell
16 |
17 | #pragma mark - Intial Methods
18 |
19 |
20 | #pragma mark - UI and Layout
21 |
22 |
23 | #pragma mark - Other
24 | - (void)dealloc
25 | {
26 | NSLog(@"释放 - %@", [self class]);
27 | }
28 |
29 |
30 | #pragma mark - DataSource
31 | - (void)jxt_refreshUIWithCallbackDataModel:(id)callbackDataModel
32 | {
33 | SubMainModel *subModel = callbackDataModel;
34 | self.textLabel.text = subModel.order.stringValue;
35 | self.detailTextLabel.text = subModel.title;
36 |
37 | [self setNeedsLayout];
38 | [self layoutIfNeeded];
39 | }
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/Interfaces/Main/MainViewController.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainViewController.h
4 | //创建时间 : 2017/3/1
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "BaseViewController.h"
12 |
13 | @interface MainViewController : BaseViewController
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/ThirdLibrary/Network/BaseNetworkManager.m:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : JXT_MVCP_Demo
3 | //文件名称 : BaseNetworkManager.m
4 | //创建时间 : 2017/3/3
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "BaseNetworkManager.h"
12 |
13 | @implementation BaseNetworkManager
14 |
15 | //模拟封装网络请求基本方法
16 | + (void)requestWithUrl:(NSString *)aUrl andCompletion:(MVCPBaseNetworkCompletion)completion
17 | {
18 | NSString *requestUrl = aUrl;
19 | NSLog(@"模块-%@-网络请求Url%@", [self class], requestUrl);
20 | //模拟请求过程
21 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
22 | if (completion) {
23 | completion(nil, nil);
24 | }
25 | });
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/JXT_MVC_Demo/JXT_MVC_Demo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // JXT_MVC_Demo
4 | //
5 | // Created by JXT on 2017/3/3.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/KVCTest/KVCTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/KVCTest/KVCTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // KVCTest
4 | //
5 | // Created by JXT on 2017/1/6.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/KVCTest/KVCTest/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/KVCTest/KVCTest/KVCContainer.h:
--------------------------------------------------------------------------------
1 | //
2 | // KVCContainer.h
3 | // KVCTest
4 | //
5 | // Created by JXT on 2017/1/13.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface KVCContainer : NSObject
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/KVCTest/KVCTest/KVCContainer.m:
--------------------------------------------------------------------------------
1 | //
2 | // KVCContainer.m
3 | // KVCTest
4 | //
5 | // Created by JXT on 2017/1/13.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "KVCContainer.h"
10 |
11 | @interface KVCContainer ()
12 | // 用来放置属性键值对的字典
13 | @property (nonatomic, strong) NSMutableDictionary * mPropertiesDict;
14 | @end
15 |
16 | @implementation KVCContainer
17 | // 没有对应key的setter方法且没有找到对应key的属性时调用
18 | - (void)setValue:(id)value forUndefinedKey:(NSString *)key
19 | {
20 | if (!key || !(key.length > 0)) {
21 | return ;
22 | }
23 | if (!_mPropertiesDict) {
24 | _mPropertiesDict = [NSMutableDictionary dictionary];
25 | }
26 | [_mPropertiesDict setValue:value forKey:key];
27 | }
28 |
29 | // 没有对应key的getter方法且没有找到对应key的属性时调用
30 | - (id)valueForUndefinedKey:(NSString *)key
31 | {
32 | if (!key || !(key.length > 0)) {
33 | return nil;
34 | }
35 | return [_mPropertiesDict valueForKey:key];
36 | }
37 | @end
38 |
--------------------------------------------------------------------------------
/KVCTest/KVCTest/KVCObj.h:
--------------------------------------------------------------------------------
1 | //
2 | // KVCObj.h
3 | // KVCTest
4 | //
5 | // Created by JXT on 2017/1/6.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class KVCSubObj;
12 |
13 | @interface KVCObj : NSObject
14 | {
15 | NSString *ivar;
16 |
17 | @private
18 | NSString *priIvar1;
19 | }
20 |
21 | @property (nonatomic, assign) float floatNumber;
22 |
23 | @property (nonatomic, strong) KVCSubObj * subObj;
24 |
25 |
26 | @property (nonatomic, copy) NSString * string1;
27 | @property (nonatomic, copy) NSString * string2;
28 | @property (nonatomic, copy) NSString * string3;
29 | @property (nonatomic, copy) NSString * string4;
30 | @property (nonatomic, copy) NSString * string5;
31 |
32 |
33 | @property (nonatomic, strong) NSArray * subObjs;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/KVCTest/KVCTest/KVCObj.m:
--------------------------------------------------------------------------------
1 | //
2 | // KVCObj.m
3 | // KVCTest
4 | //
5 | // Created by JXT on 2017/1/6.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "KVCObj.h"
10 |
11 | #import "KVCSubObj.h"
12 |
13 | @interface KVCObj ()
14 | @property (nonatomic, copy) NSString * priIvar2;
15 | @end
16 |
17 | @implementation KVCObj
18 |
19 | - (void)setValue:(id)value forUndefinedKey:(NSString *)key
20 | {
21 |
22 | }
23 |
24 |
25 | - (NSArray *)subObjs
26 | {
27 | if (!_subObjs) {
28 | KVCSubObj *subObj1 = [[KVCSubObj alloc] init];
29 | KVCSubObj *subObj2 = [[KVCSubObj alloc] init];
30 | _subObjs = @[subObj1, subObj2];
31 | }
32 | return _subObjs;
33 | }
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/KVCTest/KVCTest/KVCSubObj.h:
--------------------------------------------------------------------------------
1 | //
2 | // KVCSubObj.h
3 | // KVCTest
4 | //
5 | // Created by JXT on 2017/1/6.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface KVCSubObj : NSObject
12 | @property (nonatomic, copy) NSString * subIvar;
13 | @end
14 |
--------------------------------------------------------------------------------
/KVCTest/KVCTest/KVCSubObj.m:
--------------------------------------------------------------------------------
1 | //
2 | // KVCSubObj.m
3 | // KVCTest
4 | //
5 | // Created by JXT on 2017/1/6.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "KVCSubObj.h"
10 |
11 | @implementation KVCSubObj
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/KVCTest/KVCTest/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // KVCTest
4 | //
5 | // Created by JXT on 2017/1/6.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/KVCTest/KVCTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // KVCTest
4 | //
5 | // Created by JXT on 2017/1/6.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/KVOForInstanceVarTest/KVOForInstanceVarTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/KVOForInstanceVarTest/KVOForInstanceVarTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // KVOForInstanceVarTest
4 | //
5 | // Created by JXT on 2017/5/17.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/KVOForInstanceVarTest/KVOForInstanceVarTest/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/KVOForInstanceVarTest/KVOForInstanceVarTest/TestModel.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : KVOForInstanceVarTest
3 | //文件名称 : TestModel.h
4 | //创建时间 : 2017/5/17
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @interface TestModel : NSObject
14 | {
15 | NSString *_testVar;
16 | }
17 | @property (nonatomic, strong) NSString * testProperty;
18 |
19 |
20 | - (void)setTestVar:(NSString *)testVar;
21 |
22 | - (NSString *)testVar;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/KVOForInstanceVarTest/KVOForInstanceVarTest/TestModel.m:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : KVOForInstanceVarTest
3 | //文件名称 : TestModel.m
4 | //创建时间 : 2017/5/17
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "TestModel.h"
12 |
13 | @implementation TestModel
14 |
15 | // 手动设定KVO
16 | - (void)setTestVar:(NSString *)testVar
17 | {
18 | [self willChangeValueForKey:@"testVar"];
19 | _testVar = testVar;
20 | [self didChangeValueForKey:@"testVar"];
21 | }
22 |
23 | - (NSString *)testVar
24 | {
25 | return _testVar;
26 | }
27 |
28 | //不加这个,监听到连续两次
29 | + (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key
30 | {
31 | // 如果监测到键值为testVar,则指定为非自动监听对象
32 | if ([key isEqualToString:@"testVar"])
33 | {
34 | return NO;
35 | }
36 | return [super automaticallyNotifiesObserversForKey:key];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/KVOForInstanceVarTest/KVOForInstanceVarTest/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // KVOForInstanceVarTest
4 | //
5 | // Created by JXT on 2017/5/17.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/KVOForInstanceVarTest/KVOForInstanceVarTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // KVOForInstanceVarTest
4 | //
5 | // Created by JXT on 2017/5/17.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 JXT
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // MVCDemo
4 | //
5 | // Created by JXT on 2017/3/1.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/BaseModel.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : BaseModel.h
4 | //创建时间 : 2017/3/1
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @interface BaseModel : NSObject
14 |
15 | /**
16 | Model基类KVC构造
17 |
18 | @param dict 数据字典
19 | @return model
20 | */
21 | - (instancetype)initWithDict:(NSDictionary *)dict;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/BaseModel.m:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : BaseModel.m
4 | //创建时间 : 2017/3/1
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "BaseModel.h"
12 |
13 | @implementation BaseModel
14 |
15 | - (instancetype)initWithDict:(NSDictionary *)dict
16 | {
17 | if (self = [super init]) {
18 | [self setValuesForKeysWithDictionary:dict];
19 | }
20 | return self;
21 | }
22 |
23 | - (void)setValue:(id)value forUndefinedKey:(NSString *)key
24 | {
25 |
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/BaseTableArrayDataSource.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : BaseTableArrayDataSource.h
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @interface BaseTableArrayDataSource : NSObject
14 |
15 | /**
16 | TableViewDataSource代理共有类,构造单section、单样式cell的TableView
17 |
18 | @param cellClass cell具体实现类
19 | @return TableViewDataSource代理对象
20 | */
21 | - (instancetype)initWithCellClass:(Class)cellClass;
22 |
23 | /**
24 | 配置TableView数据源模型数组
25 |
26 | @param dataArray 数据源模型数组
27 | */
28 | - (void)setCellDataArray:(NSArray *)dataArray;
29 |
30 | /**
31 | 获取
32 |
33 | @param indexPath tableView对应的indexPath
34 | @return 对应cell的数据源模型
35 | */
36 | - (id)getCellDataModelAtIndexPath:(NSIndexPath *)indexPath;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/BaseTableViewCell.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : BaseTableViewCell.h
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @interface BaseTableViewCell : UITableViewCell
14 |
15 | @end
16 |
17 |
18 |
19 | @interface BaseTableViewCell (ConfigDataModelForCell)
20 | /**
21 | 配置cell数据,刷新UI,基类方法,子类实现最后回调,刷新UI
22 |
23 | @param dataModel 数据模型
24 | */
25 | - (void)configTableViewCellWithModel:(id)dataModel;
26 | @end
27 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/BaseTableViewCell.m:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : BaseTableViewCell.m
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "BaseTableViewCell.h"
12 |
13 | @implementation BaseTableViewCell
14 |
15 | #pragma mark - Intial Methods
16 |
17 | #pragma mark - UI and Layout
18 |
19 | @end
20 |
21 |
22 |
23 | @implementation BaseTableViewCell (ConfigDataModelForCell)
24 |
25 | #pragma mark - Public Methods
26 | - (void)configTableViewCellWithModel:(id)dataModel
27 | {
28 | [self layoutIfNeeded];
29 | [self setNeedsLayout];
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/BaseViewController.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : BaseViewController.h
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @interface BaseViewController : UIViewController
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/DetailViewController.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : DetailViewController.h
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "BaseViewController.h"
12 |
13 | @class SubMainModel;
14 | @interface DetailViewController : BaseViewController
15 |
16 | @property (nonatomic, strong) SubMainModel * subMainModel;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/DetailViewController.m:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : DetailViewController.m
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "DetailViewController.h"
12 |
13 | #import "MainModel.h"
14 |
15 | @interface DetailViewController ()
16 |
17 | @end
18 |
19 | @implementation DetailViewController
20 |
21 | #pragma mark - Intial Methods
22 |
23 |
24 | #pragma mark - LifeCycle
25 |
26 | - (void)viewDidLoad
27 | {
28 | [super viewDidLoad];
29 |
30 | self.navigationItem.title = self.subMainModel.title;
31 | self.view.backgroundColor = [UIColor whiteColor];
32 | }
33 |
34 | - (void)didReceiveMemoryWarning {
35 | [super didReceiveMemoryWarning];
36 | // Dispose of any resources that can be recreated.
37 | }
38 |
39 |
40 | #pragma mark - Other
41 |
42 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
43 | {
44 | [self dismissViewControllerAnimated:YES completion:^{
45 |
46 | }];
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/MainModel.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainModel.h
4 | //创建时间 : 2017/3/1
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "BaseModel.h"
12 |
13 | @interface MainModel : BaseModel
14 |
15 | @property (nonatomic, copy) NSString * headUrl;
16 | @property (nonatomic, copy) NSString * nameText;
17 | @property (nonatomic, strong) NSArray * listDatas; //SubMainModel数组
18 |
19 | + (MainModel *)modelWithDict:(NSDictionary *)dict;
20 |
21 | @end
22 |
23 |
24 | @interface SubMainModel : BaseModel
25 |
26 | @property (nonatomic, strong) NSNumber * order;
27 | @property (nonatomic, copy) NSString * title;
28 |
29 | + (SubMainModel *)subModelWithDict:(NSDictionary *)dict;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/MainModel.m:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainModel.m
4 | //创建时间 : 2017/3/1
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "MainModel.h"
12 |
13 | @implementation MainModel
14 |
15 | + (MainModel *)modelWithDict:(NSDictionary *)dict
16 | {
17 | return [[MainModel alloc] initWithDict:dict];
18 | }
19 |
20 | - (instancetype)initWithDict:(NSDictionary *)dict
21 | {
22 | if (self = [super initWithDict:dict])
23 | {
24 | if ([self.listDatas isKindOfClass:[NSArray class]])
25 | {
26 | NSMutableArray *arr = [NSMutableArray array];
27 | for (NSDictionary *subDict in self.listDatas)
28 | {
29 | SubMainModel *subModel = [SubMainModel subModelWithDict:subDict];
30 | [arr addObject:subModel];
31 | }
32 | self.listDatas = [NSArray arrayWithArray:arr];
33 | }
34 | }
35 | return self;
36 | }
37 |
38 | @end
39 |
40 |
41 |
42 | @implementation SubMainModel
43 |
44 | + (SubMainModel *)subModelWithDict:(NSDictionary *)dict
45 | {
46 | return [[SubMainModel alloc] initWithDict:dict];
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/MainTableFooterView.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainTableFooterView.h
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @interface MainTableFooterView : UIView
14 |
15 | /**
16 | 加载失败样式显示
17 |
18 | @param errorMag 失败提示信息
19 | @param handler 加载失败点击方法回调
20 | */
21 | - (void)loadFailureMessage:(NSString *)errorMag andReloadWithHandler:(void(^)())handler;
22 |
23 | /**
24 | 加载成功样式配置
25 | */
26 | - (void)loadSuccess;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/MainTableHeaderView.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainTableHeaderView.h
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @class MainModel;
14 | @interface MainTableHeaderView : UIView
15 |
16 | /**
17 | 配置headerView数据源模型
18 |
19 | @param mainModel 数据源模型
20 | */
21 | - (void)configTableHeaderViewWith:(MainModel *)mainModel;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/MainTableView.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainTableView.h
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | @interface MainTableView : UITableView
14 |
15 | @end
16 |
17 |
18 |
19 | @class MainModel;
20 | @interface MainTableView (ConfigDataForTableView)
21 | /**
22 | 重载tableView数据源,刷新列表,代替父类的'reloadData'方法
23 |
24 | @param mainModel 数据源模型
25 | */
26 | - (void)reloadDataWithDataModel:(MainModel *)mainModel;
27 |
28 | /**
29 | 获取对应indexPath的cell的数据源模型
30 |
31 | @param indexPath indexPath
32 | @return cell的数据源模型
33 | */
34 | - (id)cellDataModelAtIndexPath:(NSIndexPath *)indexPath;
35 | @end
36 |
37 |
38 |
39 | @interface MainTableView (TableFooterViewMethods)
40 | /**
41 | 加载失败列表样式显示
42 |
43 | @param errorMag 失败提示信息
44 | @param handler 加载失败点击方法回调
45 | */
46 | - (void)loadFailureMessage:(NSString *)errorMag andReloadWithHandler:(void(^)())handler;
47 | @end
48 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/MainTableViewCell.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainTableViewCell.h
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "BaseTableViewCell.h"
12 |
13 | @interface MainTableViewCell : BaseTableViewCell
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/MainTableViewCell.m:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainTableViewCell.m
4 | //创建时间 : 2017/3/2
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "MainTableViewCell.h"
12 |
13 | #import "MainModel.h"
14 |
15 | @implementation MainTableViewCell
16 |
17 | #pragma mark - Intial Methods
18 |
19 |
20 | #pragma mark - UI and Layout
21 |
22 |
23 | #pragma mark - DataSource
24 | - (void)configTableViewCellWithModel:(id)dataModel
25 | {
26 | if ([dataModel isKindOfClass:[SubMainModel class]])
27 | {
28 | SubMainModel *subModel = (SubMainModel *)dataModel;
29 | self.textLabel.text = subModel.order.stringValue;
30 | self.detailTextLabel.text = subModel.title;
31 | }
32 |
33 | //后刷新
34 | [super configTableViewCellWithModel:dataModel];
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/MainViewController.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : MainViewController.h
4 | //创建时间 : 2017/3/1
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import "BaseViewController.h"
12 |
13 | @interface MainViewController : BaseViewController
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/NetworkManager.h:
--------------------------------------------------------------------------------
1 | /***************************************************************
2 | //工程名称 : MVCDemo
3 | //文件名称 : NetworkManager.h
4 | //创建时间 : 2017/3/1
5 | //创建作者 : JXT
6 | //版权归属 : 霖溦
7 | //文件描述 :
8 | ***************************************************************/
9 |
10 |
11 | #import
12 |
13 | typedef void(^NetworkCompletion)(NSDictionary *aDict, NSError *aError);
14 |
15 | @interface NetworkManager : NSObject
16 |
17 | + (void)requestWithUrl:(NSString *)aUrl andCompletion:(NetworkCompletion)completion;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/MVCDemo/MVCDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MVCDemo
4 | //
5 | // Created by JXT on 2017/3/1.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/NSErrorTest/NSErrorTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/NSErrorTest/NSErrorTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // NSErrorTest
4 | //
5 | // Created by JXT on 2017/1/9.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/NSErrorTest/NSErrorTest/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/NSErrorTest/NSErrorTest/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // NSErrorTest
4 | //
5 | // Created by JXT on 2017/1/9.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/NSErrorTest/NSErrorTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // NSErrorTest
4 | //
5 | // Created by JXT on 2017/1/9.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/PassthroughView/PassthroughView/PassthroughView.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PassthroughView/PassthroughView/PassthroughView/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // PassthroughView
4 | //
5 | // Created by JXT on 2017/3/10.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/PassthroughView/PassthroughView/PassthroughView/PassthroughView.h:
--------------------------------------------------------------------------------
1 | //
2 | // PassthroughView.h
3 | // PassthroughView
4 | //
5 | // Created by JXT on 2017/3/10.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface PassthroughView : UIButton
12 | @property (nonatomic, copy) NSArray *passthroughViews;
13 | @end
14 |
--------------------------------------------------------------------------------
/PassthroughView/PassthroughView/PassthroughView/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // PassthroughView
4 | //
5 | // Created by JXT on 2017/3/10.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/PassthroughView/PassthroughView/PassthroughView/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // PassthroughView
4 | //
5 | // Created by JXT on 2017/3/10.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/Popover/UIBarButtonItem+WEPopover.h:
--------------------------------------------------------------------------------
1 | /*
2 | * UIBarButtonItem+WEPopover.h
3 | * WEPopover
4 | *
5 | * Created by Werner Altewischer on 07/05/11.
6 | * Copyright 2010 Werner IT Consultancy. All rights reserved.
7 | *
8 | */
9 |
10 | #import
11 | #import
12 |
13 | @interface UIBarButtonItem(WEPopover)
14 |
15 | - (CGRect)weFrameInView:(UIView *)v;
16 | - (UIView *)weSuperview;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/Popover/UIBarButtonItem+WEPopover.m:
--------------------------------------------------------------------------------
1 | /*
2 | * UIBarButtonItem+WEPopover.m
3 | * WEPopover
4 | *
5 | * Created by Werner Altewischer on 07/05/11.
6 | * Copyright 2010 Werner IT Consultancy. All rights reserved.
7 | *
8 | */
9 |
10 | #import "UIBarButtonItem+WEPopover.h"
11 |
12 | @implementation UIBarButtonItem(WEPopover)
13 |
14 | - (CGRect)weFrameInView:(UIView *)v {
15 |
16 | UIView *theView = self.customView;
17 | if (!theView.superview && [self respondsToSelector:@selector(view)]) {
18 | theView = [self performSelector:@selector(view)];
19 | }
20 |
21 | UIView *parentView = theView.superview;
22 | NSArray *subviews = parentView.subviews;
23 |
24 | NSUInteger indexOfView = [subviews indexOfObject:theView];
25 | NSUInteger subviewCount = subviews.count;
26 |
27 | if (subviewCount > 0 && indexOfView != NSNotFound) {
28 | UIView *button = [parentView.subviews objectAtIndex:indexOfView];
29 | return [button convertRect:button.bounds toView:v];
30 | } else {
31 | return CGRectZero;
32 | }
33 | }
34 |
35 | - (UIView *)weSuperview {
36 |
37 | UIView *theView = self.customView;
38 | if (!theView && [self respondsToSelector:@selector(view)]) {
39 | theView = [self performSelector:@selector(view)];
40 | }
41 |
42 | UIView *parentView = theView.superview;
43 | return parentView;
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/Popover/UIView+WEPopover.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Werner Altewischer on 07/09/16.
3 | // Copyright (c) 2016 Werner IT Consultancy. All rights reserved.
4 | //
5 |
6 | #import
7 |
8 | @interface UIView (WEPopover)
9 |
10 | extern NSString * const WEViewDidLayoutSubviewsNotification;
11 |
12 | @end
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/Popover/UIView+WEPopover.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Werner Altewischer on 07/09/16.
3 | // Copyright (c) 2016 Werner IT Consultancy. All rights reserved.
4 | //
5 |
6 | #import "UIView+WEPopover.h"
7 | #import
8 |
9 | @implementation UIView (WEPopover)
10 |
11 | static IMP originalLayoutSubviewsImp = NULL;
12 | NSString * const WEViewDidLayoutSubviewsNotification = @"WEViewDidLayoutSubviewsNotification";
13 |
14 | static void __UIViewLayoutSubviews(id self, SEL _cmd) {
15 | ((void(*)(id,SEL))originalLayoutSubviewsImp)(self, _cmd);
16 | [[NSNotificationCenter defaultCenter] postNotificationName:WEViewDidLayoutSubviewsNotification object:self];
17 | }
18 |
19 | + (void)load {
20 | [self swizzleLayoutSubviewsMethod];
21 | }
22 |
23 | + (void)swizzleLayoutSubviewsMethod {
24 | static dispatch_once_t onceToken;
25 | dispatch_once(&onceToken, ^{
26 | IMP swizzleImp = (IMP)__UIViewLayoutSubviews;
27 | Method method = class_getInstanceMethod([UIView class],
28 | @selector(layoutSubviews));
29 | originalLayoutSubviewsImp = method_setImplementation(method, swizzleImp);
30 | });
31 | }
32 |
33 | @end
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/Popover/WEBlockingGestureRecognizer.h:
--------------------------------------------------------------------------------
1 | //
2 | // WETouchDownGestureRecognizer.h
3 | // WEPopover
4 | //
5 | // Created by Werner Altewischer on 18/09/14.
6 | // Copyright (c) 2014 Werner IT Consultancy. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface WEBlockingGestureRecognizer : UIGestureRecognizer
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/Popover/WEPopoverContainerViewProperties.m:
--------------------------------------------------------------------------------
1 | //
2 | // WEPopoverContainerViewProperties.m
3 | // WEPopover
4 | //
5 | // Created by Werner Altewischer on 19/11/15.
6 | // Copyright © 2015 Werner IT Consultancy. All rights reserved.
7 | //
8 |
9 | #import "WEPopoverContainerViewProperties.h"
10 |
11 | @implementation WEPopoverContainerViewProperties {
12 |
13 | }
14 |
15 | #define IMAGE_FOR_NAME(arrowImage, arrowImageName) ((arrowImage != nil) ? (arrowImage) : (arrowImageName == nil ? nil : [UIImage imageNamed:arrowImageName]))
16 |
17 | - (id)init {
18 | if ((self = [super init])) {
19 | self.shadowOffset = CGSizeZero;
20 | self.shadowOpacity = 0.5;
21 | self.shadowRadius = 3.0;
22 | }
23 | return self;
24 | }
25 |
26 | - (UIImage *)upArrowImage {
27 | return IMAGE_FOR_NAME(_upArrowImage, _upArrowImageName);
28 | }
29 |
30 | - (UIImage *)downArrowImage {
31 | return IMAGE_FOR_NAME(_downArrowImage, _downArrowImageName);
32 | }
33 |
34 | - (UIImage *)leftArrowImage {
35 | return IMAGE_FOR_NAME(_leftArrowImage, _leftArrowImageName);
36 | }
37 |
38 | - (UIImage *)rightArrowImage {
39 | return IMAGE_FOR_NAME(_rightArrowImage, _rightArrowImageName);
40 | }
41 |
42 | - (UIImage *)bgImage {
43 | return IMAGE_FOR_NAME(_bgImage, _bgImageName);
44 | }
45 |
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/Popover/WEPopoverParentView.h:
--------------------------------------------------------------------------------
1 | /*
2 | * WEPopoverParentView.h
3 | * WEPopover
4 | *
5 | * Created by Werner Altewischer on 02/09/10.
6 | * Copyright 2010 Werner IT Consultancy. All rights reserved.
7 | *
8 | */
9 |
10 | #import
11 | #import
12 |
13 | @protocol WEPopoverParentView
14 |
15 | @optional
16 | - (CGRect)displayAreaForPopover;
17 |
18 | @end
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/Popover/WETouchableView.h:
--------------------------------------------------------------------------------
1 | //
2 | // WETouchableView.h
3 | // WEPopover
4 | //
5 | // Created by Werner Altewischer on 12/21/10.
6 | // Copyright 2010 Werner IT Consultancy. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @class WETouchableView;
13 |
14 | /**
15 | * delegate to receive touch events
16 | */
17 | @protocol WETouchableViewDelegate
18 |
19 | @optional
20 | - (void)viewWasTouched:(WETouchableView *)view;
21 | - (CGRect)fillRectForView:(WETouchableView *)view;
22 |
23 | @end
24 |
25 | /**
26 | * View that can handle touch events and/or disable touch forwording to child views
27 | */
28 | @interface WETouchableView : UIView
29 |
30 | @property (nonatomic, assign) BOOL touchForwardingDisabled;
31 | @property (nonatomic, weak) id delegate;
32 | @property (nonatomic, copy) NSArray *passthroughViews;
33 | @property (nonatomic, strong) UIView *fillView;
34 | @property (nonatomic, assign) BOOL gestureBlockingEnabled;
35 |
36 | - (void)setFillColor:(UIColor *)fillColor;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/Popover/WEWeakReference.h:
--------------------------------------------------------------------------------
1 | //
2 | // WEWeakReference.h
3 | // WEPopover
4 | //
5 | // Created by Werner Altewischer on 25/02/16.
6 | // Copyright © 2016 Werner IT Consultancy. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface WEWeakReference : NSObject
12 |
13 | @property (nonatomic, weak) id object;
14 |
15 | + (instancetype)weakReferenceWithObject:(id)object;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/Popover/WEWeakReference.m:
--------------------------------------------------------------------------------
1 | //
2 | // WEWeakReference.m
3 | // WEPopover
4 | //
5 | // Created by Werner Altewischer on 25/02/16.
6 | // Copyright © 2016 Werner IT Consultancy. All rights reserved.
7 | //
8 |
9 | #import "WEWeakReference.h"
10 |
11 | @implementation WEWeakReference
12 |
13 | + (instancetype)weakReferenceWithObject:(id)object {
14 | WEWeakReference *ref = [self new];
15 | ref.object = object;
16 | return ref;
17 | }
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/WEColorUtils.h:
--------------------------------------------------------------------------------
1 | //
2 | // WEColorUtils.h
3 | // WEPopover
4 | //
5 | // Created by Werner Altewischer on 19/02/16.
6 | // Copyright © 2016 Werner IT Consultancy. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface WEColorUtils : NSObject
12 |
13 |
14 | UIColor *UIColorMakeRGB8(CGFloat red, CGFloat green, CGFloat blue);
15 | UIColor *UIColorMakeRGB8Alpha(CGFloat red, CGFloat green, CGFloat blue, CGFloat alpha);
16 | UIColor *UIColorMakeHex(NSInteger hex);
17 | UIColor *UIColorMakeHex32(NSInteger hex);
18 | UIColor *UIColorMakeHexAlpha(NSInteger hex, CGFloat alpha);
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/WEColorUtils.m:
--------------------------------------------------------------------------------
1 | //
2 | // WEColorUtils.m
3 | // WEPopover
4 | //
5 | // Created by Werner Altewischer on 19/02/16.
6 | // Copyright © 2016 Werner IT Consultancy. All rights reserved.
7 | //
8 |
9 | #import "WEColorUtils.h"
10 |
11 | @implementation WEColorUtils
12 |
13 | UIColor *UIColorMakeRGB8(CGFloat red, CGFloat green, CGFloat blue)
14 | {
15 | return UIColorMakeRGB8Alpha(red, green, blue, 1.0);
16 | }
17 |
18 | UIColor *UIColorMakeRGB8Alpha(CGFloat red, CGFloat green, CGFloat blue, CGFloat alpha)
19 | {
20 | return [UIColor colorWithRed:red / 255. green:green / 255. blue:blue / 255. alpha:alpha];
21 | }
22 |
23 | UIColor *UIColorMakeHex(NSInteger hex)
24 | {
25 | return UIColorMakeHexAlpha(hex, 1.0);
26 | }
27 |
28 | UIColor *UIColorMakeHex32(NSInteger hex)
29 | {
30 | CGFloat red = (CGFloat)((hex & 0xFF000000) >> 24);
31 | CGFloat green = (CGFloat)((hex & 0xFF0000) >> 16);
32 | CGFloat blue = (CGFloat)((hex & 0xFF00) >> 8);
33 | CGFloat alpha = (CGFloat)(hex & 0xFF);
34 |
35 | return UIColorMakeRGB8Alpha(red, green, blue, alpha);
36 | }
37 |
38 | UIColor *UIColorMakeHexAlpha(NSInteger hex, CGFloat alpha)
39 | {
40 | CGFloat red = (CGFloat)((hex & 0xFF0000) >> 16);
41 | CGFloat green = (CGFloat)((hex & 0xFF00) >> 8);
42 | CGFloat blue = (CGFloat)(hex & 0xFF);
43 |
44 | return UIColorMakeRGB8Alpha(red, green, blue, alpha);
45 | }
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/WECustomPopoverController.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Werner Altewischer on 19/02/16.
3 | // Copyright (c) 2016 Werner IT Consultancy. All rights reserved.
4 | //
5 |
6 | #import
7 | #import "WEPopoverController.h"
8 |
9 | @interface WECustomPopoverController : WEPopoverController
10 | @end
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/WEPopoverAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // WEPopoverAppDelegate.h
3 | // WEPopover
4 | //
5 | // Created by Werner Altewischer on 06/11/10.
6 | // Copyright 2010 Werner IT Consultancy. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class WEPopoverViewController;
12 |
13 | @interface WEPopoverAppDelegate : NSObject {
14 | UIWindow *window;
15 | UINavigationController *navController;
16 | }
17 |
18 | @property (nonatomic, strong) IBOutlet UIWindow *window;
19 | @property (nonatomic, strong) IBOutlet UINavigationController *navController;
20 |
21 | @end
22 |
23 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/WEPopoverContentViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // WEPopoverContentViewController.h
3 | // WEPopover
4 | //
5 | // Created by Werner Altewischer on 06/11/10.
6 | // Copyright 2010 Werner IT Consultancy. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 |
12 | @interface WEPopoverContentViewController : UITableViewController {
13 |
14 | }
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/WEPopoverTableViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // WEPopoverTableViewController.h
3 | // WEPopover
4 | //
5 | // Created by Werner Altewischer on 1/4/11.
6 | // Copyright 2011 Werner IT Consultancy. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "WEPopoverController.h"
11 |
12 | @interface WEPopoverTableViewController : UITableViewController {
13 | WEPopoverController *popoverController;
14 | NSInteger currentPopoverCellIndex;
15 | Class popoverClass;
16 | }
17 |
18 | @property (nonatomic, strong) WEPopoverController *popoverController;
19 |
20 | - (IBAction)showPopover:(id)sender;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Classes/WEPopoverViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // WEPopoverViewController.h
3 | // WEPopover
4 | //
5 | // Created by Werner Altewischer on 06/11/10.
6 | // Copyright 2010 Werner IT Consultancy. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class WEPopoverController;
12 |
13 | @interface WEPopoverViewController : UIViewController {
14 | WEPopoverController *popoverController;
15 | }
16 |
17 | @property (nonatomic, strong) WEPopoverController *popoverController;
18 |
19 | @property (nonatomic, strong) IBOutlet UIButton *button;
20 |
21 | - (IBAction)onButtonClick:(UIButton *)button;
22 |
23 | @end
24 |
25 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2010 Werner IT Consultancy
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/Custom/CustomPopover.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/Custom/CustomPopover.xcassets/arrow-flyout.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "arrow-flyout.pdf"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | }
12 | }
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/Custom/CustomPopover.xcassets/arrow-flyout.imageset/arrow-flyout.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/Custom/CustomPopover.xcassets/arrow-flyout.imageset/arrow-flyout.pdf
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowDown-white@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowDown-white@2x.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowDown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowDown.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowDown@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowDown@2x.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowDownSimple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowDownSimple.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowLeft-white@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowLeft-white@2x.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowLeft.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowLeft.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowLeft@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowLeft@2x.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowLeftSimple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowLeftSimple.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowRight-white@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowRight-white@2x.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowRight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowRight.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowRight@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowRight@2x.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowRightSimple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowRightSimple.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowUp-white@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowUp-white@2x.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowUp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowUp.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowUp@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowUp@2x.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowUpSimple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverArrowUpSimple.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverBg-white@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverBg-white@2x.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverBg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverBg.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverBg@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverBg@2x.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverBgSimple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/PassthroughView/WEPopover-master(带穿透视图)/Resources/Popover/popoverBgSimple.png
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/WEPopover-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIconFile
12 |
13 | CFBundleIdentifier
14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier}
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | ${PRODUCT_NAME}
19 | CFBundlePackageType
20 | APPL
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1.0
25 | LSRequiresIPhoneOS
26 |
27 | NSMainNibFile
28 | MainWindow
29 |
30 |
31 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/WEPopover.podspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "WEPopover",
3 | "version": "2.4.2",
4 | "license": "MIT",
5 | "summary": "Generic popover implementation for iOS with same API as the UIPopoverController.",
6 | "description": "Generic popover implementation for iOS with same API as the UIPopoverController for the iPad, but configurable with custom background and available for iPhone as well",
7 | "homepage": "https://github.com/werner77/WEPopover",
8 | "authors": {
9 | "Werner Altewischer": "http://www.werner-it.com/"
10 | },
11 | "source": {
12 | "git": "https://github.com/werner77/WEPopover.git",
13 | "tag" : "2.4.2"
14 | },
15 | "platforms": {
16 | "ios": "5.0"
17 | },
18 | "frameworks": [
19 | "Foundation",
20 | "UIKit"
21 | ],
22 | "requires_arc": true,
23 | "source_files": "Classes/Popover/**/*.{c,m,h}",
24 | "resources": "Resources/Popover/**/*.*"
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/WEPopover.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/WEPopover_Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'WEPopover' target in the 'WEPopover' project
3 | //
4 |
5 | #ifdef __OBJC__
6 | #import
7 | #import
8 | #endif
9 |
--------------------------------------------------------------------------------
/PassthroughView/WEPopover-master(带穿透视图)/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // WEPopover
4 | //
5 | // Created by Werner Altewischer on 06/11/10.
6 | // Copyright 2010 Werner IT Consultancy. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | int main(int argc, char *argv[]) {
12 |
13 | @autoreleasepool {
14 | int retVal = UIApplicationMain(argc, argv, nil, nil);
15 | return retVal;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/PerformSelectorDemo/PerformSelectorDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/PerformSelectorDemo/PerformSelectorDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/PerformSelectorDemo/PerformSelectorDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // PerformSelectorDemo
4 | //
5 | // Created by JXT on 2018/11/22.
6 | // Copyright © 2018 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/PerformSelectorDemo/PerformSelectorDemo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/PerformSelectorDemo/PerformSelectorDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // PerformSelectorDemo
4 | //
5 | // Created by JXT on 2018/11/22.
6 | // Copyright © 2018 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/PerformSelectorDemo/PerformSelectorDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // PerformSelectorDemo
4 | //
5 | // Created by JXT on 2018/11/22.
6 | // Copyright © 2018 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/PerformSelectorDemo/PerformSelectorDemoTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/PerformSelectorDemo/PerformSelectorDemoTests/PerformSelectorDemoTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // PerformSelectorDemoTests.m
3 | // PerformSelectorDemoTests
4 | //
5 | // Created by JXT on 2018/11/22.
6 | // Copyright © 2018 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface PerformSelectorDemoTests : XCTestCase
12 |
13 | @end
14 |
15 | @implementation PerformSelectorDemoTests
16 |
17 | - (void)setUp {
18 | [super setUp];
19 | // Put setup code here. This method is called before the invocation of each test method in the class.
20 | }
21 |
22 | - (void)tearDown {
23 | // Put teardown code here. This method is called after the invocation of each test method in the class.
24 | [super tearDown];
25 | }
26 |
27 | - (void)testExample {
28 | // This is an example of a functional test case.
29 | // Use XCTAssert and related functions to verify your tests produce the correct results.
30 | }
31 |
32 | - (void)testPerformanceExample {
33 | // This is an example of a performance test case.
34 | [self measureBlock:^{
35 | // Put the code you want to measure the time of here.
36 | }];
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/PerformSelectorDemo/PerformSelectorDemoUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Quartz2DDemo/Quartz2DDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Quartz2DDemo/Quartz2DDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Quartz2DDemo
4 | //
5 | // Created by JXT on 2017/2/8.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Quartz2DDemo/Quartz2DDemo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/Quartz2DDemo/Quartz2DDemo/CanvasView.h:
--------------------------------------------------------------------------------
1 | //
2 | // CanvasView.h
3 | // Quartz2DDemo
4 | //
5 | // Created by JXT on 2017/2/8.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CanvasView : UIView
12 |
13 | @property (nonatomic, assign) NSInteger index;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Quartz2DDemo/Quartz2DDemo/CanvasViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CanvasViewController.h
3 | // Quartz2DDemo
4 | //
5 | // Created by JXT on 2017/2/8.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CanvasViewController : UIViewController
12 |
13 | @property (nonatomic, assign) NSInteger index;
14 | @property (nonatomic, copy) NSString * indexTitle;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/Quartz2DDemo/Quartz2DDemo/CanvasViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // CanvasViewController.m
3 | // Quartz2DDemo
4 | //
5 | // Created by JXT on 2017/2/8.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import "CanvasViewController.h"
10 |
11 | #import "CanvasView.h"
12 |
13 | @interface CanvasViewController ()
14 |
15 | @end
16 |
17 | @implementation CanvasViewController
18 |
19 | - (void)viewDidLoad
20 | {
21 | [super viewDidLoad];
22 |
23 | self.view.backgroundColor = [UIColor whiteColor];
24 | self.navigationItem.title = self.indexTitle;
25 |
26 | CanvasView *canvasView = [[CanvasView alloc] initWithFrame:CGRectMake(0, 64, self.view.bounds.size.width, self.view.bounds.size.height-64)];
27 | canvasView.index = self.index;
28 | [self.view addSubview:canvasView];
29 | }
30 |
31 | - (void)didReceiveMemoryWarning {
32 | [super didReceiveMemoryWarning];
33 | }
34 |
35 |
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/Quartz2DDemo/Quartz2DDemo/TableViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // TableViewController.h
3 | // Quartz2DDemo
4 | //
5 | // Created by JXT on 2017/2/8.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TableViewController : UITableViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Quartz2DDemo/Quartz2DDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Quartz2DDemo
4 | //
5 | // Created by JXT on 2017/2/8.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Quartz2DDemo/Quartz2DDemo/test_image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kukumaluCN/JXT_iOS_Demos/54c94dd37b0093bd6db692b55359c542bbecc5ab/Quartz2DDemo/Quartz2DDemo/test_image.jpg
--------------------------------------------------------------------------------
/RandomStringForTest/RandomStringForTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RandomStringForTest/RandomStringForTest.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/RandomStringForTest/RandomStringForTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // RandomStringForTest
4 | //
5 | // Created by JXT on 2018/8/13.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/RandomStringForTest/RandomStringForTest/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/RandomStringForTest/RandomStringForTest/NSString+JXTRandomString.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSString+JXTRandomString.h
3 | // RandomStringForTest
4 | //
5 | // Created by JXT on 2018/8/13.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface NSString (JXTRandomString)
12 |
13 | /**
14 | 字符串随机长度裁剪
15 |
16 | @return 随机长度的子串,index from 0
17 | */
18 | - (NSString *)jxt_stringWithRandomLength;
19 |
20 | /**
21 | 利用CCRandomGenerateBytes生成随机字符串,数字字母组成
22 |
23 | @param length 指定长度
24 | @return 随机字符串
25 | */
26 | + (NSString *)jxt_randomStringWithLength:(size_t)length;
27 |
28 | /**
29 | 随机6位数字字符串
30 |
31 | @return 随机6位数
32 | */
33 | + (NSString *)jxt_random6Digits;
34 |
35 | /**
36 | 随机4位数字字符串
37 |
38 | @return 随机4位数
39 | */
40 | + (NSString *)jxt_random4Digits;
41 |
42 | /**
43 | 任意长度随机数字字符串
44 |
45 | @param length 指定长度
46 | @return 随机数字字符串
47 | */
48 | + (NSString *)jxt_randomDigitsStringWithLength:(NSUInteger)length;
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/RandomStringForTest/RandomStringForTest/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // RandomStringForTest
4 | //
5 | // Created by JXT on 2018/8/13.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/RandomStringForTest/RandomStringForTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // RandomStringForTest
4 | //
5 | // Created by JXT on 2018/8/13.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/RemoveSingleElementFromArrayDemo/RemoveSingleElementFromArrayDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RemoveSingleElementFromArrayDemo/RemoveSingleElementFromArrayDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/RemoveSingleElementFromArrayDemo/RemoveSingleElementFromArrayDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // RemoveSingleElementFromArrayDemo
4 | //
5 | // Created by JXT on 2018/4/8.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/RemoveSingleElementFromArrayDemo/RemoveSingleElementFromArrayDemo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/RemoveSingleElementFromArrayDemo/RemoveSingleElementFromArrayDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // RemoveSingleElementFromArrayDemo
4 | //
5 | // Created by JXT on 2018/4/8.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/RemoveSingleElementFromArrayDemo/RemoveSingleElementFromArrayDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // RemoveSingleElementFromArrayDemo
4 | //
5 | // Created by JXT on 2018/4/8.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/StructForLayoutDemo/StructForLayoutDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/StructForLayoutDemo/StructForLayoutDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/StructForLayoutDemo/StructForLayoutDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // StructForLayoutDemo
4 | //
5 | // Created by JXT on 2018/8/9.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/StructForLayoutDemo/StructForLayoutDemo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/StructForLayoutDemo/StructForLayoutDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // StructForLayoutDemo
4 | //
5 | // Created by JXT on 2018/8/9.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/StructForLayoutDemo/StructForLayoutDemo/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // StructForLayoutDemo
4 | //
5 | // Created by JXT on 2018/8/9.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | /**
12 | 布局常量结构体
13 | */
14 | typedef struct {
15 | CGFloat myViewLeftGap;
16 | CGFloat myViewTopGap;
17 | CGSize myViewSize;
18 | } MyLayoutConsts;
19 |
20 |
21 | @interface ViewController ()
22 | @property (nonatomic, strong) UIView * myView;
23 | @end
24 |
25 | @implementation ViewController
26 | {
27 | MyLayoutConsts _layout;
28 | }
29 |
30 | #pragma mark - Life Cycle
31 | - (void)viewDidLoad
32 | {
33 | [super viewDidLoad];
34 |
35 | _layout = (MyLayoutConsts){
36 | .myViewLeftGap = 20,
37 | .myViewTopGap = 20,
38 | .myViewSize = CGSizeMake(100, 100)
39 | };
40 | [self.view addSubview:self.myView];
41 | }
42 |
43 |
44 | #pragma mark - UI
45 | - (void)viewWillLayoutSubviews
46 | {
47 | [super viewWillLayoutSubviews];
48 |
49 | self.myView.frame = (CGRect){_layout.myViewLeftGap, _layout.myViewTopGap, _layout.myViewSize};
50 | }
51 |
52 |
53 | #pragma mark - Lazy Load
54 | - (UIView *)myView
55 | {
56 | if (!_myView) {
57 | _myView = [[UIView alloc] initWithFrame:CGRectZero];
58 | _myView.backgroundColor = [UIColor redColor];
59 | }
60 | return _myView;
61 | }
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/StructForLayoutDemo/StructForLayoutDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // StructForLayoutDemo
4 | //
5 | // Created by JXT on 2018/8/9.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/TableViewCellAnimationTest/TableViewCellAnimationTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TableViewCellAnimationTest/TableViewCellAnimationTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // TableViewCellAnimationTest
4 | //
5 | // Created by JXT on 2017/7/31.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/TableViewCellAnimationTest/TableViewCellAnimationTest/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // TableViewCellAnimationTest
4 | //
5 | // Created by JXT on 2017/7/31.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/TableViewCellAnimationTest/TableViewCellAnimationTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // TableViewCellAnimationTest
4 | //
5 | // Created by JXT on 2017/7/31.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ThreadArrayTest/ThreadSafetyArray.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ThreadArrayTest/ThreadSafetyArray/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ThreadSafetyArray
4 | //
5 | // Created by JXT on 2017/2/10.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/ThreadArrayTest/ThreadSafetyArray/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/ThreadArrayTest/ThreadSafetyArray/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // ThreadSafetyArray
4 | //
5 | // Created by JXT on 2017/2/10.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/ThreadArrayTest/ThreadSafetyArray/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ThreadSafetyArray
4 | //
5 | // Created by JXT on 2017/2/10.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ViewBoundsInitErrorTest/ViewBoundsInitErrorTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ViewBoundsInitErrorTest/ViewBoundsInitErrorTest/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ViewBoundsInitErrorTest
4 | //
5 | // Created by JXT on 2017/9/15.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/ViewBoundsInitErrorTest/ViewBoundsInitErrorTest/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // ViewBoundsInitErrorTest
4 | //
5 | // Created by JXT on 2017/9/15.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/ViewBoundsInitErrorTest/ViewBoundsInitErrorTest/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ViewBoundsInitErrorTest
4 | //
5 | // Created by JXT on 2017/9/15.
6 | // Copyright © 2017年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/WeakStrongDanceDemo/WeakStrongDanceDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/WeakStrongDanceDemo/WeakStrongDanceDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/WeakStrongDanceDemo/WeakStrongDanceDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // WeakStrongDanceDemo
4 | //
5 | // Created by JXT on 2018/1/30.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/WeakStrongDanceDemo/WeakStrongDanceDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // WeakStrongDanceDemo
4 | //
5 | // Created by JXT on 2018/1/30.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/WeakStrongDanceDemo/WeakStrongDanceDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // WeakStrongDanceDemo
4 | //
5 | // Created by JXT on 2018/1/30.
6 | // Copyright © 2018年 JXT. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------