├── .gitignore ├── .travis.yml ├── JKCategories-Demo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ ├── JKCategories-Demo.xcscheme │ └── JKCategories.xcscheme ├── JKCategories-Demo ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ └── LaunchScreen.xib ├── Controller │ ├── BaseViewController.h │ ├── BaseViewController.m │ ├── RootViewController.h │ ├── RootViewController.m │ └── RootViewController.xib ├── Demos │ ├── CoreData │ │ ├── NSFetchRequest │ │ │ ├── NSFetchRequestDemoViewController.h │ │ │ ├── NSFetchRequestDemoViewController.m │ │ │ └── NSFetchRequestDemoViewController.xib │ │ ├── NSManagedObject │ │ │ ├── NSManagedObjectDemoViewController.h │ │ │ ├── NSManagedObjectDemoViewController.m │ │ │ └── NSManagedObjectDemoViewController.xib │ │ ├── NSManagedObjectContext │ │ │ ├── NSManagedObjectContextDemoViewController.h │ │ │ ├── NSManagedObjectContextDemoViewController.m │ │ │ └── NSManagedObjectContextDemoViewController.xib │ │ └── NSPersistentStoreCoordinator │ │ │ ├── NSPersistentStoreCoordinatorDemoViewController.h │ │ │ ├── NSPersistentStoreCoordinatorDemoViewController.m │ │ │ └── NSPersistentStoreCoordinatorDemoViewController.xib │ ├── CoreLocation │ │ ├── CLLocation │ │ │ ├── CLLocationDemoViewController.h │ │ │ ├── CLLocationDemoViewController.m │ │ │ └── CLLocationDemoViewController.xib │ │ └── CLLocationManager │ │ │ ├── CLLocationManagerDemoViewController.h │ │ │ ├── CLLocationManagerDemoViewController.m │ │ │ └── CLLocationManagerDemoViewController.xib │ ├── Foundation │ │ ├── NSArray │ │ │ ├── NSArrayDemoViewController.h │ │ │ ├── NSArrayDemoViewController.m │ │ │ └── NSArrayDemoViewController.xib │ │ ├── NSBundle │ │ │ ├── NSBundleDemoViewController.h │ │ │ ├── NSBundleDemoViewController.m │ │ │ └── NSBundleDemoViewController.xib │ │ ├── NSData │ │ │ ├── NSDataDemoViewController.h │ │ │ ├── NSDataDemoViewController.m │ │ │ └── NSDataDemoViewController.xib │ │ ├── NSDate │ │ │ ├── NSDateDemoViewController.h │ │ │ ├── NSDateDemoViewController.m │ │ │ └── NSDateDemoViewController.xib │ │ ├── NSDateFormatter │ │ │ ├── NSDateFormatterDemoViewController.h │ │ │ ├── NSDateFormatterDemoViewController.m │ │ │ └── NSDateFormatterDemoViewController.xib │ │ ├── NSDictionary │ │ │ ├── NSDictionaryDemoViewController.h │ │ │ ├── NSDictionaryDemoViewController.m │ │ │ └── NSDictionaryDemoViewController.xib │ │ ├── NSException │ │ │ ├── NSExceptionDemoViewController.h │ │ │ ├── NSExceptionDemoViewController.m │ │ │ └── NSExceptionDemoViewController.xib │ │ ├── NSFileHandle │ │ │ ├── NSFileHandleDemoViewController.h │ │ │ ├── NSFileHandleDemoViewController.m │ │ │ ├── NSFileHandleDemoViewController.xib │ │ │ └── NSFileHandleSampleFile.txt │ │ ├── NSFileManager │ │ │ ├── NSFileManagerDemoViewController.h │ │ │ ├── NSFileManagerDemoViewController.m │ │ │ └── NSFileManagerDemoViewController.xib │ │ ├── NSHTTPCookieStorage │ │ │ ├── NSHTTPCookieStorageDemoViewController.h │ │ │ ├── NSHTTPCookieStorageDemoViewController.m │ │ │ └── NSHTTPCookieStorageDemoViewController.xib │ │ ├── NSIndexPath │ │ │ ├── NSIndexPathDemoViewController.h │ │ │ ├── NSIndexPathDemoViewController.m │ │ │ └── NSIndexPathDemoViewController.xib │ │ ├── NSInvocation │ │ │ ├── NSInvocationDemoViewController.h │ │ │ ├── NSInvocationDemoViewController.m │ │ │ └── NSInvocationDemoViewController.xib │ │ ├── NSNotificationCenter │ │ │ ├── NSNotificationCenterDemoViewController.h │ │ │ ├── NSNotificationCenterDemoViewController.m │ │ │ └── NSNotificationCenterDemoViewController.xib │ │ ├── NSNumber │ │ │ ├── NSNumberDemoViewController.h │ │ │ ├── NSNumberDemoViewController.m │ │ │ └── NSNumberDemoViewController.xib │ │ ├── NSObject │ │ │ ├── NSObjectDemoViewController.h │ │ │ ├── NSObjectDemoViewController.m │ │ │ └── NSObjectDemoViewController.xib │ │ ├── NSOperation │ │ │ ├── NSOperationDemoViewController.h │ │ │ ├── NSOperationDemoViewController.m │ │ │ └── NSOperationDemoViewController.xib │ │ ├── NSRunLoop │ │ │ ├── NSRunLoopDemoViewController.h │ │ │ ├── NSRunLoopDemoViewController.m │ │ │ └── NSRunLoopDemoViewController.xib │ │ ├── NSSet │ │ │ ├── NSSetDemoViewController.h │ │ │ ├── NSSetDemoViewController.m │ │ │ └── NSSetDemoViewController.xib │ │ ├── NSString │ │ │ ├── NSStringDemoViewController.h │ │ │ ├── NSStringDemoViewController.m │ │ │ └── NSStringDemoViewController.xib │ │ ├── NSTimer │ │ │ ├── NSTimerDemoViewController.h │ │ │ ├── NSTimerDemoViewController.m │ │ │ └── NSTimerDemoViewController.xib │ │ ├── NSURL │ │ │ ├── NSURLDemoViewController.h │ │ │ ├── NSURLDemoViewController.m │ │ │ └── NSURLDemoViewController.xib │ │ ├── NSURLConnection │ │ │ ├── NSURLConnectionDemoViewController.h │ │ │ ├── NSURLConnectionDemoViewController.m │ │ │ └── NSURLConnectionDemoViewController.xib │ │ ├── NSURLRequest │ │ │ ├── NSURLRequestDemoViewController.h │ │ │ ├── NSURLRequestDemoViewController.m │ │ │ └── NSURLRequestDemoViewController.xib │ │ ├── NSURLSession │ │ │ ├── NSURLSessionDemoViewController.h │ │ │ ├── NSURLSessionDemoViewController.m │ │ │ └── NSURLSessionDemoViewController.xib │ │ └── NSUserDefaults │ │ │ ├── NSUserDefaultsDemoViewController.h │ │ │ ├── NSUserDefaultsDemoViewController.m │ │ │ └── NSUserDefaultsDemoViewController.xib │ ├── MapKit │ │ └── MKMapView │ │ │ ├── MKMapViewDemoViewController.h │ │ │ ├── MKMapViewDemoViewController.m │ │ │ └── MKMapViewDemoViewController.xib │ ├── QuartzCore │ │ ├── CAAnimation │ │ │ ├── CAAnimationDemoViewController.h │ │ │ ├── CAAnimationDemoViewController.m │ │ │ └── CAAnimationDemoViewController.xib │ │ ├── CALayer │ │ │ ├── CALayerDemoViewController.h │ │ │ ├── CALayerDemoViewController.m │ │ │ └── CALayerDemoViewController.xib │ │ ├── CAMediaTimingFunction │ │ │ ├── CAMediaTimingFunctionDemoViewController.h │ │ │ ├── CAMediaTimingFunctionDemoViewController.m │ │ │ └── CAMediaTimingFunctionDemoViewController.xib │ │ ├── CAShapeLayer │ │ │ ├── CAShapeLayerDemoViewController.h │ │ │ ├── CAShapeLayerDemoViewController.m │ │ │ └── CAShapeLayerDemoViewController.xib │ │ └── CATransaction │ │ │ ├── CATransactionDemoViewController.h │ │ │ ├── CATransactionDemoViewController.m │ │ │ └── CATransactionDemoViewController.xib │ └── UIKit │ │ ├── UIAlertView │ │ ├── UIAlertViewDemoViewController.h │ │ ├── UIAlertViewDemoViewController.m │ │ └── UIAlertViewDemoViewController.xib │ │ ├── UIApplication │ │ ├── UIApplicationDemoViewController.h │ │ ├── UIApplicationDemoViewController.m │ │ └── UIApplicationDemoViewController.xib │ │ ├── UIBarButtonItem │ │ ├── UIBarButtonItemDemoViewController.h │ │ ├── UIBarButtonItemDemoViewController.m │ │ └── UIBarButtonItemDemoViewController.xib │ │ ├── UIBezierPath │ │ ├── UIBezierPathDemoViewController.h │ │ ├── UIBezierPathDemoViewController.m │ │ └── UIBezierPathDemoViewController.xib │ │ ├── UIButton │ │ ├── UIButtonDemoViewController.h │ │ ├── UIButtonDemoViewController.m │ │ └── UIButtonDemoViewController.xib │ │ ├── UICollectionView │ │ ├── UICollectionViewDemoViewController.h │ │ ├── UICollectionViewDemoViewController.m │ │ └── UICollectionViewDemoViewController.xib │ │ ├── UIColor │ │ ├── UIColorDemoViewController.h │ │ ├── UIColorDemoViewController.m │ │ └── UIColorDemoViewController.xib │ │ ├── UIControl │ │ ├── UIControlDemoViewController.h │ │ ├── UIControlDemoViewController.m │ │ └── UIControlDemoViewController.xib │ │ ├── UIDevice │ │ ├── UIDeviceDemoViewController.h │ │ ├── UIDeviceDemoViewController.m │ │ └── UIDeviceDemoViewController.xib │ │ ├── UIFont │ │ ├── UIFontDemoViewController.h │ │ ├── UIFontDemoViewController.m │ │ └── UIFontDemoViewController.xib │ │ ├── UIImage │ │ ├── UIImageDemoViewController.h │ │ ├── UIImageDemoViewController.m │ │ └── UIImageDemoViewController.xib │ │ ├── UIImageView │ │ ├── UIImageViewDemoViewController.h │ │ ├── UIImageViewDemoViewController.m │ │ └── UIImageViewDemoViewController.xib │ │ ├── UILable │ │ ├── UILableDemoViewController.h │ │ ├── UILableDemoViewController.m │ │ └── UILableDemoViewController.xib │ │ ├── UINavigationBar │ │ ├── UINavigationBarDemoViewController.h │ │ ├── UINavigationBarDemoViewController.m │ │ └── UINavigationBarDemoViewController.xib │ │ ├── UINavigationController │ │ ├── UINavigationControllerDemoViewController.h │ │ ├── UINavigationControllerDemoViewController.m │ │ └── UINavigationControllerDemoViewController.xib │ │ ├── UINavigationItem │ │ ├── UINavigationItemDemoViewController.h │ │ ├── UINavigationItemDemoViewController.m │ │ └── UINavigationItemDemoViewController.xib │ │ ├── UIPopoverController │ │ ├── UIPopoverControllerDemoViewController.h │ │ ├── UIPopoverControllerDemoViewController.m │ │ └── UIPopoverControllerDemoViewController.xib │ │ ├── UIResponder │ │ ├── UIResponderDemoViewController.h │ │ ├── UIResponderDemoViewController.m │ │ └── UIResponderDemoViewController.xib │ │ ├── UIScreen │ │ ├── UIScreenDemoViewController.h │ │ ├── UIScreenDemoViewController.m │ │ └── UIScreenDemoViewController.xib │ │ ├── UIScrollView │ │ ├── UIScrollViewDemoViewController.h │ │ ├── UIScrollViewDemoViewController.m │ │ └── UIScrollViewDemoViewController.xib │ │ ├── UISearchBar │ │ ├── UISearchBarDemoViewController.h │ │ ├── UISearchBarDemoViewController.m │ │ └── UISearchBarDemoViewController.xib │ │ ├── UITableView │ │ ├── UITableViewDemoViewController.h │ │ ├── UITableViewDemoViewController.m │ │ └── UITableViewDemoViewController.xib │ │ ├── UITableViewCell │ │ ├── UITableViewCellDemoViewController.h │ │ ├── UITableViewCellDemoViewController.m │ │ └── UITableViewCellDemoViewController.xib │ │ ├── UITextField │ │ ├── UITextFieldDemoViewController.h │ │ ├── UITextFieldDemoViewController.m │ │ └── UITextFieldDemoViewController.xib │ │ ├── UITextView │ │ ├── UITextViewDemoViewController.h │ │ ├── UITextViewDemoViewController.m │ │ └── UITextViewDemoViewController.xib │ │ ├── UIView │ │ ├── UIViewDemoViewController.h │ │ ├── UIViewDemoViewController.m │ │ └── UIViewDemoViewController.xib │ │ ├── UIViewController │ │ ├── UIViewControllerDemoViewController.h │ │ ├── UIViewControllerDemoViewController.m │ │ └── UIViewControllerDemoViewController.xib │ │ ├── UIWebView │ │ ├── UIWebViewDemoViewController.h │ │ ├── UIWebViewDemoViewController.m │ │ └── UIWebViewDemoViewController.xib │ │ └── UIWindow │ │ ├── UIWindowDemoViewController.h │ │ ├── UIWindowDemoViewController.m │ │ └── UIWindowDemoViewController.xib ├── Images.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-60@2x.png │ │ ├── Icon-60@3x.png │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-Notification-20@2x.png │ │ ├── Icon-Notification-20@3x.png │ │ ├── Icon-Small.png │ │ ├── Icon-Small@2x-1.png │ │ ├── Icon-Small@2x.png │ │ ├── Icon-Small@3x.png │ │ ├── Icon-Spotlight-40.png │ │ ├── Icon-Spotlight-40@2x-1.png │ │ ├── Icon-Spotlight-40@2x.png │ │ └── Icon-Spotlight-40@3x.png │ ├── Contents.json │ ├── LaunchImage.launchimage │ │ ├── Contents.json │ │ ├── LaunchImage@2x.png │ │ └── LaunchImage_4@2x.png │ └── diannao.imageset │ │ ├── Contents.json │ │ └── diannao.pdf ├── Info.plist └── main.m ├── JKCategories.podspec ├── JKCategories ├── CoreData │ ├── JKCoreData.h │ ├── NSFetchRequest │ │ ├── NSFetchRequest+JKExtensions.h │ │ └── NSFetchRequest+JKExtensions.m │ ├── NSManagedObject │ │ ├── NSManagedObject+JKDictionary.h │ │ ├── NSManagedObject+JKDictionary.m │ │ ├── NSManagedObject+JKExtensions.h │ │ └── NSManagedObject+JKExtensions.m │ └── NSManagedObjectContext │ │ ├── NSManagedObjectContext+JKExtensions.h │ │ ├── NSManagedObjectContext+JKExtensions.m │ │ ├── NSManagedObjectContext+JKFetchRequestsConstructors.h │ │ ├── NSManagedObjectContext+JKFetchRequestsConstructors.m │ │ ├── NSManagedObjectContext+JKFetching.h │ │ ├── NSManagedObjectContext+JKFetching.m │ │ ├── NSManagedObjectContext+JKObjectClear.h │ │ └── NSManagedObjectContext+JKObjectClear.m ├── CoreLocation │ ├── CLLocation │ │ ├── CLLocation+JKCH1903.h │ │ └── CLLocation+JKCH1903.m │ └── JKCoreLocation.h ├── Foundation │ ├── JKFoundation.h │ ├── NSArray │ │ ├── NSArray+JKBlock.h │ │ ├── NSArray+JKBlock.m │ │ ├── NSArray+JKSafeAccess.h │ │ └── NSArray+JKSafeAccess.m │ ├── NSBundle │ │ ├── NSBundle+JKAppIcon.h │ │ └── NSBundle+JKAppIcon.m │ ├── NSData │ │ ├── NSData+JKAPNSToken.h │ │ ├── NSData+JKAPNSToken.m │ │ ├── NSData+JKBase64.h │ │ ├── NSData+JKBase64.m │ │ ├── NSData+JKDataCache.h │ │ ├── NSData+JKDataCache.m │ │ ├── NSData+JKEncrypt.h │ │ ├── NSData+JKEncrypt.m │ │ ├── NSData+JKGzip.h │ │ ├── NSData+JKGzip.m │ │ ├── NSData+JKHash.h │ │ ├── NSData+JKHash.m │ │ ├── NSData+JKPCM.h │ │ ├── NSData+JKPCM.m │ │ ├── NSData+JKzlib.h │ │ └── NSData+JKzlib.m │ ├── NSDate │ │ ├── NSDate+JKExtension.h │ │ ├── NSDate+JKExtension.m │ │ ├── NSDate+JKFormatter.h │ │ ├── NSDate+JKFormatter.m │ │ ├── NSDate+JKInternetDateTime.h │ │ ├── NSDate+JKInternetDateTime.m │ │ ├── NSDate+JKLunarCalendar.h │ │ ├── NSDate+JKLunarCalendar.m │ │ ├── NSDate+JKReporting.h │ │ ├── NSDate+JKReporting.m │ │ ├── NSDate+JKUtilities.h │ │ ├── NSDate+JKUtilities.m │ │ ├── NSDate+JKZeroDate.h │ │ └── NSDate+JKZeroDate.m │ ├── NSDateFormatter │ │ ├── NSDateFormatter+JKMake.h │ │ └── NSDateFormatter+JKMake.m │ ├── NSDictionary │ │ ├── NSDictionary+JKBlock.h │ │ ├── NSDictionary+JKBlock.m │ │ ├── NSDictionary+JKJSONString.h │ │ ├── NSDictionary+JKJSONString.m │ │ ├── NSDictionary+JKMerge.h │ │ ├── NSDictionary+JKMerge.m │ │ ├── NSDictionary+JKSafeAccess.h │ │ ├── NSDictionary+JKSafeAccess.m │ │ ├── NSDictionary+JKURL.h │ │ ├── NSDictionary+JKURL.m │ │ ├── NSDictionary+JKXML.h │ │ └── NSDictionary+JKXML.m │ ├── NSException │ │ ├── NSException+JKTrace.h │ │ └── NSException+JKTrace.m │ ├── NSFileHandle │ │ ├── NSFileHandle+JKReadLine.h │ │ └── NSFileHandle+JKReadLine.m │ ├── NSFileManager │ │ ├── NSFileManager+JKPaths.h │ │ └── NSFileManager+JKPaths.m │ ├── NSHTTPCookieStorage │ │ ├── NSHTTPCookieStorage+JKFreezeDry.h │ │ └── NSHTTPCookieStorage+JKFreezeDry.m │ ├── NSIndexPath │ │ ├── NSIndexPath+JKOffset.h │ │ └── NSIndexPath+JKOffset.m │ ├── NSInvocation │ │ ├── NSInvocation+JKBb.h │ │ ├── NSInvocation+JKBb.m │ │ ├── NSInvocation+JKBlock.h │ │ └── NSInvocation+JKBlock.m │ ├── NSNotificationCenter │ │ ├── NSNotificationCenter+JKMainThread.h │ │ └── NSNotificationCenter+JKMainThread.m │ ├── NSNumber │ │ ├── NSDecimalNumber+JKCalculatingByString.h │ │ ├── NSDecimalNumber+JKCalculatingByString.m │ │ ├── NSDecimalNumber+JKExtensions.h │ │ ├── NSDecimalNumber+JKExtensions.m │ │ ├── NSNumber+JKCGFloat.h │ │ ├── NSNumber+JKCGFloat.m │ │ ├── NSNumber+JKRomanNumerals.h │ │ ├── NSNumber+JKRomanNumerals.m │ │ ├── NSNumber+JKRound.h │ │ └── NSNumber+JKRound.m │ ├── NSObject │ │ ├── NSObject+JKAddProperty.h │ │ ├── NSObject+JKAddProperty.m │ │ ├── NSObject+JKAppInfo.h │ │ ├── NSObject+JKAppInfo.m │ │ ├── NSObject+JKAssociatedObject.h │ │ ├── NSObject+JKAssociatedObject.m │ │ ├── NSObject+JKAutoCoding.h │ │ ├── NSObject+JKAutoCoding.m │ │ ├── NSObject+JKBlockTimer.h │ │ ├── NSObject+JKBlockTimer.m │ │ ├── NSObject+JKBlocks.h │ │ ├── NSObject+JKBlocks.m │ │ ├── NSObject+JKEasyCopy.h │ │ ├── NSObject+JKEasyCopy.m │ │ ├── NSObject+JKGCD.h │ │ ├── NSObject+JKGCD.m │ │ ├── NSObject+JKKVOBlocks.h │ │ ├── NSObject+JKKVOBlocks.m │ │ ├── NSObject+JKReflection.h │ │ ├── NSObject+JKReflection.m │ │ ├── NSObject+JKRuntime.h │ │ └── NSObject+JKRuntime.m │ ├── NSRunLoop │ │ ├── NSRunLoop+JKPerformBlock.h │ │ └── NSRunLoop+JKPerformBlock.m │ ├── NSSet │ │ ├── NSSet+JKBlock.h │ │ └── NSSet+JKBlock.m │ ├── NSString │ │ ├── NSString+JKBase64.h │ │ ├── NSString+JKBase64.m │ │ ├── NSString+JKContains.h │ │ ├── NSString+JKContains.m │ │ ├── NSString+JKDictionaryValue.h │ │ ├── NSString+JKDictionaryValue.m │ │ ├── NSString+JKEmoji.h │ │ ├── NSString+JKEmoji.m │ │ ├── NSString+JKEncrypt.h │ │ ├── NSString+JKEncrypt.m │ │ ├── NSString+JKHTML.h │ │ ├── NSString+JKHTML.m │ │ ├── NSString+JKHash.h │ │ ├── NSString+JKHash.m │ │ ├── NSString+JKMIME.h │ │ ├── NSString+JKMIME.m │ │ ├── NSString+JKMatcher.h │ │ ├── NSString+JKMatcher.m │ │ ├── NSString+JKNormalRegex.h │ │ ├── NSString+JKNormalRegex.m │ │ ├── NSString+JKPinyin.h │ │ ├── NSString+JKPinyin.m │ │ ├── NSString+JKRemoveEmoji.h │ │ ├── NSString+JKRemoveEmoji.m │ │ ├── NSString+JKScore.h │ │ ├── NSString+JKScore.m │ │ ├── NSString+JKSize.h │ │ ├── NSString+JKSize.m │ │ ├── NSString+JKStringPages.h │ │ ├── NSString+JKStringPages.m │ │ ├── NSString+JKTrims.h │ │ ├── NSString+JKTrims.m │ │ ├── NSString+JKURLEncode.h │ │ ├── NSString+JKURLEncode.m │ │ ├── NSString+JKUUID.h │ │ ├── NSString+JKUUID.m │ │ ├── NSString+JKXMLDictionary.h │ │ └── NSString+JKXMLDictionary.m │ ├── NSTimer │ │ ├── NSTimer+JKAddition.h │ │ ├── NSTimer+JKAddition.m │ │ ├── NSTimer+JKBlocks.h │ │ └── NSTimer+JKBlocks.m │ ├── NSURL │ │ ├── NSURL+JKParam.h │ │ ├── NSURL+JKParam.m │ │ ├── NSURL+JKQueryDictionary.h │ │ └── NSURL+JKQueryDictionary.m │ ├── NSURLConnection │ │ ├── NSURLConnection+JKSelfSigned.h │ │ └── NSURLConnection+JKSelfSigned.m │ ├── NSURLRequest │ │ ├── NSMutableURLRequest+JKUpload.h │ │ ├── NSMutableURLRequest+JKUpload.m │ │ ├── NSURLRequest+JKParamsFromDictionary.h │ │ └── NSURLRequest+JKParamsFromDictionary.m │ ├── NSURLSession │ │ ├── NSURLSession+JKSynchronousTask.h │ │ └── NSURLSession+JKSynchronousTask.m │ └── NSUserDefaults │ │ ├── NSUserDefaults+JKSafeAccess.h │ │ ├── NSUserDefaults+JKSafeAccess.m │ │ ├── NSUserDefaults+JKiCloudSync.h │ │ └── NSUserDefaults+JKiCloudSync.m ├── Info.plist ├── JKCategories.h ├── MapKit │ ├── JKMapKit.h │ └── MKMapView │ │ ├── MKMapView+JKBetterMaps.h │ │ ├── MKMapView+JKBetterMaps.m │ │ ├── MKMapView+JKMoveLogo.h │ │ ├── MKMapView+JKMoveLogo.m │ │ ├── MKMapView+JKZoomLevel.h │ │ └── MKMapView+JKZoomLevel.m ├── QuartzCore │ ├── CAAnimation │ │ ├── CAAnimation+JKEasingEquations.h │ │ └── CAAnimation+JKEasingEquations.m │ ├── CALayer │ │ ├── CALayer+JKBorderColor.h │ │ └── CALayer+JKBorderColor.m │ ├── CAMediaTimingFunction │ │ ├── CAMediaTimingFunction+JKAdditionalEquations.h │ │ └── CAMediaTimingFunction+JKAdditionalEquations.m │ ├── CAShapeLayer │ │ ├── CAShapeLayer+JKUIBezierPath.h │ │ └── CAShapeLayer+JKUIBezierPath.m │ ├── CATransaction │ │ ├── CATransaction+JKAnimateWithDuration.h │ │ └── CATransaction+JKAnimateWithDuration.m │ └── JKQuartzCore.h └── UIKit │ ├── JKUIKit.h │ ├── UIApplication │ ├── UIApplication+JKApplicationSize.h │ ├── UIApplication+JKApplicationSize.m │ ├── UIApplication+JKKeyboardFrame.h │ ├── UIApplication+JKKeyboardFrame.m │ ├── UIApplication+JKNetworkActivityIndicator.h │ └── UIApplication+JKNetworkActivityIndicator.m │ ├── UIBarButtonItem │ ├── UIBarButtonItem+JKAction.h │ ├── UIBarButtonItem+JKAction.m │ ├── UIBarButtonItem+JKBadge.h │ └── UIBarButtonItem+JKBadge.m │ ├── UIBezierPath │ ├── UIBezierPath+JKBasicShapes.h │ ├── UIBezierPath+JKBasicShapes.m │ ├── UIBezierPath+JKLength.h │ ├── UIBezierPath+JKLength.m │ ├── UIBezierPath+JKSVGString.h │ ├── UIBezierPath+JKSVGString.m │ ├── UIBezierPath+JKSymbol.h │ ├── UIBezierPath+JKSymbol.m │ ├── UIBezierPath+JKThroughPointsBezier.h │ └── UIBezierPath+JKThroughPointsBezier.m │ ├── UIButton │ ├── UIButton+JKBackgroundColor.h │ ├── UIButton+JKBackgroundColor.m │ ├── UIButton+JKBadge.h │ ├── UIButton+JKBadge.m │ ├── UIButton+JKBlock.h │ ├── UIButton+JKBlock.m │ ├── UIButton+JKImagePosition.h │ ├── UIButton+JKImagePosition.m │ ├── UIButton+JKIndicator.h │ ├── UIButton+JKIndicator.m │ ├── UIButton+JKMiddleAligning.h │ ├── UIButton+JKMiddleAligning.m │ ├── UIButton+JKSubmitting.h │ ├── UIButton+JKSubmitting.m │ ├── UIButton+JKTouchAreaInsets.h │ └── UIButton+JKTouchAreaInsets.m │ ├── UIColor │ ├── UIColor+JKGradient.h │ ├── UIColor+JKGradient.m │ ├── UIColor+JKHEX.h │ ├── UIColor+JKHEX.m │ ├── UIColor+JKModify.h │ ├── UIColor+JKModify.m │ ├── UIColor+JKRandom.h │ ├── UIColor+JKRandom.m │ ├── UIColor+JKWeb.h │ └── UIColor+JKWeb.m │ ├── UIControl │ ├── UIControl+JKActionBlocks.h │ ├── UIControl+JKActionBlocks.m │ ├── UIControl+JKBlock.h │ ├── UIControl+JKBlock.m │ ├── UIControl+JKSound.h │ └── UIControl+JKSound.m │ ├── UIDevice │ ├── UIDevice+JKHardware.h │ └── UIDevice+JKHardware.m │ ├── UIFont │ ├── UIFont+JKCustomLoader.h │ ├── UIFont+JKCustomLoader.m │ ├── UIFont+JKDynamicFontControl.h │ ├── UIFont+JKDynamicFontControl.m │ ├── UIFont+JKTTF.h │ └── UIFont+JKTTF.m │ ├── UIImage │ ├── UIImage+JKAlpha.h │ ├── UIImage+JKAlpha.m │ ├── UIImage+JKAnimatedGIF.h │ ├── UIImage+JKAnimatedGIF.m │ ├── UIImage+JKBetterFace.h │ ├── UIImage+JKBetterFace.m │ ├── UIImage+JKBlur.h │ ├── UIImage+JKBlur.m │ ├── UIImage+JKCapture.h │ ├── UIImage+JKCapture.m │ ├── UIImage+JKColor.h │ ├── UIImage+JKColor.m │ ├── UIImage+JKFXImage.h │ ├── UIImage+JKFXImage.m │ ├── UIImage+JKFileName.h │ ├── UIImage+JKFileName.m │ ├── UIImage+JKGIF.h │ ├── UIImage+JKGIF.m │ ├── UIImage+JKMerge.h │ ├── UIImage+JKMerge.m │ ├── UIImage+JKOrientation.h │ ├── UIImage+JKOrientation.m │ ├── UIImage+JKRemoteSize.h │ ├── UIImage+JKRemoteSize.m │ ├── UIImage+JKResize.h │ ├── UIImage+JKResize.m │ ├── UIImage+JKRoundedCorner.h │ ├── UIImage+JKRoundedCorner.m │ ├── UIImage+JKSuperCompress.h │ ├── UIImage+JKSuperCompress.m │ ├── UIImage+JKVector.h │ └── UIImage+JKVector.m │ ├── UIImageView │ ├── UIImageView+JKAddition.h │ ├── UIImageView+JKAddition.m │ ├── UIImageView+JKBetterFace.h │ ├── UIImageView+JKBetterFace.m │ ├── UIImageView+JKFaceAwareFill.h │ ├── UIImageView+JKFaceAwareFill.m │ ├── UIImageView+JKGeometryConversion.h │ ├── UIImageView+JKGeometryConversion.m │ ├── UIImageView+JKLetters.h │ ├── UIImageView+JKLetters.m │ ├── UIImageView+JKReflect.h │ └── UIImageView+JKReflect.m │ ├── UILable │ ├── UILabel+JKAdjustableLabel.h │ ├── UILabel+JKAdjustableLabel.m │ ├── UILabel+JKAutoSize.h │ ├── UILabel+JKAutoSize.m │ ├── UILabel+JKAutomaticWriting.h │ ├── UILabel+JKAutomaticWriting.m │ ├── UILabel+JKSuggestSize.h │ └── UILabel+JKSuggestSize.m │ ├── UINavigationBar │ ├── UINavigationBar+JKAwesome.h │ └── UINavigationBar+JKAwesome.m │ ├── UINavigationController │ ├── UINavigationController+JKKeyboardFix.h │ ├── UINavigationController+JKKeyboardFix.m │ ├── UINavigationController+JKStackManager.h │ ├── UINavigationController+JKStackManager.m │ ├── UINavigationController+JKTransitions.h │ └── UINavigationController+JKTransitions.m │ ├── UINavigationItem │ ├── UINavigationItem+JKLoading.h │ ├── UINavigationItem+JKLoading.m │ ├── UINavigationItem+JKLock.h │ └── UINavigationItem+JKLock.m │ ├── UIPopoverController │ ├── UIPopoverController+iPhone.h │ └── UIPopoverController+iPhone.m │ ├── UIResponder │ ├── UIResponder+JKChain.h │ ├── UIResponder+JKChain.m │ ├── UIResponder+JKFirstResponder.h │ └── UIResponder+JKFirstResponder.m │ ├── UIScreen │ ├── UIScreen+JKFrame.h │ └── UIScreen+JKFrame.m │ ├── UIScrollView │ ├── UIScrollView+JKAddition.h │ ├── UIScrollView+JKAddition.m │ ├── UIScrollView+JKPages.h │ └── UIScrollView+JKPages.m │ ├── UISearchBar │ ├── UISearchBar+JKBlocks.h │ └── UISearchBar+JKBlocks.m │ ├── UISplitViewController │ ├── UISplitViewController+JKQuickAccess.h │ └── UISplitViewController+JKQuickAccess.m │ ├── UITableView │ ├── UITableView+JKiOS7Style.h │ └── UITableView+JKiOS7Style.m │ ├── UITableViewCell │ ├── UITableViewCell+JKDelaysContentTouches.h │ ├── UITableViewCell+JKDelaysContentTouches.m │ ├── UITableViewCell+JKNIB.h │ └── UITableViewCell+JKNIB.m │ ├── UITextField │ ├── UITextField+JKBlocks.h │ ├── UITextField+JKBlocks.m │ ├── UITextField+JKHistory.h │ ├── UITextField+JKHistory.m │ ├── UITextField+JKInputLimit.h │ ├── UITextField+JKInputLimit.m │ ├── UITextField+JKSelect.h │ ├── UITextField+JKSelect.m │ ├── UITextField+JKShake.h │ └── UITextField+JKShake.m │ ├── UITextView │ ├── UITextView+JKInputLimit.h │ ├── UITextView+JKInputLimit.m │ ├── UITextView+JKPinchZoom.h │ ├── UITextView+JKPinchZoom.m │ ├── UITextView+JKPlaceHolder.h │ ├── UITextView+JKPlaceHolder.m │ ├── UITextView+JKSelect.h │ └── UITextView+JKSelect.m │ ├── UIView │ ├── UIView+JKAnimation.h │ ├── UIView+JKAnimation.m │ ├── UIView+JKBlockGesture.h │ ├── UIView+JKBlockGesture.m │ ├── UIView+JKConstraints.h │ ├── UIView+JKConstraints.m │ ├── UIView+JKCustomBorder.h │ ├── UIView+JKCustomBorder.m │ ├── UIView+JKDraggable.h │ ├── UIView+JKDraggable.m │ ├── UIView+JKFind.h │ ├── UIView+JKFind.m │ ├── UIView+JKFrame.h │ ├── UIView+JKFrame.m │ ├── UIView+JKNib.h │ ├── UIView+JKNib.m │ ├── UIView+JKRecursion.h │ ├── UIView+JKRecursion.m │ ├── UIView+JKScreenshot.h │ ├── UIView+JKScreenshot.m │ ├── UIView+JKShake.h │ ├── UIView+JKShake.m │ ├── UIView+JKToast.h │ ├── UIView+JKToast.m │ ├── UIView+JKVisuals.h │ └── UIView+JKVisuals.m │ ├── UIViewController │ ├── UIViewController+JKBackButtonTouched.h │ ├── UIViewController+JKBackButtonTouched.m │ ├── UIViewController+JKBlockSegue.h │ ├── UIViewController+JKBlockSegue.m │ ├── UIViewController+JKRecursiveDescription.h │ ├── UIViewController+JKRecursiveDescription.m │ ├── UIViewController+JKStoreKit.h │ ├── UIViewController+JKStoreKit.m │ ├── UIViewController+JKVisible.h │ └── UIViewController+JKVisible.m │ └── UIWindow │ ├── UIWindow+JKHierarchy.h │ └── UIWindow+JKHierarchy.m ├── LICENSE ├── NotRenamed ├── CLLocationManager+Blocks.h ├── CLLocationManager+Blocks.m ├── UIApplication+JKPermissions.h ├── UIApplication+JKPermissions.m ├── UICollectionView+ARDynamicCacheHeightLayoutCell.h ├── UICollectionView+ARDynamicCacheHeightLayoutCell.m ├── UINavigationController+FDFullscreenPopGesture.h ├── UINavigationController+FDFullscreenPopGesture.m ├── UIScrollView+APParallaxHeader.h ├── UIScrollView+APParallaxHeader.m ├── UIScrollView+EmptyDataSet.h ├── UIScrollView+EmptyDataSet.m ├── UITableView-FDTemplateLayoutCell │ ├── UITableView+FDIndexPathHeightCache.h │ ├── UITableView+FDIndexPathHeightCache.m │ ├── UITableView+FDKeyedHeightCache.h │ ├── UITableView+FDKeyedHeightCache.m │ ├── UITableView+FDTemplateLayoutCell.h │ ├── UITableView+FDTemplateLayoutCell.m │ ├── UITableView+FDTemplateLayoutCellDebug.h │ └── UITableView+FDTemplateLayoutCellDebug.m ├── UIView+Debug.h ├── UIView+Debug.m ├── UIView+FDCollapsibleConstraints.h ├── UIView+FDCollapsibleConstraints.m ├── UIView+Genie.h ├── UIView+Genie.m ├── UIView+GestureCallback.h ├── UIView+GestureCallback.m ├── UIViewController+DDPopUpViewController.h ├── UIViewController+DDPopUpViewController.m ├── UIViewController+MJPopupViewController.h ├── UIViewController+MJPopupViewController.m ├── UIViewController+TopBarMessage.h ├── UIViewController+TopBarMessage.m ├── UIWebView+Alert.h ├── UIWebView+Alert.m ├── UIWebView │ ├── UIWebVIew+JKSwipeGesture.h │ ├── UIWebVIew+JKSwipeGesture.m │ ├── UIWebView+JKBlocks.h │ ├── UIWebView+JKBlocks.m │ ├── UIWebView+JKCanvas.h │ ├── UIWebView+JKCanvas.m │ ├── UIWebView+JKJavaScript.h │ ├── UIWebView+JKJavaScript.m │ ├── UIWebView+JKLoad.h │ ├── UIWebView+JKLoad.m │ ├── UIWebView+JKLoadInfo.h │ ├── UIWebView+JKLoadInfo.m │ ├── UIWebView+JKMetaParser.h │ ├── UIWebView+JKMetaParser.m │ ├── UIWebView+JKStyle.h │ ├── UIWebView+JKStyle.m │ ├── UIWebView+JKWebStorage.h │ └── UIWebView+JKWebStorage.m ├── WebView+Debug.h └── WebView+Debug.m ├── PodTest ├── PodTest.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── PodTest.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── PodTest │ ├── 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 ├── Podfile ├── Podfile.lock └── Pods │ ├── Local Podspecs │ └── JKCategories.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ └── project.pbxproj │ └── Target Support Files │ ├── JKCategories │ ├── Info.plist │ ├── JKCategories-dummy.m │ ├── JKCategories-prefix.pch │ ├── JKCategories-umbrella.h │ ├── JKCategories.modulemap │ └── JKCategories.xcconfig │ └── Pods-PodTest │ ├── Info.plist │ ├── Pods-PodTest-acknowledgements.markdown │ ├── Pods-PodTest-acknowledgements.plist │ ├── Pods-PodTest-dummy.m │ ├── Pods-PodTest-frameworks.sh │ ├── Pods-PodTest-resources.sh │ ├── Pods-PodTest-umbrella.h │ ├── Pods-PodTest.debug.xcconfig │ ├── Pods-PodTest.modulemap │ └── Pods-PodTest.release.xcconfig └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | .DS_Store 20 | 21 | # CocoaPods 22 | # 23 | # We recommend against adding the Pods directory to your .gitignore. However 24 | # you should judge for yourself, the pros and cons are mentioned at: 25 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 26 | # 27 | # Pods/ 28 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode7.3 3 | xcode_project: JKCategories-Demo.xcodeproj 4 | xcode_scheme: JKCategories 5 | 6 | script: 7 | - xctool -project JKCategories-Demo.xcodeproj -scheme JKCategories build test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -------------------------------------------------------------------------------- /JKCategories-Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /JKCategories-Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /JKCategories-Demo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | @class RootViewController; 11 | @interface AppDelegate : UIResponder 12 | @property (strong, nonatomic) UIWindow *window; 13 | @property (strong, nonatomic) RootViewController *rooViewController; 14 | @property (strong, nonatomic) UINavigationController *navgationController; 15 | +(AppDelegate*)APP; 16 | @end 17 | -------------------------------------------------------------------------------- /JKCategories-Demo/Controller/BaseViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BaseViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BaseViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Controller/RootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RootViewController : UITableViewController 12 | { 13 | NSDictionary *_items; 14 | } 15 | @end 16 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/CoreData/NSFetchRequest/NSFetchRequestDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSFetchRequestDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/5. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSFetchRequestDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/CoreData/NSFetchRequest/NSFetchRequestDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSFetchRequestDemoViewController.m 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/5. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSFetchRequestDemoViewController.h" 10 | 11 | @interface NSFetchRequestDemoViewController () 12 | 13 | @end 14 | 15 | @implementation NSFetchRequestDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/CoreData/NSManagedObject/NSManagedObjectDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSManagedObjectDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/5. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSManagedObjectDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/CoreData/NSManagedObject/NSManagedObjectDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSManagedObjectDemoViewController.m 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/5. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSManagedObjectDemoViewController.h" 10 | 11 | @interface NSManagedObjectDemoViewController () 12 | 13 | @end 14 | 15 | @implementation NSManagedObjectDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/CoreData/NSManagedObjectContext/NSManagedObjectContextDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSManagedObjectContextDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/4/25. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSManagedObjectContextDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/CoreData/NSPersistentStoreCoordinator/NSPersistentStoreCoordinatorDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSPersistentStoreCoordinatorDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/20. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSPersistentStoreCoordinatorDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/CoreLocation/CLLocation/CLLocationDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLLocationDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/22. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface CLLocationDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/CoreLocation/CLLocationManager/CLLocationManagerDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLLocationManagerDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/23. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface CLLocationManagerDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSArray/NSArrayDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArrayDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | #import "NSArray+JKBlock.h" 11 | #import "NSArray+JKSafeAccess.h" 12 | 13 | @interface NSArrayDemoViewController : BaseViewController 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSBundle/NSBundleDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundleDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSBundleDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSBundle/NSBundleDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundleDemoViewController.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSBundleDemoViewController.h" 10 | 11 | @interface NSBundleDemoViewController () 12 | 13 | @end 14 | 15 | @implementation NSBundleDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSData/NSDataDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDataDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSDataDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSDate/NSDateDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDateDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | @interface NSDateDemoViewController : BaseViewController 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSDateFormatter/NSDateFormatterDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDateFormatterDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/4/25. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSDateFormatterDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSDictionary/NSDictionaryDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionaryDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSDictionaryDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSException/NSExceptionDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSExceptionDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSExceptionDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSFileHandle/NSFileHandleDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileHandleDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/7/9. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSFileHandleDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSFileHandle/NSFileHandleSampleFile.txt: -------------------------------------------------------------------------------- 1 | The quick yellow Pikachu 2 | jumped over the lazy Snorlax 3 | while the thirsty Lotad 4 | carried water on his back! -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSFileManager/NSFileManagerDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileManagerDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSFileManagerDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSHTTPCookieStorage/NSHTTPCookieStorageDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSHTTPCookieStorageDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/23. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSHTTPCookieStorageDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSIndexPath/NSIndexPathDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSIndexPathDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/4/25. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSIndexPathDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSInvocation/NSInvocationDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSInvocationDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/12/22. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSInvocationDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSInvocation/NSInvocationDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSInvocationDemoViewController.m 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/12/22. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSInvocationDemoViewController.h" 10 | 11 | @interface NSInvocationDemoViewController () 12 | 13 | @end 14 | 15 | @implementation NSInvocationDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSNotificationCenter/NSNotificationCenterDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNotificationCenterDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/5. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSNotificationCenterDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSNumber/NSNumberDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumberDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/23. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSNumberDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSObject/NSObjectDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObjectDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSObjectDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSObject/NSObjectDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObjectDemoViewController.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSObjectDemoViewController.h" 10 | 11 | @interface NSObjectDemoViewController () 12 | 13 | @end 14 | 15 | @implementation NSObjectDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSOperation/NSOperationDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSOperationDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/12/17. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSOperationDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSOperation/NSOperationDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSOperationDemoViewController.m 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/12/17. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSOperationDemoViewController.h" 10 | 11 | @interface NSOperationDemoViewController () 12 | 13 | @end 14 | 15 | @implementation NSOperationDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSRunLoop/NSRunLoopDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSRunLoopDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/8/7. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSRunLoopDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSRunLoop/NSRunLoopDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSRunLoopDemoViewController.m 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/8/7. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSRunLoopDemoViewController.h" 10 | 11 | @interface NSRunLoopDemoViewController () 12 | 13 | @end 14 | 15 | @implementation NSRunLoopDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSSet/NSSetDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSSetDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSSetDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSSet/NSSetDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSSetDemoViewController.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSSetDemoViewController.h" 10 | 11 | @interface NSSetDemoViewController () 12 | 13 | @end 14 | 15 | @implementation NSSetDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSString/NSStringDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSStringDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSStringDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSTimer/NSTimerDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSTimerDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSTimerDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSTimer/NSTimerDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSTimerDemoViewController.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSTimerDemoViewController.h" 10 | 11 | @interface NSTimerDemoViewController () 12 | 13 | @end 14 | 15 | @implementation NSTimerDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSURL/NSURLDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSURLDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSURLDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSURL/NSURLDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSURLDemoViewController.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSURLDemoViewController.h" 10 | 11 | @interface NSURLDemoViewController () 12 | 13 | @end 14 | 15 | @implementation NSURLDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSURLConnection/NSURLConnectionDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSURLConnectionDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/12/22. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSURLConnectionDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSURLConnection/NSURLConnectionDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSURLConnectionDemoViewController.m 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/12/22. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSURLConnectionDemoViewController.h" 10 | 11 | @interface NSURLConnectionDemoViewController () 12 | 13 | @end 14 | 15 | @implementation NSURLConnectionDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSURLRequest/NSURLRequestDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSURLRequestDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/9/16. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSURLRequestDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSURLRequest/NSURLRequestDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSURLRequestDemoViewController.m 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/9/16. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSURLRequestDemoViewController.h" 10 | 11 | @interface NSURLRequestDemoViewController () 12 | 13 | @end 14 | 15 | @implementation NSURLRequestDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | 21 | } 22 | 23 | - (void)didReceiveMemoryWarning { 24 | [super didReceiveMemoryWarning]; 25 | // Dispose of any resources that can be recreated. 26 | } 27 | 28 | /* 29 | #pragma mark - Navigation 30 | 31 | // In a storyboard-based application, you will often want to do a little preparation before navigation 32 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 33 | // Get the new view controller using [segue destinationViewController]. 34 | // Pass the selected object to the new view controller. 35 | } 36 | */ 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSURLSession/NSURLSessionDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSURLSessionDemoViewController.h 3 | // JKCategories-Demo 4 | // 5 | // Created by Jakey on 2016/12/23. 6 | // Copyright © 2016年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSURLSessionDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSURLSession/NSURLSessionDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSURLSessionDemoViewController.m 3 | // JKCategories-Demo 4 | // 5 | // Created by Jakey on 2016/12/23. 6 | // Copyright © 2016年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSURLSessionDemoViewController.h" 10 | 11 | @interface NSURLSessionDemoViewController () 12 | 13 | @end 14 | 15 | @implementation NSURLSessionDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/Foundation/NSUserDefaults/NSUserDefaultsDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSUserDefaultsDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface NSUserDefaultsDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/MapKit/MKMapView/MKMapViewDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKMapViewViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/4/1. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface MKMapViewDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/MapKit/MKMapView/MKMapViewDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MKMapViewViewController.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/4/1. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "MKMapViewDemoViewController.h" 10 | 11 | @interface MKMapViewDemoViewController () 12 | 13 | @end 14 | 15 | @implementation MKMapViewDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/QuartzCore/CAAnimation/CAAnimationDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CAAnimationDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/20. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface CAAnimationDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/QuartzCore/CAAnimation/CAAnimationDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CAAnimationDemoViewController.m 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/20. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "CAAnimationDemoViewController.h" 10 | 11 | @interface CAAnimationDemoViewController () 12 | 13 | @end 14 | 15 | @implementation CAAnimationDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/QuartzCore/CALayer/CALayerDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CALayerDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/20. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface CALayerDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/QuartzCore/CALayer/CALayerDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CALayerDemoViewController.m 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/20. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "CALayerDemoViewController.h" 10 | 11 | @interface CALayerDemoViewController () 12 | 13 | @end 14 | 15 | @implementation CALayerDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/QuartzCore/CAMediaTimingFunction/CAMediaTimingFunctionDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CAMediaTimingFunctionDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/20. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface CAMediaTimingFunctionDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/QuartzCore/CAShapeLayer/CAShapeLayerDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CAShapeLayerDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/20. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface CAShapeLayerDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/QuartzCore/CAShapeLayer/CAShapeLayerDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CAShapeLayerDemoViewController.m 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/20. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "CAShapeLayerDemoViewController.h" 10 | 11 | @interface CAShapeLayerDemoViewController () 12 | 13 | @end 14 | 15 | @implementation CAShapeLayerDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/QuartzCore/CATransaction/CATransactionDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CATransactionDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/20. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface CATransactionDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/QuartzCore/CATransaction/CATransactionDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CATransactionDemoViewController.m 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/20. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "CATransactionDemoViewController.h" 10 | 11 | @interface CATransactionDemoViewController () 12 | 13 | @end 14 | 15 | @implementation CATransactionDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIAlertView/UIAlertViewDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIAlertViewDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/22. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIAlertViewDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIApplication/UIApplicationDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIApplicationDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/23. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIApplicationDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIBarButtonItem/UIBarButtonItemDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBarButtonItemDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/23. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIBarButtonItemDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIBezierPath/UIBezierPathDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBezierPathDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIBezierPathDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIButton/UIButtonDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButtonDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIButtonDemoViewController : BaseViewController 12 | 13 | - (IBAction)countButtonTouchd:(id)sender; 14 | @property (weak, nonatomic) IBOutlet UIButton *blockButton; 15 | @end 16 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UICollectionView/UICollectionViewDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionViewDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 16/3/14. 6 | // Copyright © 2016年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UICollectionViewDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UICollectionView/UICollectionViewDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UICollectionViewDemoViewController.m 3 | // JKCategories 4 | // 5 | // Created by Jakey on 16/3/14. 6 | // Copyright © 2016年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "UICollectionViewDemoViewController.h" 10 | 11 | @interface UICollectionViewDemoViewController () 12 | 13 | @end 14 | 15 | @implementation UICollectionViewDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIColor/UIColorDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColorDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIColorDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIColor/UIColorDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColorDemoViewController.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "UIColorDemoViewController.h" 10 | 11 | @interface UIColorDemoViewController () 12 | 13 | @end 14 | 15 | @implementation UIColorDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIControl/UIControlDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIControlDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/23. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIControlDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIControl/UIControlDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIControlDemoViewController.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/23. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "UIControlDemoViewController.h" 10 | 11 | @interface UIControlDemoViewController () 12 | 13 | @end 14 | 15 | @implementation UIControlDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIDevice/UIDeviceDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIDeviceDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIDeviceDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIDevice/UIDeviceDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIDeviceDemoViewController.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "UIDeviceDemoViewController.h" 10 | 11 | @interface UIDeviceDemoViewController () 12 | 13 | @end 14 | 15 | @implementation UIDeviceDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIFont/UIFontDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIFontDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/22. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIFontDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIFont/UIFontDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIFontDemoViewController.m 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/22. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "UIFontDemoViewController.h" 10 | 11 | @interface UIFontDemoViewController () 12 | 13 | @end 14 | 15 | @implementation UIFontDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIImage/UIImageDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIImageDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIImageView/UIImageViewDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageViewDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIImageViewDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UILable/UILableDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UILableDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UILableDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UILable/UILableDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UILableDemoViewController.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "UILableDemoViewController.h" 10 | 11 | @interface UILableDemoViewController () 12 | 13 | @end 14 | 15 | @implementation UILableDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UINavigationBar/UINavigationBarDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationBarDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/4/25. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UINavigationBarDemoViewController : BaseViewController 12 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UINavigationController/UINavigationControllerDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationControllerDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UINavigationControllerDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UINavigationItem/UINavigationItemDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationItemDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/22. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UINavigationItemDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIPopoverController/UIPopoverControllerDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIPopoverControllerDemoViewController.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/7/13. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIPopoverControllerDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIResponder/UIResponderDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIResponderDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIResponderDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIScreen/UIScreenDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIScreenDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/22. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIScreenDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIScreen/UIScreenDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIScreenDemoViewController.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/22. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "UIScreenDemoViewController.h" 10 | 11 | @interface UIScreenDemoViewController () 12 | 13 | @end 14 | 15 | @implementation UIScreenDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIScrollView/UIScrollViewDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollViewDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIScrollViewDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UISearchBar/UISearchBarDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UISearchBarDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UISearchBarDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UITableView/UITableViewDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/4/25. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UITableViewDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UITableViewCell/UITableViewCellDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewCellDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UITableViewCellDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UITextField/UITextFieldDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextFieldDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UITextFieldDemoViewController : BaseViewController 12 | @property (weak, nonatomic) IBOutlet UITextField *textField; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UITextView/UITextViewDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextViewDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UITextViewDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIView/UIViewDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIViewDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIView/UIViewDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewDemoViewController.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "UIViewDemoViewController.h" 10 | 11 | @interface UIViewDemoViewController () 12 | 13 | @end 14 | 15 | @implementation UIViewDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIViewController/UIViewControllerDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewControllerDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIViewControllerDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIWebView/UIWebViewDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWebViewDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIWebViewDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIWebView/UIWebViewDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIWebViewDemoViewController.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "UIWebViewDemoViewController.h" 10 | 11 | @interface UIWebViewDemoViewController () 12 | 13 | @end 14 | 15 | @implementation UIWebViewDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIWindow/UIWindowDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWindowDemoViewController.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "BaseViewController.h" 10 | 11 | @interface UIWindowDemoViewController : BaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories-Demo/Demos/UIKit/UIWindow/UIWindowDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIWindowDemoViewController.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "UIWindowDemoViewController.h" 10 | 11 | @interface UIWindowDemoViewController () 12 | 13 | @end 14 | 15 | @implementation UIWindowDemoViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view from its nib. 20 | } 21 | 22 | - (void)didReceiveMemoryWarning { 23 | [super didReceiveMemoryWarning]; 24 | // Dispose of any resources that can be recreated. 25 | } 26 | 27 | /* 28 | #pragma mark - Navigation 29 | 30 | // In a storyboard-based application, you will often want to do a little preparation before navigation 31 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 32 | // Get the new view controller using [segue destinationViewController]. 33 | // Pass the selected object to the new view controller. 34 | } 35 | */ 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@2x.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Notification-20@3x.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Small.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x-1.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@2x.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-40@3x.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "filename" : "LaunchImage@2x.png", 7 | "extent" : "full-screen", 8 | "minimum-system-version" : "7.0", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "extent" : "full-screen", 13 | "idiom" : "iphone", 14 | "subtype" : "retina4", 15 | "filename" : "LaunchImage_4@2x.png", 16 | "minimum-system-version" : "7.0", 17 | "orientation" : "portrait", 18 | "scale" : "2x" 19 | } 20 | ], 21 | "info" : { 22 | "version" : 1, 23 | "author" : "xcode" 24 | } 25 | } -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/LaunchImage.launchimage/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/LaunchImage.launchimage/LaunchImage@2x.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/LaunchImage.launchimage/LaunchImage_4@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/LaunchImage.launchimage/LaunchImage_4@2x.png -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/diannao.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "diannao.pdf", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /JKCategories-Demo/Images.xcassets/diannao.imageset/diannao.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shaojiankui/JKCategories/19aa969f0a6ed1963c68a00bf01f76dbd127338e/JKCategories-Demo/Images.xcassets/diannao.imageset/diannao.pdf -------------------------------------------------------------------------------- /JKCategories-Demo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. 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 | -------------------------------------------------------------------------------- /JKCategories/CoreData/JKCoreData.h: -------------------------------------------------------------------------------- 1 | // 2 | // JKCoreData.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 16/5/29. 6 | // Copyright © 2016年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #if __has_include() 10 | #import 11 | #import 12 | #import 13 | #import 14 | #import 15 | #import 16 | #import 17 | #else 18 | #import "NSFetchRequest+JKExtensions.h" 19 | #import "NSManagedObject+JKDictionary.h" 20 | #import "NSManagedObject+JKExtensions.h" 21 | #import "NSManagedObjectContext+JKExtensions.h" 22 | #import "NSManagedObjectContext+JKFetching.h" 23 | #import "NSManagedObjectContext+JKFetchRequestsConstructors.h" 24 | #import "NSManagedObjectContext+JKObjectClear.h" 25 | #endif 26 | -------------------------------------------------------------------------------- /JKCategories/CoreData/NSFetchRequest/NSFetchRequest+JKExtensions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSFetchRequest+Extensions.h 3 | // 4 | // Created by Wess Cope on 9/23/11. 5 | // Copyright 2012. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | typedef void (^FetchObjectsCallback)(NSArray *fetchedObjects, NSError *error); 11 | typedef void (^FetchObjectCallback)(id fetchedObject, NSError * error); 12 | 13 | @interface NSFetchRequest(JKExtensions) 14 | 15 | + (id)jk_fetchRequestWithEntity:(NSEntityDescription *)entity; 16 | + (id)jk_fetchRequestWithEntity:(NSEntityDescription *)entity predicate:(NSPredicate *)predicate; 17 | + (id)jk_fetchRequestWithEntity:(NSEntityDescription *)entity sortDescriptors:(NSArray *)sortDescriptors; 18 | + (id)jk_fetchRequestWithEntity:(NSEntityDescription *)entity predicate:(NSPredicate *)predicate sortDescriptors:(NSArray *)sortDescriptors; 19 | 20 | - (id)initWithEntity:(NSEntityDescription *)entity predicate:(NSPredicate *)predicate sortDescriptors:(NSArray *)sortDescriptors; 21 | 22 | @end -------------------------------------------------------------------------------- /JKCategories/CoreData/NSManagedObjectContext/NSManagedObjectContext+JKObjectClear.h: -------------------------------------------------------------------------------- 1 | // 2 | // GON_NSManagedObjectContext+JKObjectClear.h 3 | // 4 | // Created by Nicolas Goutaland on 04/04/15. 5 | // Copyright 2015 Nicolas Goutaland. All rights reserved. 6 | // 7 | #import 8 | 9 | @interface NSManagedObjectContext (JKObjectClear) 10 | /* Delete all given objects*/ 11 | - (void)jk_deleteObjects:(id )objects; 12 | @end 13 | -------------------------------------------------------------------------------- /JKCategories/CoreData/NSManagedObjectContext/NSManagedObjectContext+JKObjectClear.m: -------------------------------------------------------------------------------- 1 | // 2 | // GON_NSManagedObjectContext+ObjectClear.m 3 | // 4 | // Created by Nicolas Goutaland on 04/04/15. 5 | // Copyright 2015 Nicolas Goutaland. All rights reserved. 6 | // 7 | 8 | #import "NSManagedObjectContext+JKObjectClear.h" 9 | 10 | @implementation NSManagedObjectContext (JKObjectClear) 11 | #pragma mark - Utils 12 | - (void)jk_deleteObjects:(id )objects 13 | { 14 | for (id obj in objects) 15 | [self deleteObject:obj]; 16 | } 17 | @end -------------------------------------------------------------------------------- /JKCategories/CoreLocation/JKCoreLocation.h: -------------------------------------------------------------------------------- 1 | // 2 | // JKCoreLocation.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 16/5/29. 6 | // Copyright © 2016年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #if __has_include() 10 | #import 11 | #else 12 | #import "CLLocation+JKCH1903.h" 13 | #endif 14 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSArray/NSArray+JKBlock.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+Block.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSArray (JKBlock) 12 | - (void)jk_each:(void (^)(id object))block; 13 | - (void)jk_eachWithIndex:(void (^)(id object, NSUInteger index))block; 14 | - (NSArray *)jk_map:(id (^)(id object))block; 15 | - (NSArray *)jk_filter:(BOOL (^)(id object))block; 16 | - (NSArray *)jk_reject:(BOOL (^)(id object))block; 17 | - (id)jk_detect:(BOOL (^)(id object))block; 18 | - (id)jk_reduce:(id (^)(id accumulator, id object))block; 19 | - (id)jk_reduce:(id)initial withBlock:(id (^)(id accumulator, id object))block; 20 | @end 21 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSBundle/NSBundle+JKAppIcon.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+JKAppIcon.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | @interface NSBundle (JKAppIcon) 12 | - (NSString*)jk_appIconPath ; 13 | - (UIImage*)jk_appIcon ; 14 | @end 15 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSBundle/NSBundle+JKAppIcon.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSBundle+JKAppIcon.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSBundle+JKAppIcon.h" 10 | 11 | @implementation NSBundle (JKAppIcon) 12 | - (NSString*)jk_appIconPath { 13 | NSString* iconFilename = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIconFile"] ; 14 | NSString* iconBasename = [iconFilename stringByDeletingPathExtension] ; 15 | NSString* iconExtension = [iconFilename pathExtension] ; 16 | return [[NSBundle mainBundle] pathForResource:iconBasename 17 | ofType:iconExtension] ; 18 | } 19 | 20 | - (UIImage*)jk_appIcon { 21 | UIImage*appIcon = [[UIImage alloc] initWithContentsOfFile:[self jk_appIconPath]] ; 22 | return appIcon; 23 | } 24 | @end 25 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSData/NSData+JKAPNSToken.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+JKAPNSToken.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/8/7. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSData (JKAPNSToken) 12 | /** 13 | * @brief 将APNS NSData类型token 格式化成字符串 14 | * 15 | * @return 整理过后的字符串token 16 | */ 17 | - (NSString *)jk_APNSToken; 18 | @end 19 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSData/NSData+JKBase64.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+JKBase64.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/1/26. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSData (JKBase64) 12 | /** 13 | * @brief 字符串base64后转data 14 | * 15 | * @param string 传入字符串 16 | * 17 | * @return 传入字符串 base64后的data 18 | */ 19 | + (NSData *)jk_dataWithBase64EncodedString:(NSString *)string; 20 | /** 21 | * @brief NSData转string 22 | * 23 | * @param wrapWidth 换行长度 76 64 24 | * 25 | * @return base64后的字符串 26 | */ 27 | - (NSString *)jk_base64EncodedStringWithWrapWidth:(NSUInteger)wrapWidth; 28 | /** 29 | * @brief NSData转string 换行长度默认64 30 | * 31 | * @return base64后的字符串 32 | */ 33 | - (NSString *)jk_base64EncodedString; 34 | @end 35 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSData/NSData+JKDataCache.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+SDDataCache.h 3 | // SDCycleScrollView 4 | // 5 | // Created by aier on 15-3-30. 6 | // Copyright (c) 2015年 GSD. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface NSData (JKDataCache) 13 | 14 | /** 15 | * 将URL作为key保存到磁盘里缓存起来 16 | * 17 | * @param identifier url.absoluteString 18 | */ 19 | - (void)jk_saveDataCacheWithIdentifier:(NSString *)identifier; 20 | 21 | /** 22 | * 取出缓存data 23 | * 24 | * @param identifier url.absoluteString 25 | * 26 | * @return 缓存 27 | */ 28 | + (NSData *)jk_getDataCacheWithIdentifier:(NSString *)identifier; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSData/NSData+JKPCM.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+JKPCM.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 16/6/5. 6 | // Copyright © 2016年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | /* 12 | 13 | AudioStreamBasicDescription _format; 14 | _format.mFormatID = kAudioFormatLinearPCM; 15 | _format.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked; 16 | _format.mBitsPerChannel = 16; 17 | _format.mChannelsPerFrame = 1; 18 | _format.mBytesPerPacket = _format.mBytesPerFrame = (_format.mBitsPerChannel / 8) * _format.mChannelsPerFrame; 19 | _format.mFramesPerPacket = 1; 20 | _format.mSampleRate = 8000.0f; 21 | */ 22 | 23 | @interface NSData (JKPCM) 24 | //self raw audio data 25 | 26 | /** 27 | * format wav data 28 | * 29 | * @param PCMFormat format of pcm 30 | * 31 | * @return wav data 32 | */ 33 | - (NSData *)jk_wavDataWithPCMFormat:(AudioStreamBasicDescription)PCMFormat; 34 | @end 35 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSDate/NSDate+JKInternetDateTime.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+InternetDateTime.h 3 | // MWFeedParser 4 | // 5 | // Created by Michael Waterfall on 07/10/2010. 6 | // Copyright 2010 Michael Waterfall. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | // Formatting hints 12 | typedef enum { 13 | DateFormatHintNone, 14 | DateFormatHintRFC822, 15 | DateFormatHintRFC3339 16 | } DateFormatHint; 17 | 18 | // A category to parse internet date & time strings 19 | @interface NSDate (JKInternetDateTime) 20 | 21 | // Get date from RFC3339 or RFC822 string 22 | // - A format/specification hint can be used to speed up, 23 | // otherwise both will be attempted in order to get a date 24 | + (NSDate *)jk_dateFromInternetDateTimeString:(NSString *)dateString 25 | formatHint:(DateFormatHint)hint; 26 | 27 | // Get date from a string using a specific date specification 28 | + (NSDate *)jk_dateFromRFC3339String:(NSString *)dateString; 29 | + (NSDate *)jk_dateFromRFC822String:(NSString *)dateString; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSDate/NSDate+JKLunarCalendar.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+JKLunarCalendar.h 3 | // JKCategories-Demo 4 | // 5 | // Created by Jakey on 2017/10/24. 6 | // Copyright © 2017年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | ///农历大写日期 11 | @interface NSDate (JKLunarCalendar) 12 | + (NSCalendar *)jk_chineseCalendar; 13 | //例如 五月初一 14 | + (NSString*)jk_currentMDDateString; 15 | //例如 乙未年五月初一 16 | + (NSString*)jk_currentYMDDateString; 17 | //例如 星期一 18 | + (NSString *)jk_currentWeek:(NSDate*)date; 19 | //例如 星期一 20 | + (NSString *)jk_currentWeekWithDateString:(NSString*)datestring; 21 | //例如 五月一 22 | + (NSString*)jk_currentCapitalDateString; 23 | @end 24 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSDate/NSDate+JKZeroDate.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDate+JKZeroDate.h 3 | // Jakey 4 | // 5 | // Created by Jakey on 15/5/9. 6 | // Copyright (c) 2015年 Jakey. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDate (JKZeroDate) 12 | /// 时间设置为000000 13 | + (NSDate *)jk_zeroTodayDate; 14 | /// 时间设置为235900 15 | + (NSDate *)jk_zero24TodayDate; 16 | 17 | /// 时间设置为0000 18 | - (NSDate *)jk_zeroDate; 19 | /// 时间设置为235900 20 | - (NSDate *)jk_zero24Date; 21 | @end 22 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSDateFormatter/NSDateFormatter+JKMake.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDateFormatter+Make.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/4/25. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // mobile.dzone.com/news/ios-threadsafe-date-formatting 8 | 9 | #import 10 | 11 | @interface NSDateFormatter (JKMake) 12 | +(NSDateFormatter *)jk_dateFormatterWithFormat:(NSString *)format; 13 | +(NSDateFormatter *)jk_dateFormatterWithFormat:(NSString *)format timeZone:(NSTimeZone *)timeZone; 14 | +(NSDateFormatter *)jk_dateFormatterWithFormat:(NSString *)format timeZone:(NSTimeZone *)timeZone locale:(NSLocale *)locale; 15 | +(NSDateFormatter *)jk_dateFormatterWithDateStyle:(NSDateFormatterStyle)style; 16 | +(NSDateFormatter *)jk_dateFormatterWithDateStyle:(NSDateFormatterStyle)style timeZone:(NSTimeZone *)timeZone; 17 | +(NSDateFormatter *)jk_dateFormatterWithTimeStyle:(NSDateFormatterStyle)style; 18 | +(NSDateFormatter *)jk_dateFormatterWithTimeStyle:(NSDateFormatterStyle)style timeZone:(NSTimeZone *)timeZone; 19 | @end 20 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSDictionary/NSDictionary+JKBlock.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+JKBlock.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/22. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDictionary (JKBlock) 12 | 13 | #pragma mark - RX 14 | - (void)jk_each:(void (^)(id k, id v))block; 15 | - (void)jk_eachKey:(void (^)(id k))block; 16 | - (void)jk_eachValue:(void (^)(id v))block; 17 | - (NSArray *)jk_map:(id (^)(id key, id value))block; 18 | - (NSDictionary *)jk_pick:(NSArray *)keys; 19 | - (NSDictionary *)jk_omit:(NSArray *)key; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSDictionary/NSDictionary+JKJSONString.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+JKJSONString.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/4/25. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDictionary (JKJSONString) 12 | /** 13 | * @brief NSDictionary转换成JSON字符串 14 | * 15 | * @return JSON字符串 16 | */ 17 | -(NSString *)jk_JSONString; 18 | @end 19 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSDictionary/NSDictionary+JKJSONString.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+JKJSONString.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/4/25. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSDictionary+JKJSONString.h" 10 | 11 | @implementation NSDictionary (JKJSONString) 12 | /** 13 | * @brief NSDictionary转换成JSON字符串 14 | * 15 | * @return JSON字符串 16 | */ 17 | -(NSString *)jk_JSONString{ 18 | NSError *error = nil; 19 | NSData *jsonData = [NSJSONSerialization dataWithJSONObject:self 20 | options:NSJSONWritingPrettyPrinted 21 | error:&error]; 22 | if (jsonData == nil) { 23 | #ifdef DEBUG 24 | NSLog(@"fail to get JSON from dictionary: %@, error: %@", self, error); 25 | #endif 26 | return nil; 27 | } 28 | NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; 29 | return jsonString; 30 | } 31 | @end 32 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSDictionary/NSDictionary+JKMerge.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+JKMerge.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/1/25. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDictionary (JKMerge) 12 | /** 13 | * @brief 合并两个NSDictionary 14 | * 15 | * @param dict1 NSDictionary 16 | * @param dict2 NSDictionary 17 | * 18 | * @return 合并后的NSDictionary 19 | */ 20 | + (NSDictionary *)jk_dictionaryByMerging:(NSDictionary *)dict1 with:(NSDictionary *)dict2; 21 | /** 22 | * @brief 并入一个NSDictionary 23 | * 24 | * @param dict NSDictionary 25 | * 26 | * @return 增加后的NSDictionary 27 | */ 28 | - (NSDictionary *)jk_dictionaryByMergingWith:(NSDictionary *)dict; 29 | 30 | #pragma mark - Manipulation 31 | - (NSDictionary *)jk_dictionaryByAddingEntriesFromDictionary:(NSDictionary *)dictionary; 32 | - (NSDictionary *)jk_dictionaryByRemovingEntriesWithKeys:(NSSet *)keys; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSDictionary/NSDictionary+JKURL.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+JKURL.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/8/7. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDictionary (JKURL) 12 | /** 13 | * @brief 将url参数转换成NSDictionary 14 | * 15 | * @param query url参数 16 | * 17 | * @return NSDictionary 18 | */ 19 | + (NSDictionary *)jk_dictionaryWithURLQuery:(NSString *)query; 20 | /** 21 | * @brief 将NSDictionary转换成url 参数字符串 22 | * 23 | * @return url 参数字符串 24 | */ 25 | - (NSString *)jk_URLQueryString2; 26 | @end 27 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSException/NSException+JKTrace.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSException+Trace.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/30. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSException (JKTrace) 12 | - (NSArray *)jk_backtrace; 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSException/NSException+JKTrace.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSException+Trace.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/30. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSException+JKTrace.h" 10 | #include 11 | 12 | @implementation NSException (JKTrace) 13 | - (NSArray *)jk_backtrace 14 | { 15 | NSArray *addresses = self.callStackReturnAddresses; 16 | unsigned count = (int)addresses.count; 17 | void **stack = malloc(count * sizeof(void *)); 18 | 19 | for (unsigned i = 0; i < count; ++i) 20 | stack[i] = (void *)[addresses[i] longValue]; 21 | 22 | char **strings = backtrace_symbols(stack, count); 23 | NSMutableArray *ret = [NSMutableArray arrayWithCapacity:count]; 24 | 25 | for (int i = 0; i < count; ++i) 26 | [ret addObject:@(strings[i])]; 27 | 28 | free(stack); 29 | free(strings); 30 | 31 | return ret; 32 | } 33 | @end 34 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSFileHandle/NSFileHandle+JKReadLine.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileHandle+readLine.h 3 | // 4 | // Created by Ethan Horger on 11/27/12. 5 | // Copyright (c) 2012 Ethan Horger. All rights reserved. 6 | // 7 | // A Cocoa / Objective-C NSFileHandle category that adds the ability to read a file line by line. 8 | //https://github.com/arbalest/NSFileHandle-readLine 9 | #import 10 | 11 | @interface NSFileHandle (JKReadLine) 12 | /** 13 | * @brief A Cocoa / Objective-C NSFileHandle category that adds the ability to read a file line by line. 14 | 15 | * 16 | * @param theDelimier 分隔符 17 | * 18 | * @return An NSData* object is returned with the line if found, or nil if no more lines were found 19 | */ 20 | - (NSData *)jk_readLineWithDelimiter:(NSString *)theDelimier; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSIndexPath/NSIndexPath+JKOffset.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSIndexPath+Offset.h 3 | // 4 | // Created by Nicolas Goutaland on 04/04/15. 5 | // Copyright 2015 Nicolas Goutaland. All rights reserved. 6 | // 7 | #import 8 | @interface NSIndexPath (JKOffset) 9 | /** 10 | * @author JKCategories 11 | * 12 | * Compute previous row indexpath 13 | * 14 | */ 15 | - (NSIndexPath *)jk_previousRow; 16 | /** 17 | * @author JKCategories 18 | * 19 | * Compute next row indexpath 20 | * 21 | */ 22 | - (NSIndexPath *)jk_nextRow; 23 | /** 24 | * @author JKCategories 25 | * 26 | * Compute previous item indexpath 27 | * 28 | */ 29 | - (NSIndexPath *)jk_previousItem; 30 | /** 31 | * @author JKCategories 32 | * 33 | * Compute next item indexpath 34 | * 35 | */ 36 | - (NSIndexPath *)jk_nextItem; 37 | /** 38 | * @author JKCategories 39 | * 40 | * Compute next section indexpath 41 | * 42 | */ 43 | - (NSIndexPath *)jk_nextSection; 44 | /** 45 | * @author JKCategories 46 | * 47 | * Compute previous section indexpath 48 | * 49 | */ 50 | - (NSIndexPath *)jk_previousSection; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSInvocation/NSInvocation+JKBb.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSInvocation+Bb.h 3 | // Bb_revised 4 | // 5 | // Created by Travis Henspeter on 1/21/15. 6 | // Copyright (c) 2015 birdSound. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSInvocation (JKBb) 12 | 13 | 14 | + (id)jk_doInstanceMethodTarget:(id)target 15 | selectorName:(NSString *)selectorName 16 | args:(NSArray *)args; 17 | 18 | + (id)jk_doClassMethod:(NSString *)className 19 | selectorName:(NSString *)selectorName 20 | args:(NSArray *)args; 21 | 22 | - (void)jk_setArgumentWithObject:(id)object atIndex:(NSUInteger)index; 23 | 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSInvocation/NSInvocation+JKBlock.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSInvocation+Block.h 3 | // NSInvocation+Block 4 | // 5 | // Created by deput on 12/11/15. 6 | // Copyright © 2015 deput. All rights reserved. 7 | // 8 | // NSInvocation category to create NSInvocation with block 9 | //https://github.com/deput/NSInvocation-Block 10 | #import 11 | 12 | @interface NSInvocation (JKBlock) 13 | + (instancetype)jk_invocationWithBlock:(id) block; 14 | + (instancetype)jk_invocationWithBlockAndArguments:(id) block ,...; 15 | @end 16 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSNotificationCenter/NSNotificationCenter+JKMainThread.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNotificationCenter+MainThread.h 3 | // Elly 4 | // 5 | // Created by Milot Shala on 1/12/15. 6 | // Copyright (c) 2015 Milot Shala. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSNotificationCenter (JKMainThread) 12 | /** 13 | * @brief 在主线程中发送一条通知 14 | * 15 | * @param notification NSNotification对象 16 | */ 17 | - (void)jk_postNotificationOnMainThread:(NSNotification *)notification; 18 | /** 19 | * @brief 在主线程中发送一条通知 20 | * 21 | * @param aName 用来生成新通知的通知名称 22 | * @param anObject 通知携带的对象 23 | */ 24 | - (void)jk_postNotificationOnMainThreadName:(NSString *)aName object:(id)anObject; 25 | /** 26 | * @brief 在主线程中发送一条通知 27 | * 28 | * @param aName 用来生成新通知的通知名称 29 | * @param anObject 通知携带的对象 30 | * @param aUserInfo 通知携带的用户信息 31 | */ 32 | - (void)jk_postNotificationOnMainThreadName:(NSString *)aName object:(id)anObject userInfo:(NSDictionary *)aUserInfo; 33 | 34 | @end -------------------------------------------------------------------------------- /JKCategories/Foundation/NSNumber/NSDecimalNumber+JKCalculatingByString.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDecimalNumber+CalculatingByString.h 3 | // NSDecimalNumber+StringCalculation 4 | // 5 | // Created by Adi Li on 11/5/14. 6 | // Copyright (c) 2014 Adi Li. All rights reserved. 7 | // 8 | // https://github.com/adi-li/NSDecimalNumber-StringCalculation 9 | 10 | #import 11 | 12 | @interface NSDecimalNumber (JKCalculatingByString) 13 | /** 14 | * @author JKCategories 15 | * 16 | * use string calculation for nsdecimalnumber, for simplicity when doing much calculation works. 17 | * 18 | * @param equation <#equation description#> 19 | * @param numbers <#numbers description#> 20 | * 21 | * @return <#return value description#> 22 | */ 23 | + (NSDecimalNumber *)jk_decimalNumberWithEquation:(NSString *)equation decimalNumbers:(NSDictionary *)numbers; 24 | @end 25 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSNumber/NSNumber+JKCGFloat.h: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // NSNumber+CGFloat.h 4 | // 5 | // Created by Alexey Aleshkov on 16.02.14. 6 | // Copyright (c) 2014 Alexey Aleshkov. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | @interface NSNumber (JKCGFloat) 12 | 13 | - (CGFloat)jk_CGFloatValue; 14 | 15 | - (id)initWithJKCGFloat:(CGFloat)value; 16 | 17 | + (NSNumber *)jk_numberWithCGFloat:(CGFloat)value; 18 | 19 | @end -------------------------------------------------------------------------------- /JKCategories/Foundation/NSNumber/NSNumber+JKCGFloat.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumber+CGFloat.m 3 | // 4 | // Created by Alexey Aleshkov on 16.02.14. 5 | // Copyright (c) 2014 Alexey Aleshkov. All rights reserved. 6 | // 7 | 8 | #import "NSNumber+JKCGFloat.h" 9 | 10 | @implementation NSNumber (JKCGFloat) 11 | 12 | - (CGFloat)jk_CGFloatValue 13 | { 14 | #if (CGFLOAT_IS_DOUBLE == 1) 15 | CGFloat result = [self doubleValue]; 16 | #else 17 | CGFloat result = [self floatValue]; 18 | #endif 19 | return result; 20 | } 21 | 22 | - (id)initWithJKCGFloat:(CGFloat)value 23 | { 24 | #if (CGFLOAT_IS_DOUBLE == 1) 25 | self = [self initWithDouble:value]; 26 | #else 27 | self = [self initWithFloat:value]; 28 | #endif 29 | return self; 30 | } 31 | 32 | + (NSNumber *)jk_numberWithCGFloat:(CGFloat)value 33 | { 34 | NSNumber *result = [[self alloc] initWithJKCGFloat:value]; 35 | return result; 36 | } 37 | 38 | @end -------------------------------------------------------------------------------- /JKCategories/Foundation/NSNumber/NSNumber+JKRomanNumerals.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumber+RomanNumerals.h 3 | // SalesBagStandalone 4 | // 5 | // Created by Patrick Zearfoss on 10/19/11. 6 | // 7 | 8 | //https://github.com/pzearfoss/NSNumber-RomanNumerals 9 | #import 10 | 11 | @interface NSNumber (JKRomanNumerals) 12 | /** 13 | * @author JKCategories 14 | * 15 | * A category on NSNumber that returns the value as a roman numeral 16 | * 17 | * @return 罗马数字格式的字符串 18 | */ 19 | - (NSString *)jk_romanNumeral; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSNumber/NSNumber+JKRomanNumerals.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumber+RomanNumerals.m 3 | // SalesBagStandalone 4 | // 5 | // Created by Patrick Zearfoss on 10/19/11. 6 | // 7 | 8 | #import "NSNumber+JKRomanNumerals.h" 9 | 10 | @implementation NSNumber (JKRomanNumerals) 11 | 12 | - (NSString *)jk_romanNumeral 13 | { 14 | NSInteger n = [self integerValue]; 15 | 16 | NSArray *numerals = [NSArray arrayWithObjects:@"M", @"CM", @"D", @"CD", @"C", @"XC", @"L", @"XL", @"X", @"IX", @"V", @"IV", @"I", nil]; 17 | 18 | NSUInteger valueCount = 13; 19 | NSUInteger values[] = {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}; 20 | 21 | NSMutableString *numeralString = [NSMutableString string]; 22 | 23 | for (NSUInteger i = 0; i < valueCount; i++) 24 | { 25 | while (n >= values[i]) 26 | { 27 | n -= values[i]; 28 | [numeralString appendString:[numerals objectAtIndex:i]]; 29 | } 30 | } 31 | 32 | return numeralString; 33 | 34 | } 35 | 36 | @end -------------------------------------------------------------------------------- /JKCategories/Foundation/NSNumber/NSNumber+JKRound.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSNumber+Round.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/23. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSNumber (JKRound) 12 | /* 展示 */ 13 | - (NSString*)jk_toDisplayNumberWithDigit:(NSInteger)digit; 14 | - (NSString*)jk_toDisplayPercentageWithDigit:(NSInteger)digit; 15 | 16 | /* 四舍五入 */ 17 | /** 18 | * @brief 四舍五入 19 | * 20 | * @param digit 限制最大位数 21 | * 22 | * @return 结果 23 | */ 24 | - (NSNumber*)jk_doRoundWithDigit:(NSUInteger)digit; 25 | /** 26 | * @brief 取上整 27 | * 28 | * @param digit 限制最大位数 29 | * 30 | * @return 结果 31 | */ 32 | - (NSNumber*)jk_doCeilWithDigit:(NSUInteger)digit; 33 | /** 34 | * @brief 取下整 35 | * 36 | * @param digit 限制最大位数 37 | * 38 | * @return 结果 39 | */ 40 | - (NSNumber*)jk_doFloorWithDigit:(NSUInteger)digit; 41 | @end 42 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSObject/NSObject+JKAddProperty.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+JKAddProperty.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | //objc_getAssociatedObject和objc_setAssociatedObject都需要指定一个固定的地址,这个固定的地址值用来表示属性的key,起到一个常量的作用。 11 | //static const void *JKStringProperty = &JKStringProperty; 12 | //static char IntegerProperty; 13 | //@selector(methodName:) 14 | 15 | @interface NSObject (JKAddProperty) 16 | /** 17 | * @brief catgory runtime实现get set方法增加一个字符串属性 18 | */ 19 | @property (nonatomic,strong) NSString *jk_stringProperty; 20 | /** 21 | * @brief catgory runtime实现get set方法增加一个NSInteger属性 22 | */ 23 | @property (nonatomic,assign) NSInteger jk_integerProperty; 24 | @end 25 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSObject/NSObject+JKAppInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+JKAppInfo.h 3 | // JKCategories 4 | // 5 | // Created by nidom on 15/9/29. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSObject (JKAppInfo) 12 | -(NSString *)jk_version; 13 | -(NSInteger)jk_build; 14 | -(NSString *)jk_identifier; 15 | -(NSString *)jk_currentLanguage; 16 | -(NSString *)jk_deviceModel; 17 | @end 18 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSObject/NSObject+JKAssociatedObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+JKAssociatedObject.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/11. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface NSObject (JKAssociatedObject) 13 | /** 14 | * @brief 附加一个stong对象 15 | * 16 | * @param value 被附加的对象 17 | * @param key 被附加对象的key 18 | */ 19 | - (void)jk_associateValue:(id)value withKey:(void *)key; // Strong reference 20 | /** 21 | * @brief 附加一个weak对象 22 | * 23 | * @param value 被附加的对象 24 | * @param key 被附加对象的key 25 | */ 26 | - (void)jk_weaklyAssociateValue:(id)value withKey:(void *)key; 27 | 28 | /** 29 | * @brief 根据附加对象的key取出附加对象 30 | * 31 | * @param key 附加对象的key 32 | * 33 | * @return 附加对象 34 | */ 35 | - (id)jk_associatedValueForKey:(void *)key; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSObject/NSObject+JKBlocks.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+JKBlocks.h 3 | // PSFoundation 4 | // 5 | // Created by Peter Steinberger on 24.10.10. 6 | // Copyright 2010 Peter Steinberger. All rights reserved. 7 | // 8 | #import 9 | #import 10 | 11 | @interface NSObject (JKBlocks) 12 | + (id)jk_performBlock:(void (^)(void))block afterDelay:(NSTimeInterval)delay; 13 | + (id)jk_performBlock:(void (^)(id arg))block withObject:(id)anObject afterDelay:(NSTimeInterval)delay; 14 | - (id)jk_performBlock:(void (^)(void))block afterDelay:(NSTimeInterval)delay; 15 | - (id)jk_performBlock:(void (^)(id arg))block withObject:(id)anObject afterDelay:(NSTimeInterval)delay; 16 | + (void)jk_cancelBlock:(id)block; 17 | + (void)jk_cancelPreviousPerformBlock:(id)aWrappingBlockHandle __attribute__ ((deprecated)); 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSObject/NSObject+JKEasyCopy.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+JKEasyCopy.h 3 | // NSObject-JKEasyCopy 4 | // 5 | // Created by York on 15/12/1. 6 | // Copyright © 2015年 YK-Unit. All rights reserved. 7 | // 8 | 9 | #import 10 | // a copy category for NSObject 11 | @interface NSObject (JKEasyCopy) 12 | 13 | /** 14 | * 浅复制目标的所有属性 15 | * 16 | * @param instance 目标对象 17 | * 18 | * @return BOOL—YES:复制成功,NO:复制失败 19 | */ 20 | - (BOOL)jk_easyShallowCopy:(NSObject *)instance; 21 | 22 | /** 23 | * 深复制目标的所有属性 24 | * 25 | * @param instance 目标对象 26 | * 27 | * @return BOOL—YES:复制成功,NO:复制失败 28 | */ 29 | - (BOOL)jk_easyDeepCopy:(NSObject *)instance; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSObject/NSObject+JKGCD.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+JKGCD.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | @interface NSObject (JKGCD) 11 | /** 12 | * @brief 异步执行代码块 13 | * 14 | * @param block 代码块 15 | */ 16 | - (void)jk_performAsynchronous:(void(^)(void))block; 17 | /** 18 | * @brief GCD主线程执行代码块 19 | * 20 | * @param block 代码块 21 | * @param wait 是否同步请求 22 | */ 23 | - (void)jk_performOnMainThread:(void(^)(void))block wait:(BOOL)wait; 24 | 25 | /** 26 | * @brief 延迟执行代码块 27 | * 28 | * @param seconds 延迟时间 秒 29 | * @param block 代码块 30 | */ 31 | - (void)jk_performAfter:(NSTimeInterval)seconds block:(void(^)(void))block; 32 | @end -------------------------------------------------------------------------------- /JKCategories/Foundation/NSSet/NSSet+JKBlock.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSSet+Block.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSSet (JKBlock) 12 | - (void)jk_each:(void (^)(id))block; 13 | - (void)jk_eachWithIndex:(void (^)(id, int))block; 14 | - (NSArray *)jk_map:(id (^)(id object))block; 15 | - (NSArray *)jk_select:(BOOL (^)(id object))block; 16 | - (NSArray *)jk_reject:(BOOL (^)(id object))block; 17 | - (NSArray *)jk_sort; 18 | - (id)jk_reduce:(id(^)(id accumulator, id object))block; 19 | - (id)jk_reduce:(id)initial withBlock:(id(^)(id accumulator, id object))block; 20 | @end 21 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSString/NSString+JKBase64.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+JKBase64.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/2/8. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (JKBase64) 12 | + (NSString *)jk_stringWithBase64EncodedString:(NSString *)string; 13 | - (NSString *)jk_base64EncodedStringWithWrapWidth:(NSUInteger)wrapWidth; 14 | - (NSString *)jk_base64EncodedString; 15 | - (NSString *)jk_base64DecodedString; 16 | - (NSData *)jk_base64DecodedData; 17 | @end 18 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSString/NSString+JKContains.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+Contains.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by 符现超 on 15/5/9. 6 | // Copyright (c) 2015年 http://weibo.com/u/1655766025 All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (JKContains) 12 | /** 13 | * @brief 判断URL中是否包含中文 14 | * 15 | * @return 是否包含中文 16 | */ 17 | - (BOOL)jk_isContainChinese; 18 | /** 19 | * @brief 是否包含空格 20 | * 21 | * @return 是否包含空格 22 | */ 23 | - (BOOL)jk_isContainBlank; 24 | 25 | /** 26 | * @brief Unicode编码的字符串转成NSString 27 | * 28 | * @return Unicode编码的字符串转成NSString 29 | */ 30 | - (NSString *)jk_makeUnicodeToString; 31 | 32 | - (BOOL)jk_containsCharacterSet:(NSCharacterSet *)set; 33 | /** 34 | * @brief 是否包含字符串 35 | * 36 | * @param string 字符串 37 | * 38 | * @return YES, 包含; 39 | */ 40 | - (BOOL)jk_containsaString:(NSString *)string; 41 | /** 42 | * @brief 获取字符数量 43 | */ 44 | - (int)jk_wordsCount; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSString/NSString+JKDictionaryValue.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+JKDictionary.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14-6-13. 6 | // Copyright (c) 2014年 jakey. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (JKDictionaryValue) 12 | /** 13 | * @brief JSON字符串转成NSDictionary 14 | * 15 | * @return NSDictionary 16 | */ 17 | -(NSDictionary *)jk_dictionaryValue; 18 | @end 19 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSString/NSString+JKDictionaryValue.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+JKDictionary.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14-6-13. 6 | // Copyright (c) 2014年 jakey. All rights reserved. 7 | // 8 | 9 | #import "NSString+JKDictionaryValue.h" 10 | 11 | @implementation NSString (JKDictionaryValue) 12 | /** 13 | * @brief JSON字符串转成NSDictionary 14 | * 15 | * @return NSDictionary 16 | */ 17 | -(NSDictionary *)jk_dictionaryValue{ 18 | NSError *errorJson; 19 | NSDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:[self dataUsingEncoding:NSUTF8StringEncoding] options:kNilOptions error:&errorJson]; 20 | if (errorJson != nil) { 21 | #ifdef DEBUG 22 | NSLog(@"fail to get dictioanry from JSON: %@, error: %@", self, errorJson); 23 | #endif 24 | } 25 | return jsonDict; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSString/NSString+JKMIME.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+JKMIME.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/22. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (JKMIME) 12 | /** 13 | * @brief 根据文件url 返回对应的MIMEType 14 | * 15 | * @return MIMEType 16 | */ 17 | - (NSString *)jk_MIMEType; 18 | /** 19 | * @brief 根据文件url后缀 返回对应的MIMEType 20 | * 21 | * @return MIMEType 22 | */ 23 | + (NSString *)jk_MIMETypeForExtension:(NSString *)extension; 24 | /** 25 | * @brief 常见MIME集合 26 | * 27 | * @return 常见MIME集合 28 | */ 29 | + (NSDictionary *)jk_MIMEDict; 30 | @end 31 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSString/NSString+JKMatcher.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+JKMatcher.h 3 | // Whyd 4 | // 5 | // Created by Damien Romito on 29/01/15. 6 | // Copyright (c) 2015 Damien Romito. All rights reserved. 7 | // 8 | //https://github.com/damienromito/NSString-Matcher 9 | #import 10 | @interface NSString(JKMatcher) 11 | - (NSArray *)jk_matchWithRegex:(NSString *)regex; 12 | - (NSString *)jk_matchWithRegex:(NSString *)regex atIndex:(NSUInteger)index; 13 | - (NSString *)jk_firstMatchedGroupWithRegex:(NSString *)regex; 14 | - (NSTextCheckingResult *)jk_firstMatchedResultWithRegex:(NSString *)regex; 15 | @end -------------------------------------------------------------------------------- /JKCategories/Foundation/NSString/NSString+JKPinyin.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+JKPinyin.h 3 | // Snowball 4 | // 5 | // Created by croath on 11/11/13. 6 | // Copyright (c) 2013 Snowball. All rights reserved. 7 | // 8 | // https://github.com/croath/NSString-Pinyin 9 | // the Chinese Pinyin string of the nsstring 10 | 11 | #import 12 | 13 | @interface NSString (JKPinyin) 14 | 15 | - (NSString*)jk_pinyinWithPhoneticSymbol; 16 | - (NSString*)jk_pinyin; 17 | - (NSArray*)jk_pinyinArray; 18 | - (NSString*)jk_pinyinWithoutBlank; 19 | - (NSArray*)jk_pinyinInitialsArray; 20 | - (NSString*)jk_pinyinInitialsString; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSString/NSString+JKRemoveEmoji.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+JKRemoveEmoji.h 3 | // NSString+RemoveEmoji 4 | // 5 | // Created by Jakey on 15/5/13. 6 | // Copyright (c) 2015年 Jakey. All rights reserved. 7 | // 8 | #import 9 | 10 | @interface NSString (JKRemoveEmoji) 11 | ///移除所有emoji,以“”替换 12 | - (NSString *)jk_removingEmoji; 13 | ///移除所有emoji,以“”替换 14 | - (NSString *)jk_stringByRemovingEmoji; 15 | ///移除所有emoji,以string替换 16 | - (NSString *)jk_stringByReplaceingEmojiWithString:(NSString*)string; 17 | 18 | ///字符串是否包含emoji 19 | - (BOOL)jk_containsEmoji; 20 | ///字符串中包含的所有emoji unicode格式 21 | - (NSArray*)jk_allEmoji; 22 | ///字符串中包含的所有emoji 23 | - (NSString *)jk_allEmojiString; 24 | ///字符串中包含的所有emoji rang 25 | - (NSArray*)jk_allEmojiRanges; 26 | 27 | ///所有emoji表情 28 | + (NSString*)jk_allSystemEmoji; 29 | @end 30 | 31 | @interface NSCharacterSet (JKEmojiCharacterSet) 32 | + (NSCharacterSet *)jk_emojiCharacterSet; 33 | @end 34 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSString/NSString+JKScore.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+JKScore.h 3 | // 4 | // Created by Nicholas Bruning on 5/12/11. 5 | // Copyright (c) 2011 Involved Pty Ltd. All rights reserved. 6 | // 7 | 8 | #import 9 | #import 10 | 11 | typedef NS_OPTIONS(NSUInteger, NSStringJKScoreOption) { 12 | NSStringJKScoreOptionNone = 1 << 0, 13 | NSStringJKScoreOptionFavorSmallerWords = 1 << 1, 14 | NSStringJKScoreOptionReducedLongStringPenalty = 1 << 2 15 | }; 16 | 17 | //模糊匹配字符串 查找某两个字符串的相似程度 18 | @interface NSString (JKScore) 19 | 20 | - (CGFloat)jk_scoreAgainst:(NSString *)otherString; 21 | - (CGFloat)jk_scoreAgainst:(NSString *)otherString fuzziness:(NSNumber *)fuzziness; 22 | - (CGFloat)jk_scoreAgainst:(NSString *)otherString fuzziness:(NSNumber *)fuzziness options:(NSStringJKScoreOption)options; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSString/NSString+JKStringPages.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+XHStringPages.h 3 | // XHStringPages 4 | // 5 | // Created by 曾 宪华 on 13-12-20. 6 | // Copyright (c) 2013年 曾宪华 开发团队(http://iyilunba.com ) 本人QQ:543413507. All rights reserved. 7 | // 8 | // XHStringPages是一款解决长字符串分页的功能。功能特性如下:1、分页比较准确 2、根据CGRect来计算页数 3、利用多线程加载和分页 9 | 10 | #import 11 | #import 12 | @interface NSString (JKStringPages) 13 | /** 14 | * 根据字符串进行分页 15 | * 16 | * @param cache 需要进行分页的字符串 17 | * @param font 你想显示的字体大小,这个要保持统一 18 | * @param r 你想在多大的窗口显示 19 | * 20 | * @return 返回一个数组,数组的元素是NSrange,根据NSRange来进行截取字符串 21 | */ 22 | - (NSArray *)jk_getPagesOfString:(NSString *)cache 23 | withFont:(UIFont*)font 24 | inRect:(CGRect)r; 25 | @end 26 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSString/NSString+JKTrims.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+JKTrims.h.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/3/29. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (JKTrims) 12 | /** 13 | * @brief 清除html标签 14 | * 15 | * @return 清除后的结果 16 | */ 17 | - (NSString *)jk_stringByStrippingHTML; 18 | /** 19 | * @brief 清除js脚本 20 | * 21 | * @return 清楚js后的结果 22 | */ 23 | - (NSString *)jk_stringByRemovingScriptsAndStrippingHTML; 24 | /** 25 | * @brief 去除空格 26 | * 27 | * @return 去除空格后的字符串 28 | */ 29 | - (NSString *)jk_trimmingWhitespace; 30 | /** 31 | * @brief 去除字符串与空行 32 | * 33 | * @return 去除字符串与空行的字符串 34 | */ 35 | - (NSString *)jk_trimmingWhitespaceAndNewlines; 36 | @end 37 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSString/NSString+JKUUID.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+JKUUID.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/30. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (JKUUID) 12 | /** 13 | * @brief 获取随机 UUID 例如 E621E1F8-C36C-495A-93FC-0C247A3E6E5F 14 | * 15 | * @return 随机 UUID 16 | */ 17 | + (NSString *)jk_UUID; 18 | /** 19 | * 20 | * @brief 毫秒时间戳 例如 1443066826371 21 | * 22 | * @return 毫秒时间戳 23 | */ 24 | + (NSString *)jk_UUIDTimestamp; 25 | @end 26 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSString/NSString+JKXMLDictionary.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+XMLDictionary.h 3 | // Created by Hyde, Andrew on 3/20/13. 4 | // A simple converter from a string containing XML to an NSDictionary, backed by NSXMLParser. 5 | // Will return nil if there has been an error. 6 | 7 | /* 8 | 9 | #import "NSString+XMLDictionary.h" 10 | 11 | ... 12 | 13 | NSString *XMLString = @"data"; 14 | NSDictionary *XMLAsDictionary = [XMLString XMLDictionary]; 15 | 16 | */ 17 | 18 | //https://github.com/AndrewHydeJr/NSString-XML 19 | #import 20 | 21 | @interface NSString (XML) 22 | /** 23 | * @brief xml字符串转换成NSDictionary 24 | * 25 | * @return NSDictionary 26 | */ 27 | -(NSDictionary *)jk_XMLDictionary; 28 | 29 | @end -------------------------------------------------------------------------------- /JKCategories/Foundation/NSTimer/NSTimer+JKAddition.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSTimer+JKAddition.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSTimer (JKAddition) 12 | /** 13 | * @brief 暂停NSTimer 14 | */ 15 | - (void)jk_pauseTimer; 16 | /** 17 | * @brief 开始NSTimer 18 | */ 19 | - (void)jk_resumeTimer; 20 | /** 21 | * @brief 延迟开始NSTimer 22 | */ 23 | - (void)jk_resumeTimerAfterTimeInterval:(NSTimeInterval)interval; 24 | @end 25 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSTimer/NSTimer+JKAddition.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSTimer+JKAddition.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "NSTimer+JKAddition.h" 10 | 11 | @implementation NSTimer (JKAddition) 12 | /** 13 | * @brief 暂停NSTimer 14 | */ 15 | -(void)jk_pauseTimer 16 | { 17 | if (![self isValid]) { 18 | return ; 19 | } 20 | [self setFireDate:[NSDate distantFuture]]; 21 | } 22 | /** 23 | * @brief 开始NSTimer 24 | */ 25 | -(void)jk_resumeTimer 26 | { 27 | if (![self isValid]) { 28 | return ; 29 | } 30 | [self setFireDate:[NSDate date]]; 31 | } 32 | /** 33 | * @brief 延迟开始NSTimer 34 | */ 35 | - (void)jk_resumeTimerAfterTimeInterval:(NSTimeInterval)interval 36 | { 37 | if (![self isValid]) { 38 | return ; 39 | } 40 | [self setFireDate:[NSDate dateWithTimeIntervalSinceNow:interval]]; 41 | } 42 | @end 43 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSURL/NSURL+JKParam.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSURL+Param.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/30. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSURL (JKParam) 12 | /** 13 | * @brief url参数转字典 14 | * 15 | * @return 参数转字典结果 16 | */ 17 | - (NSDictionary *)jk_parameters; 18 | /** 19 | * @brief 根据参数名 取参数值 20 | * 21 | * @param parameterKey 参数名的key 22 | * 23 | * @return 参数值 24 | */ 25 | - (NSString *)jk_valueForParameter:(NSString *)parameterKey; 26 | @end 27 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSURLConnection/NSURLConnection+JKSelfSigned.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSURLConnection+SelfSigned.h 3 | // SAB Connect 4 | // 5 | // Created by Yuriy on 8/18/14. 6 | // Copyright (c) 2014 yuriy. All rights reserved. 7 | // 8 | // A category on NSURLConnection that allows making async requests that accept all https certificates. 9 | //https://github.com/yuriy128/NSURLConnection-SelfSigned 10 | #import 11 | 12 | @interface NSURLConnection (JKSelfSigned) 13 | /** 14 | * @author JKCategories 15 | * 16 | * Sends async request while accepting all self-signed certs 17 | * 18 | */ 19 | + (void)jk_sendAsynchronousRequestAcceptingAllCerts:(NSURLRequest *)request queue:(NSOperationQueue *)queue completionHandler:(void (^)(NSURLResponse *, NSData *, NSError *))handler; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /JKCategories/Foundation/NSUserDefaults/NSUserDefaults+JKiCloudSync.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSUserDefaults+iCloudSync.h 3 | // 4 | // Created by Riccardo Paolillo on 09/05/13. 5 | // Copyright (c) 2013. All rights reserved. 6 | // 7 | // https://github.com/RiccardoPaolillo/NSUserDefault-iCloud 8 | // A very simple iOS Category for synchronize NSUserDefaults with iCloud (NSUbiquitousKeyValueStore) 9 | 10 | #import 11 | 12 | @interface NSUserDefaults (JKiCloudSync) 13 | 14 | -(void)jk_setValue:(id)value forKey:(NSString *)key iCloudSync:(BOOL)sync; 15 | -(void)jk_setObject:(id)value forKey:(NSString *)key iCloudSync:(BOOL)sync; 16 | 17 | -(id)jk_valueForKey:(NSString *)key iCloudSync:(BOOL)sync; 18 | -(id)jk_objectForKey:(NSString *)key iCloudSync:(BOOL)sync; 19 | 20 | -(BOOL)jk_synchronizeAlsoiCloudSync:(BOOL)sync; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /JKCategories/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /JKCategories/JKCategories.h: -------------------------------------------------------------------------------- 1 | // 2 | // JKCategories.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 16/5/30. 6 | // Copyright © 2016年 www.skyfox.org. All rights reserved. 7 | // 8 | #import 9 | 10 | 11 | #if __has_include() 12 | FOUNDATION_EXPORT double JKCategoriesVersionNumber; 13 | //! Project version string for JKCategories. 14 | FOUNDATION_EXPORT const unsigned char JKCategoriesVersionString[]; 15 | // In this header, you should import all the public headers of your framework using statements like #import 16 | #import 17 | #import 18 | #import 19 | #import 20 | #import 21 | #import 22 | #else 23 | #import "JKUIKit.h" 24 | #import "JKQuartzCore.h" 25 | #import "JKCoreData.h" 26 | #import "JKFoundation.h" 27 | #import "JKMapKit.h" 28 | #import "JKCoreLocation.h" 29 | #endif 30 | -------------------------------------------------------------------------------- /JKCategories/MapKit/JKMapKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // JKMapKit.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 16/5/29. 6 | // Copyright © 2016年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #if __has_include() 10 | #import 11 | #import 12 | #import 13 | #else 14 | #import "MKMapView+JKBetterMaps.h" 15 | #import "MKMapView+JKMoveLogo.h" 16 | #import "MKMapView+JKZoomLevel.h" 17 | #endif 18 | -------------------------------------------------------------------------------- /JKCategories/MapKit/MKMapView/MKMapView+JKBetterMaps.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKMapView+BetterMaps.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/23. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // https://github.com/xjunior/BetterMaps 8 | 9 | 10 | #import 11 | #import 12 | 13 | @interface MKMapView (JKBetterMaps) 14 | - (void)jk_zoomToFitAnnotationsAnimated:(BOOL)animated; 15 | @end -------------------------------------------------------------------------------- /JKCategories/MapKit/MKMapView/MKMapView+JKBetterMaps.m: -------------------------------------------------------------------------------- 1 | // 2 | // MKMapView+BetterMaps.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/23. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "MKMapView+JKBetterMaps.h" 10 | 11 | @implementation MKMapView (JKBetterMaps) 12 | 13 | - (void)jk_zoomToFitAnnotationsAnimated:(BOOL)animated { 14 | MKMapRect zoomRect = MKMapRectNull; 15 | for (id annotation in self.annotations) 16 | { 17 | MKMapPoint annotationPoint = MKMapPointForCoordinate(annotation.coordinate); 18 | MKMapRect pointRect = MKMapRectMake(annotationPoint.x, annotationPoint.y, 0.1, 0.1); 19 | zoomRect = MKMapRectUnion(zoomRect, pointRect); 20 | } 21 | [self setVisibleMapRect:zoomRect animated:animated]; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /JKCategories/MapKit/MKMapView/MKMapView+JKMoveLogo.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKMapView+MoveLogo.h 3 | // 4 | // Created by Maciej Swic on 2013-07-08. 5 | // Released under the MIT license. 6 | // 7 | // This category allows you to move the MKMapView logo so that it remains visible if you 8 | // put other stuff on the mapview. If the logo is hidden, the app won't pass the App Store 9 | // review. Tested with iOS 5 through 7. 10 | // 11 | 12 | #import 13 | 14 | @interface MKMapView (JKMoveLogo) 15 | 16 | - (void)jk_moveLogoByOffset:(CGPoint)offset; 17 | - (void)jk_moveLogoToPoint:(CGPoint)point; 18 | - (UIView*)jk_logo; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /JKCategories/MapKit/MKMapView/MKMapView+JKZoomLevel.h: -------------------------------------------------------------------------------- 1 | // 2 | // MKMapView+ZoomLevel.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/4/1. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | //http://troybrant.net/blog/2010/01/set-the-zoom-level-of-an-mkmapview/ 10 | 11 | #import 12 | 13 | @interface MKMapView (JKZoomLevel) 14 | 15 | - (void)jk_setCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate 16 | zoomLevel:(NSUInteger)zoomLevel 17 | animated:(BOOL)animated; 18 | 19 | @end -------------------------------------------------------------------------------- /JKCategories/QuartzCore/CALayer/CALayer+JKBorderColor.h: -------------------------------------------------------------------------------- 1 | // 2 | // CALayer+JKBorderColor.h 3 | // test 4 | // 5 | // Created by LiuLogan on 15/6/17. 6 | // Copyright (c) 2015年 100apps. All rights reserved. 7 | // http://www.gfzj.us/tech/2015/06/18/set-uiview-bordercolor-and-backgroundimage-in-interface-builder.html 8 | // http://stackoverflow.com/a/27986696/3825920 9 | 10 | #import 11 | #import 12 | @interface CALayer (JKBorderColor) 13 | /** 14 | * @author JKCategories 15 | * 16 | * layer边框颜色 17 | */ 18 | @property(nonatomic, assign) UIColor *jk_borderColor; 19 | @end 20 | -------------------------------------------------------------------------------- /JKCategories/QuartzCore/CALayer/CALayer+JKBorderColor.m: -------------------------------------------------------------------------------- 1 | // 2 | // CALayer+JKBorderColor.m 3 | // test 4 | // 5 | // Created by LiuLogan on 15/6/17. 6 | // Copyright (c) 2015年 Xidibuy. All rights reserved. 7 | // 8 | 9 | #import "CALayer+JKBorderColor.h" 10 | 11 | @implementation CALayer (JKBorderColor) 12 | 13 | -(void)setJk_borderColor:(UIColor *)jk_borderColor{ 14 | self.borderColor = jk_borderColor.CGColor; 15 | } 16 | 17 | - (UIColor*)jk_borderColor { 18 | return [UIColor colorWithCGColor:self.borderColor]; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /JKCategories/QuartzCore/CATransaction/CATransaction+JKAnimateWithDuration.h: -------------------------------------------------------------------------------- 1 | // 2 | // CATransaction+JKAnimateWithDuration.h 3 | // ShapesExample 4 | // 5 | // Created by Denys Telezhkin on 20.09.14. 6 | // Copyright (c) 2014 Denys Telezhkin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #if __has_feature(nullability) // Xcode 6.3+ 12 | #pragma clang assume_nonnull begin 13 | #else 14 | #define nullable 15 | #define __nullable 16 | #endif 17 | 18 | @interface CATransaction (JKAnimateWithDuration) 19 | /** 20 | * @author Denys Telezhkin 21 | * 22 | * @brief CATransaction 动画执行 block 回调 23 | * 24 | * @param duration 动画时间 25 | * @param animations 动画块 26 | * @param completion 动画结束回调 27 | */ 28 | +(void)jk_animateWithDuration:(NSTimeInterval)duration 29 | animations:(nullable void (^)(void))animations 30 | completion:(nullable void (^)(void))completion; 31 | 32 | @end 33 | 34 | #if __has_feature(nullability) 35 | #pragma clang assume_nonnull end 36 | #endif 37 | -------------------------------------------------------------------------------- /JKCategories/QuartzCore/CATransaction/CATransaction+JKAnimateWithDuration.m: -------------------------------------------------------------------------------- 1 | // 2 | // CATransaction+AnimateWithDuration.m 3 | // ShapesExample 4 | // 5 | // Created by Denys Telezhkin on 20.09.14. 6 | // Copyright (c) 2014 Denys Telezhkin. All rights reserved. 7 | // 8 | 9 | #import "CATransaction+JKAnimateWithDuration.h" 10 | 11 | @implementation CATransaction (JKAnimateWithDuration) 12 | /** 13 | * @author Denys Telezhkin 14 | * 15 | * @brief CATransaction 动画执 block回调 16 | * 17 | * @param duration 动画时间 18 | * @param animations 动画块 19 | * @param completion 动画结束回调 20 | */ 21 | +(void)jk_animateWithDuration:(NSTimeInterval)duration 22 | animations:(void (^)(void))animations 23 | completion:(void (^)(void))completion 24 | { 25 | [CATransaction begin]; 26 | [CATransaction setAnimationDuration:duration]; 27 | 28 | if (completion) 29 | { 30 | [CATransaction setCompletionBlock:completion]; 31 | } 32 | 33 | if (animations) 34 | { 35 | animations(); 36 | } 37 | [CATransaction commit]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /JKCategories/QuartzCore/JKQuartzCore.h: -------------------------------------------------------------------------------- 1 | // 2 | // JKQuartzCore.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 16/5/29. 6 | // Copyright © 2016年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #if __has_include() 10 | #import 11 | #import 12 | #import 13 | #import 14 | #import 15 | #else 16 | #import "CAAnimation+JKEasingEquations.h" 17 | #import "CALayer+JKBorderColor.h" 18 | #import "CAMediaTimingFunction+JKAdditionalEquations.h" 19 | #import "CAShapeLayer+JKUIBezierPath.h" 20 | #import "CATransaction+JKAnimateWithDuration.h" 21 | #endif 22 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIApplication/UIApplication+JKApplicationSize.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIApplication+JKApplicationSize.h 3 | // testSize 4 | // 5 | // Created by Ignazio Calo on 23/01/15. 6 | // Copyright (c) 2015 IgnazioC. All rights reserved. 7 | // https://github.com/ignazioc/iOSApplicationSize 8 | // A small category on UIApplication used to calculate the size of the running iOS applicaiton. 9 | 10 | 11 | #import 12 | 13 | @interface UIApplication (JKApplicationSize) 14 | - (NSString *)jk_applicationSize; 15 | @end 16 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIApplication/UIApplication+JKKeyboardFrame.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIApplication+JKKeyboardFrame.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/23. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIApplication (JKKeyboardFrame) 12 | - (CGRect)jk_keyboardFrame; 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIApplication/UIApplication+JKNetworkActivityIndicator.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIApplication+JKNetworkActivityIndicator.m 3 | // NetworkActivityIndicator 4 | // 5 | // Created by Matt Zanchelli on 1/10/14. 6 | // Copyright (c) 2014 Matt Zanchelli. All rights reserved. 7 | // 8 | 9 | #import "UIApplication+JKNetworkActivityIndicator.h" 10 | 11 | #import 12 | 13 | @implementation UIApplication (JKNetworkActivityIndicator) 14 | 15 | static volatile int32_t numberOfActiveNetworkConnectionsxxx; 16 | 17 | #pragma mark Public API 18 | 19 | - (void)jk_beganNetworkActivity 20 | { 21 | self.networkActivityIndicatorVisible = OSAtomicAdd32(1, &numberOfActiveNetworkConnectionsxxx) > 0; 22 | } 23 | 24 | - (void)jk_endedNetworkActivity 25 | { 26 | self.networkActivityIndicatorVisible = OSAtomicAdd32(-1, &numberOfActiveNetworkConnectionsxxx) > 0; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIBarButtonItem/UIBarButtonItem+JKAction.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBarButtonItem+JKAction.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/22. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | typedef void (^BarButtonJKActionBlock)(void); 11 | 12 | @interface UIBarButtonItem (JKAction) 13 | 14 | /// A block that is run when the UIBarButtonItem is tapped. 15 | //@property (nonatomic, copy) dispatch_block_t actionBlock; 16 | - (void)setJk_actionBlock:(BarButtonJKActionBlock)actionBlock; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIBezierPath/UIBezierPath+JKBasicShapes.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBezierPath+JKBasicShapes.h 3 | // Example 4 | // 5 | // Created by Pierre Dulac on 26/02/13. 6 | // Copyright (c) 2013 Pierre Dulac. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIBezierPath (JKBasicShapes) 12 | 13 | + (UIBezierPath *)jk_heartShape:(CGRect)originalFrame; 14 | + (UIBezierPath *)jk_userShape:(CGRect)originalFrame; 15 | + (UIBezierPath *)jk_martiniShape:(CGRect)originalFrame; 16 | + (UIBezierPath *)jk_beakerShape:(CGRect)originalFrame; 17 | + (UIBezierPath *)jk_starShape:(CGRect)originalFrame; 18 | + (UIBezierPath *)jk_stars:(NSUInteger)numberOfStars shapeInFrame:(CGRect)originalFrame; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIBezierPath/UIBezierPath+JKLength.h: -------------------------------------------------------------------------------- 1 | // A category on UIBezierPath that calculates the length and a point at a given length of the path. 2 | //https://github.com/ImJCabus/UIBezierPath-Length 3 | #import 4 | 5 | @interface UIBezierPath (JKLength) 6 | 7 | - (CGFloat)jk_length; 8 | 9 | - (CGPoint)jk_pointAtPercentOfLength:(CGFloat)percent; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIBezierPath/UIBezierPath+JKSVGString.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBezierPath+JKSVGString.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/30. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIBezierPath (JKSVGString) 12 | /** 13 | * @brief UIBezierPath转成SVG 14 | * 15 | * @return SVG 16 | */ 17 | - (NSString*)jk_SVGString; 18 | @end 19 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIBezierPath/UIBezierPath+JKThroughPointsBezier.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIBezierPath+LxThroughPointsBezier.h 3 | // LxThroughPointsBezierDemo 4 | // 5 | // A funny iOS library. Draw a smooth bezier through several points you designated. The curve‘s bend level is adjustable. 6 | 7 | //https://github.com/DeveloperLx/LxThroughPointsBezier 8 | 9 | #import 10 | 11 | @interface UIBezierPath (JKThroughPointsBezier) 12 | 13 | /** 14 | * The curve‘s bend level. The good value is about 0.6 ~ 0.8. The default and recommended value is 0.7. 15 | */ 16 | @property (nonatomic) CGFloat jk_contractionFactor; 17 | 18 | /** 19 | * You must wrap CGPoint struct to NSValue object. 20 | * 21 | * @param pointArray Points you want to through. You must give at least 1 point for drawing curve. 22 | */ 23 | - (void)jk_addBezierThroughPoints:(NSArray *)pointArray; 24 | 25 | @end -------------------------------------------------------------------------------- /JKCategories/UIKit/UIButton/UIButton+JKBackgroundColor.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+BackgroundColor.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by 符现超 on 15/5/9. 6 | // Copyright (c) 2015年 http://weibo.com/u/1655766025 All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIButton (JKBackgroundColor) 12 | /** 13 | * @brief 使用颜色设置按钮背景 14 | * 15 | * @param backgroundColor 背景颜色 16 | * @param state 按钮状态 17 | */ 18 | - (void)jk_setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state; 19 | @end 20 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIButton/UIButton+JKBlock.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+Block.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/30. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | typedef void (^JKTouchedButtonBlock)(NSInteger tag); 11 | 12 | @interface UIButton (JKBlock) 13 | -(void)jk_addActionHandler:(JKTouchedButtonBlock)touchHandler; 14 | @end 15 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIButton/UIButton+JKBlock.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+Block.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/30. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "UIButton+JKBlock.h" 10 | #import 11 | static const void *jk_UIButtonBlockKey = &jk_UIButtonBlockKey; 12 | 13 | @implementation UIButton (jk_Block) 14 | -(void)jk_addActionHandler:(JKTouchedButtonBlock)touchHandler{ 15 | objc_setAssociatedObject(self, jk_UIButtonBlockKey, touchHandler, OBJC_ASSOCIATION_COPY_NONATOMIC); 16 | [self addTarget:self action:@selector(jk_blockActionTouched:) forControlEvents:UIControlEventTouchUpInside]; 17 | } 18 | -(void)jk_blockActionTouched:(UIButton *)btn{ 19 | JKTouchedButtonBlock block = objc_getAssociatedObject(self, jk_UIButtonBlockKey); 20 | if (block) { 21 | block(btn.tag); 22 | } 23 | } 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIButton/UIButton+JKImagePosition.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+JKImagePosition.h 3 | // Demo_ButtonImageTitleEdgeInsets 4 | // 5 | // Created by luxiaoming on 16/1/15. 6 | // Copyright © 2016年 luxiaoming. All rights reserved. 7 | // 8 | //https://github.com/Phelthas/Demo_ButtonImageTitleEdgeInsets 9 | // 用button的titleEdgeInsets和 imageEdgeInsets属性来实现button文字图片上下或者左右排列的 10 | #import 11 | 12 | typedef NS_ENUM(NSInteger, JKImagePosition) { 13 | LXMImagePositionLeft = 0, // 图片在左,文字在右,默认 14 | LXMImagePositionRight = 1, // 图片在右,文字在左 15 | LXMImagePositionTop = 2, // 图片在上,文字在下 16 | LXMImagePositionBottom = 3, // 图片在下,文字在上 17 | }; 18 | 19 | @interface UIButton (JKImagePosition) 20 | 21 | /** 22 | * 利用 UIButton 的 titleEdgeInsets 和 imageEdgeInsets 来实现文字和图片的自由排列 23 | * 注意:这个方法需要在设置图片和文字之后才可以调用,且 button 的大小要大于 图片大小+文字大小+spacing 24 | * 25 | * @param spacing 图片和文字的间隔 26 | */ 27 | - (void)jk_setImagePosition:(JKImagePosition)postion spacing:(CGFloat)spacing; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIButton/UIButton+JKMiddleAligning.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+MiddleAligning.h 3 | // UIButton+MiddleAligning 4 | // 5 | // Created by Barry on 12/11/15. 6 | // Copyright © 2015 BarryLee. All rights reserved. 7 | // 8 | // An UIButton category for middle aligning imageView and titleLabel 9 | //https://github.com/hcbarry/MiddleAlignedButton 10 | 11 | #import 12 | 13 | /** 14 | A category on UIButton that provides a simple yet powerful interface to middle aligning imageView and titleLabel 15 | */ 16 | @interface UIButton (JKMiddleAligning) 17 | 18 | /** 19 | @param spacing The middle spacing between imageView and titleLabel. 20 | @discussion The middle aligning method for imageView and titleLabel. 21 | */ 22 | - (void)jk_middleAlignButtonWithSpacing:(CGFloat)spacing; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIButton/UIButton+JKSubmitting.h: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // UIButton+Submitting.h 4 | // FXCategories 5 | // 6 | // Created by foxsofter on 15/4/2. 7 | // Copyright (c) 2015年 foxsofter. All rights reserved. 8 | // https://github.com/foxsofter/FXCategories 9 | 10 | #import 11 | 12 | @interface UIButton (JKSubmitting) 13 | 14 | /** 15 | * @author foxsofter, 15-04-02 15:04:59 16 | * 17 | * @brief 按钮点击后,禁用按钮并在按钮上显示ActivityIndicator,以及title 18 | * 19 | * @param title 按钮上显示的文字 20 | */ 21 | - (void)jk_beginSubmitting:(NSString *)title; 22 | 23 | /** 24 | * @author foxsofter, 15-04-02 15:04:13 25 | * 26 | * @brief 按钮点击后,恢复按钮点击前的状态 27 | */ 28 | - (void)jk_endSubmitting; 29 | 30 | /** 31 | * @author foxsofter, 15-04-02 15:04:17 32 | * 33 | * @brief 按钮是否正在提交中 34 | */ 35 | @property(nonatomic, readonly, getter=isJKSubmitting) NSNumber *jk_submitting; 36 | 37 | @end -------------------------------------------------------------------------------- /JKCategories/UIKit/UIColor/UIColor+JKGradient.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+Gradient.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIColor (JKGradient) 12 | /** 13 | * @brief 渐变颜色 14 | * 15 | * @param c1 开始颜色 16 | * @param c2 结束颜色 17 | * @param height 渐变高度 18 | * 19 | * @return 渐变颜色 20 | */ 21 | + (UIColor*)jk_gradientFromColor:(UIColor*)c1 toColor:(UIColor*)c2 withHeight:(int)height; 22 | @end 23 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIColor/UIColor+JKHEX.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+HEX.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIColor (JKHEX) 12 | + (UIColor *)jk_colorWithHex:(UInt32)hex; 13 | + (UIColor *)jk_colorWithHex:(UInt32)hex andAlpha:(CGFloat)alpha; 14 | + (UIColor *)jk_colorWithHexString:(NSString *)hexString; 15 | - (NSString *)jk_HEXString; 16 | ///值不需要除以255.0 17 | + (UIColor *)jk_colorWithWholeRed:(CGFloat)red 18 | green:(CGFloat)green 19 | blue:(CGFloat)blue 20 | alpha:(CGFloat)alpha; 21 | ///值不需要除以255.0 22 | + (UIColor *)jk_colorWithWholeRed:(CGFloat)red 23 | green:(CGFloat)green 24 | blue:(CGFloat)blue; 25 | @end 26 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIColor/UIColor+JKModify.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+Modify.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/1/2. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIColor (JKModify) 12 | - (UIColor *)jk_invertedColor; 13 | - (UIColor *)jk_colorForTranslucency; 14 | - (UIColor *)jk_lightenColor:(CGFloat)lighten; 15 | - (UIColor *)jk_darkenColor:(CGFloat)darken; 16 | @end 17 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIColor/UIColor+JKRandom.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+Random.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIColor (JKRandom) 12 | /** 13 | * @brief 随机颜色 14 | * 15 | * @return UIColor 16 | */ 17 | + (UIColor *)jk_randomColor; 18 | @end 19 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIColor/UIColor+JKRandom.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+Random.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "UIColor+JKRandom.h" 10 | 11 | @implementation UIColor (JKRandom) 12 | + (UIColor *)jk_randomColor { 13 | NSInteger aRedValue = arc4random() % 255; 14 | NSInteger aGreenValue = arc4random() % 255; 15 | NSInteger aBlueValue = arc4random() % 255; 16 | UIColor *randColor = [UIColor colorWithRed:aRedValue / 255.0f green:aGreenValue / 255.0f blue:aBlueValue / 255.0f alpha:1.0f]; 17 | return randColor; 18 | } 19 | @end 20 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIColor/UIColor+JKWeb.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+Web.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/22. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIColor (JKWeb) 12 | /** 13 | * @brief 获取canvas用的颜色字符串 14 | * 15 | * @return canvas颜色 16 | */ 17 | - (NSString *)jk_canvasColorString; 18 | /** 19 | * @brief 获取网页颜色字串 20 | * 21 | * @return 网页颜色 22 | */ 23 | - (NSString *)jk_webColorString; 24 | @end 25 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIControl/UIControl+JKActionBlocks.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIControl+JKActionBlocks.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/23. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // https://github.com/lavoy/ALActionBlocks 8 | 9 | #import 10 | typedef void (^UIControlJKActionBlock)(id weakSender); 11 | 12 | 13 | @interface UIControlJKActionBlockWrapper : NSObject 14 | @property (nonatomic, copy) UIControlJKActionBlock jk_actionBlock; 15 | @property (nonatomic, assign) UIControlEvents jk_controlEvents; 16 | - (void)jk_invokeBlock:(id)sender; 17 | @end 18 | 19 | 20 | 21 | @interface UIControl (JKActionBlocks) 22 | - (void)jk_handleControlEvents:(UIControlEvents)controlEvents withBlock:(UIControlJKActionBlock)actionBlock; 23 | - (void)jk_removeActionBlocksForControlEvents:(UIControlEvents)controlEvents; 24 | @end 25 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIControl/UIControl+JKSound.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIControl+Sound.h 3 | // UIControlSound 4 | // 5 | // Created by Fred Showell on 6/01/13. 6 | // Copyright (c) 2013 Fred Showell. All rights reserved. 7 | // https://github.com/scopegate/octave 8 | // Octave: A free library of UI sounds, handmade for iOS http://raisedbeaches.com/octave 9 | #import 10 | #import 11 | 12 | @interface UIControl (JKSound) 13 | 14 | /// Set the sound for a particular control event (or events). 15 | /// @param name The name of the file. The method looks for an image with the specified name in the application’s main bundle. 16 | /// @param controlEvent A bitmask specifying the control events for which the action message is sent. See “Control Events” for bitmask constants. 17 | // 不同事件增加不同声音 18 | - (void)jk_setSoundNamed:(NSString *)name forControlEvent:(UIControlEvents)controlEvent; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIFont/UIFont+JKDynamicFontControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIFont+DynamicFontControl.h 3 | // 4 | // Created by Michael Kral on 10/28/13. 5 | // Copyright (c) 2013 Michael Kral. All rights reserved. 6 | // 7 | 8 | /** 9 | * @Author(作者) Michael Kral 10 | * 11 | * @URL(地址) https://github.com/mkral/UIFont-DynamicFontControlDemo 12 | * 13 | * @Version(版本) 20150622 14 | * 15 | * @Requirements(运行要求) 16 | * 17 | * @Description(描述) Simple Category for using UIFontTextStyle with other Fonts. 18 | 19 | * 20 | * @Usage(使用) .. 21 | */ 22 | 23 | #import 24 | 25 | @interface UIFont (JKDynamicFontControl) 26 | 27 | 28 | +(UIFont *)jk_preferredFontForTextStyle:(NSString *)style withFontName:(NSString *)fontName scale:(CGFloat)scale; 29 | 30 | +(UIFont *)jk_preferredFontForTextStyle:(NSString *)style withFontName:(NSString *)fontName; 31 | 32 | 33 | 34 | -(UIFont *)jk_adjustFontForTextStyle:(NSString *)style; 35 | 36 | -(UIFont *)jk_adjustFontForTextStyle:(NSString *)style scale:(CGFloat)scale; 37 | 38 | 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIImage/UIImage+JKAlpha.h: -------------------------------------------------------------------------------- 1 | // UIImage+Alpha.h 2 | // Created by Trevor Harmon on 9/20/09. 3 | // Free for personal or commercial use, with or without modification. 4 | // No warranty is expressed or implied. 5 | 6 | // Helper methods for adding an alpha layer to an image 7 | #import 8 | 9 | @interface UIImage (JKAlpha) 10 | /** 11 | * @brief 是否有alpha通道 12 | * 13 | * @return 是否有alpha通道 14 | */ 15 | - (BOOL)jk_hasAlpha; 16 | /** 17 | * @brief 如果没有alpha通道 增加alpha通道 18 | * 19 | * @return 如果没有alpha通道 增加alpha通道 20 | */ 21 | - (UIImage *)jk_imageWithAlpha; 22 | /** 23 | * @brief 增加透明边框 24 | * 25 | * @param borderSize 边框尺寸 26 | * 27 | * @return 增加透明边框后的图片 28 | */ 29 | - (UIImage *)jk_transparentBorderImage:(NSUInteger)borderSize; 30 | 31 | 32 | //http://stackoverflow.com/questions/6521987/crop-uiimage-to-alpha?answertab=oldest#tab-top 33 | /** 34 | * @brief 裁切含透明图片为最小大小 35 | * 36 | * @return 裁切后的图片 37 | */ 38 | - (UIImage *)jk_trimmedBetterSize; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIImage/UIImage+JKBetterFace.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+BetterFace.h 3 | // bf 4 | // 5 | // Created by liuyan on 13-11-25. 6 | // Copyright (c) 2013年 Croath. All rights reserved. 7 | // 8 | // https://github.com/croath/UIImageView-BetterFace 9 | // a UIImageView category to let the picture-cutting with faces showing better 10 | 11 | #import 12 | 13 | typedef NS_ENUM(NSUInteger, JKAccuracy) { 14 | JKAccuracyLow = 0, 15 | JKAccuracyHigh, 16 | }; 17 | 18 | @interface UIImage (JKBetterFace) 19 | 20 | - (UIImage *)jk_betterFaceImageForSize:(CGSize)size 21 | accuracy:(JKAccuracy)accurary; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIImage/UIImage+JKBlur.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Blur.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/6/5. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | FOUNDATION_EXPORT double ImageEffectsVersionNumber; 11 | FOUNDATION_EXPORT const unsigned char ImageEffectsVersionString[]; 12 | @interface UIImage (JKBlur) 13 | 14 | - (UIImage *)jk_lightImage; 15 | - (UIImage *)jk_extraLightImage; 16 | - (UIImage *)jk_darkImage; 17 | - (UIImage *)jk_tintedImageWithColor:(UIColor *)tintColor; 18 | 19 | - (UIImage *)jk_blurredImageWithRadius:(CGFloat)blurRadius; 20 | - (UIImage *)jk_blurredImageWithSize:(CGSize)blurSize; 21 | - (UIImage *)jk_blurredImageWithSize:(CGSize)blurSize 22 | tintColor:(UIColor *)tintColor 23 | saturationDeltaFactor:(CGFloat)saturationDeltaFactor 24 | maskImage:(UIImage *)maskImage; 25 | @end 26 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIImage/UIImage+JKCapture.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Capture.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/1/10. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImage (JKCapture) 12 | /** 13 | * @brief 截图指定view成图片 14 | * 15 | * @param view 一个view 16 | * 17 | * @return 图片 18 | */ 19 | + (UIImage *)jk_captureWithView:(UIView *)view; 20 | 21 | + (UIImage *)jk_getImageWithSize:(CGRect)myImageRect FromImage:(UIImage *)bigImage; 22 | 23 | /** 24 | * @author Jakey 25 | * 26 | * @brief 截图一个view中所有视图 包括旋转缩放效果 27 | * 28 | * @param aView 指定的view 29 | * @param maxWidth 宽的大小 0为view默认大小 30 | * 31 | * @return 截图 32 | */ 33 | + (UIImage *)jk_screenshotWithView:(UIView *)aView limitWidth:(CGFloat)maxWidth; 34 | @end 35 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIImage/UIImage+JKColor.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Color.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImage (JKColor) 12 | /** 13 | * @brief 根据颜色生成纯色图片 14 | * 15 | * @param color 颜色 16 | * 17 | * @return 纯色图片 18 | */ 19 | + (UIImage *)jk_imageWithColor:(UIColor *)color; 20 | /** 21 | * @brief 取图片某一点的颜色 22 | * 23 | * @param point 某一点 24 | * 25 | * @return 颜色 26 | */ 27 | - (UIColor *)jk_colorAtPoint:(CGPoint )point; 28 | //more accurate method ,colorAtPixel 1x1 pixel 29 | /** 30 | * @brief 取某一像素的颜色 31 | * 32 | * @param point 一像素 33 | * 34 | * @return 颜色 35 | */ 36 | - (UIColor *)jk_colorAtPixel:(CGPoint)point; 37 | /** 38 | * @brief 返回该图片是否有透明度通道 39 | * 40 | * @return 是否有透明度通道 41 | */ 42 | - (BOOL)jk_hasAlphaChannel; 43 | 44 | /** 45 | * @brief 获得灰度图 46 | * 47 | * @param sourceImage 图片 48 | * 49 | * @return 获得灰度图片 50 | */ 51 | + (UIImage*)jk_covertToGrayImageFromImage:(UIImage*)sourceImage; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIImage/UIImage+JKFileName.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+FileName.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImage (JKFileName) 12 | /** 13 | * @brief 根据main bundle中的文件名读取图片 14 | * 15 | * @param name 图片名 16 | * 17 | * @return 无缓存的图片 18 | */ 19 | + (UIImage *)jk_imageWithFileName:(NSString *)name; 20 | /** 21 | * @author JKCategories 22 | * 23 | * 根据指定bundle中的文件名读取图片 24 | * 25 | * @param name 图片名 26 | * @param bundle bundle 27 | * 28 | * @return 无缓存的图片 29 | */ 30 | + (UIImage *)jk_imageWithFileName:(NSString *)name inBundle:(NSBundle*)bundle; 31 | @end 32 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIImage/UIImage+JKGIF.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+GIF.h 3 | // LBGIFImage 4 | // 5 | // Created by Laurin Brandner on 06.01.12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImage (JKGIF) 12 | 13 | + (UIImage *)jk_animatedGIFNamed:(NSString *)name; 14 | 15 | + (UIImage *)jk_animatedGIFWithData:(NSData *)data; 16 | 17 | - (UIImage *)jk_animatedImageByScalingAndCroppingToSize:(CGSize)size; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIImage/UIImage+JKMerge.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+Merge.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/30. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImage (JKMerge) 12 | /** 13 | * @brief 合并两个图片 14 | * 15 | * @param firstImage 一个图片 16 | * @param secondImage 二个图片 17 | * 18 | * @return 合并后图片 19 | */ 20 | + (UIImage*)jk_mergeImage:(UIImage*)firstImage withImage:(UIImage*)secondImage; 21 | @end 22 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIImage/UIImage+JKRemoteSize.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+RemoteSize.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/1/27. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef void (^JKUIImageSizeRequestCompleted) (NSURL* imgURL, CGSize size); 12 | 13 | @interface UIImage (JKRemoteSize) 14 | /** 15 | * @brief 获取远程图片的大小 16 | * 17 | * @param imgURL 图片url 18 | * @param completion 完成回调 19 | */ 20 | + (void)jk_requestSizeNoHeader:(NSURL*)imgURL completion:(JKUIImageSizeRequestCompleted)completion; 21 | /** 22 | * @brief 从header中获取远程图片的大小 (服务器必须支持) 23 | * 24 | * @param imgURL 图片url 25 | * @param completion 完成回调 26 | */ 27 | //+ (void)requestSizeWithHeader:(NSURL*)imgURL completion:(UIImageSizeRequestCompleted)completion; 28 | 29 | @end -------------------------------------------------------------------------------- /JKCategories/UIKit/UIImage/UIImage+JKResize.h: -------------------------------------------------------------------------------- 1 | // UIImage+Resize.h 2 | // Created by Trevor Harmon on 8/5/09. 3 | // Free for personal or commercial use, with or without modification. 4 | // No warranty is expressed or implied. 5 | 6 | // Extends the UIImage class to support resizing/cropping 7 | #import 8 | 9 | @interface UIImage (JKResize) 10 | 11 | - (UIImage *)jk_croppedImage:(CGRect)bounds; 12 | - (UIImage *)jk_thumbnailImage:(NSInteger)thumbnailSize 13 | transparentBorder:(NSUInteger)borderSize 14 | cornerRadius:(NSUInteger)cornerRadius 15 | interpolationQuality:(CGInterpolationQuality)quality; 16 | - (UIImage *)jk_resizedImage:(CGSize)newSize 17 | interpolationQuality:(CGInterpolationQuality)quality; 18 | - (UIImage *)jk_resizedImage:(CGSize)newSize; 19 | - (UIImage *)jk_resizedImageWithContentMode:(UIViewContentMode)contentMode 20 | bounds:(CGSize)bounds 21 | interpolationQuality:(CGInterpolationQuality)quality; 22 | @end 23 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIImage/UIImage+JKRoundedCorner.h: -------------------------------------------------------------------------------- 1 | // UIImage+RoundedCorner.h 2 | // Created by Trevor Harmon on 9/20/09. 3 | // Free for personal or commercial use, with or without modification. 4 | // No warranty is expressed or implied. 5 | 6 | // Extends the UIImage class to support making rounded corners 7 | #import 8 | @interface UIImage (JKRoundedCorner) 9 | - (UIImage *)jk_roundedCornerImage:(NSInteger)cornerSize borderSize:(NSInteger)borderSize; 10 | @end 11 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIImageView/UIImageView+JKBetterFace.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+BetterFace.h 3 | // bf 4 | // 5 | // Created by croath on 13-10-22. 6 | // Copyright (c) 2013年 Croath. All rights reserved. 7 | // 8 | // https://github.com/croath/UIImageView-BetterFace 9 | // a UIImageView category to let the picture-cutting with faces showing better 10 | 11 | #import 12 | 13 | @interface UIImageView (JKBetterFace) 14 | 15 | @property (nonatomic) BOOL jk_needsBetterFace; 16 | @property (nonatomic) BOOL jk_fast; 17 | 18 | void jk_hack_uiimageview_bf(void); 19 | - (void)jk_setBetterFaceImage:(UIImage *)image; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIImageView/UIImageView+JKFaceAwareFill.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+UIImageView_FaceAwareFill.h 3 | // faceAwarenessClipping 4 | // 5 | // Created by Julio Andrés Carrettoni on 03/02/13. 6 | // Copyright (c) 2013 Julio Andrés Carrettoni. All rights reserved. 7 | // 8 | // https://github.com/Julioacarrettoni/UIImageView_FaceAwareFill 9 | // This category applies Aspect Fill content mode to an image and if faces are detected it centers them instead of centering the image just by its geometrical center. 10 | 11 | #import 12 | 13 | @interface UIImageView (JKFaceAwareFill) 14 | 15 | //Ask the image to perform an "Aspect Fill" but centering the image to the detected faces 16 | //Not the simple center of the image 17 | - (void)jk_faceAwareFill; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIImageView/UIImageView+JKGeometryConversion.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+GeometryConversion.h 3 | // 4 | // Created by Dominique d'Argent on 18.04.12. 5 | // Copyright (c) 2012. All rights reserved. 6 | // 7 | // Thomas Sarlandie - 2012: 8 | // - Added convertPointFromView:viewPoint 9 | // - Added convertRectFromView:viewPoint 10 | // 11 | // Contribution released in the public domain. 12 | 13 | // https://github.com/nubbel/UIImageView-GeometryConversion 14 | // A category on UIImageView that provides methods for converting points and rects from the image to view coordinates. 15 | 16 | 17 | #import 18 | #import 19 | 20 | 21 | @interface UIImageView (JKGeometryConversion) 22 | 23 | - (CGPoint)jk_convertPointFromImage:(CGPoint)imagePoint; 24 | - (CGRect)jk_convertRectFromImage:(CGRect)imageRect; 25 | 26 | - (CGPoint)jk_convertPointFromView:(CGPoint)viewPoint; 27 | - (CGRect)jk_convertRectFromView:(CGRect)viewRect; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIImageView/UIImageView+JKReflect.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+JKReflect.h 3 | // UIImageView-Reflect 4 | // 5 | // Created by Snowmanzzz on 3/19/14. 6 | // Copyright (c) 2014 zzz. All rights reserved. 7 | // 8 | // https://github.com/zzz6519003/UIImageView-Reflect 9 | // A simple category that creates a relection view for your UIImageView. 10 | 11 | #import 12 | 13 | @interface UIImageView (JKReflect) 14 | /** 15 | * @brief 倒影 16 | */ 17 | - (void)jk_reflect; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UILable/UILabel+JKAutoSize.h: -------------------------------------------------------------------------------- 1 | // 2 | // UILabel+AutoSize.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/22. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UILabel (JKAutoSize) 12 | /** 13 | * 垂直方向固定获取动态宽度的UILabel的方法 14 | * 15 | * @return 原始UILabel修改过的Rect的UILabel(起始位置相同) 16 | */ 17 | - (UILabel *)jk_resizeLabelHorizontal; 18 | 19 | /** 20 | * 水平方向固定获取动态宽度的UILabel的方法 21 | * 22 | * @return 原始UILabel修改过的Rect的UILabel(起始位置相同) 23 | */ 24 | - (UILabel *)jk_resizeLabelVertical; 25 | 26 | /** 27 | * 垂直方向固定获取动态宽度的UILabel的方法 28 | * 29 | * @param minimumWidth minimum width 30 | * 31 | * @return 原始UILabel修改过的Rect的UILabel(起始位置相同) 32 | */ 33 | - (UILabel *)jk_resizeLabelHorizontal:(CGFloat)minimumWidth; 34 | 35 | /** 36 | * 水平方向固定获取动态宽度的UILabel的方法 37 | * 38 | * @param minimumHeigh minimum height 39 | * 40 | * @return 原始UILabel修改过的Rect的UILabel(起始位置相同) 41 | */ 42 | - (UILabel *)jk_resizeLabelVertical:(CGFloat)minimumHeigh; 43 | @end 44 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UILable/UILabel+JKSuggestSize.h: -------------------------------------------------------------------------------- 1 | // 2 | // UILabel+SuggestSize.h 3 | // WordPress 4 | // 5 | // Created by Eric J on 6/18/13. 6 | // Copyright (c) 2013 WordPress. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UILabel (JKSuggestSize) 12 | 13 | - (CGSize)jk_suggestedSizeForWidth:(CGFloat)width; 14 | - (CGSize)jk_suggestSizeForAttributedString:(NSAttributedString *)string width:(CGFloat)width; 15 | - (CGSize)jk_suggestSizeForString:(NSString *)string width:(CGFloat)width; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UINavigationBar/UINavigationBar+JKAwesome.h: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationBar+Awesome.h 3 | // LTNavigationBar 4 | // 5 | // Created by ltebean on 15-2-15. 6 | // Copyright (c) 2015 ltebean. All rights reserved. 7 | // https://github.com/ltebean/LTNavigationBar 8 | 9 | #import 10 | 11 | @interface UINavigationBar (JKAwesome) 12 | - (void)jk_setBackgroundColor:(UIColor *)backgroundColor; 13 | - (void)jk_setElementsAlpha:(CGFloat)alpha; 14 | - (void)jk_setTranslationY:(CGFloat)translationY; 15 | - (void)jk_reset; 16 | @end -------------------------------------------------------------------------------- /JKCategories/UIKit/UINavigationController/UINavigationController+JKKeyboardFix.h: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationController+KeyboardFix.h 3 | // WordPress 4 | // 5 | // Created by Eric Johnson on 8/2/12. 6 | // Copyright (c) 2012 WordPress. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UINavigationController (JKKeyboardFix) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UINavigationController/UINavigationController+JKKeyboardFix.m: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationController+KeyboardFix.m 3 | // WordPress 4 | // 5 | // Created by Eric Johnson on 8/2/12. 6 | // Copyright (c) 2012 WordPress. All rights reserved. 7 | // 8 | 9 | #import "UINavigationController+JKKeyboardFix.h" 10 | 11 | @implementation UINavigationController (JKKeyboardFix) 12 | 13 | // This fixes an issue with the keyboard not dismissing on the iPad's login screen. 14 | // http://stackoverflow.com/questions/3372333/ipad-keyboard-will-not-dismiss-if-modal-view-controller-presentation-style-is-ui/3386768#3386768 15 | // http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html 16 | 17 | - (BOOL)disablesAutomaticKeyboardDismissal { 18 | return NO; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UINavigationItem/UINavigationItem+JKLock.h: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationItem+JKLock.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/22. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UINavigationItem (JKLock) 12 | /** 13 | * @brief 锁定RightItem 14 | * 15 | * @param lock 是否锁定 16 | */ 17 | - (void)jk_lockRightItem:(BOOL)lock; 18 | /** 19 | * @brief 锁定LeftItem 20 | * 21 | * @param lock 是否锁定 22 | */ 23 | - (void)jk_lockLeftItem:(BOOL)lock; 24 | @end 25 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIPopoverController/UIPopoverController+iPhone.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIPopoverController+iPhone.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/7/12. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | // Runtime implementation to allow UIPopoverController on iPhone apps. 9 | 10 | #import 11 | 12 | @interface UIPopoverController (iPhone) 13 | /** 14 | * @brief 开启UIPopoverController支持iPhone 15 | * 16 | * @return 开启状态 17 | */ 18 | + (BOOL)_popoversDisabled; 19 | @end 20 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIPopoverController/UIPopoverController+iPhone.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIPopoverController+iPhone.m 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/7/12. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "UIPopoverController+iPhone.h" 10 | 11 | @implementation UIPopoverController (iPhone) 12 | /** 13 | * @brief 开启UIPopoverController支持iPhone 14 | * 15 | * @return 开启状态 16 | */ 17 | + (BOOL)_popoversDisabled { 18 | return NO; 19 | } 20 | @end 21 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIResponder/UIResponder+JKChain.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIResponder+JKChain.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/30. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIResponder (JKChain) 12 | /** 13 | * @brief 响应者链 14 | * 15 | * @return 响应者链 16 | */ 17 | - (NSString *)jk_responderChainDescription; 18 | @end 19 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIScreen/UIScreen+JKFrame.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIScreen+JKFrame.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/22. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIScreen (JKFrame) 12 | + (CGSize)jk_size; 13 | + (CGFloat)jk_width; 14 | + (CGFloat)jk_height; 15 | 16 | + (CGSize)jk_orientationSize; 17 | + (CGFloat)jk_orientationWidth; 18 | + (CGFloat)jk_orientationHeight; 19 | + (CGSize)jk_DPISize; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIScrollView/UIScrollView+JKPages.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIScrollView+JKPages.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/30. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIScrollView (JKPages) 12 | - (NSInteger)jk_pages; 13 | - (NSInteger)jk_currentPage; 14 | - (CGFloat)jk_scrollPercent; 15 | 16 | - (CGFloat)jk_pagesY; 17 | - (CGFloat)jk_pagesX; 18 | - (CGFloat)jk_currentPageY; 19 | - (CGFloat)jk_currentPageX; 20 | - (void)jk_setPageY:(CGFloat)page; 21 | - (void)jk_setPageX:(CGFloat)page; 22 | - (void)jk_setPageY:(CGFloat)page animated:(BOOL)animated; 23 | - (void)jk_setPageX:(CGFloat)page animated:(BOOL)animated; 24 | @end 25 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UISplitViewController/UISplitViewController+JKQuickAccess.m: -------------------------------------------------------------------------------- 1 | // 2 | // UISplitViewController+JKQuickAccess.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/22. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "UISplitViewController+JKQuickAccess.h" 12 | 13 | @implementation UISplitViewController (JKQuickAccess) 14 | 15 | - (UIViewController *)jk_leftController { 16 | UIViewController * leftVC = [[self viewControllers] objectAtIndex:0]; 17 | 18 | if ([leftVC isKindOfClass:[UINavigationController class]]) { 19 | leftVC = [(UINavigationController *)leftVC topViewController]; 20 | } 21 | return leftVC; 22 | } 23 | 24 | - (UIViewController *)jk_rightController { 25 | UIViewController * rightVC = [[self viewControllers] lastObject]; 26 | 27 | if ([rightVC isKindOfClass:[UINavigationController class]]) { 28 | rightVC = [(UINavigationController *)rightVC topViewController]; 29 | } 30 | return rightVC; 31 | } 32 | 33 | @end -------------------------------------------------------------------------------- /JKCategories/UIKit/UITableView/UITableView+JKiOS7Style.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableView+iOS7Style.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/6/1. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UITableView (JKiOS7Style) 12 | /** 13 | * @brief iOS 7 设置页面的 UITableViewCell 样式 14 | * 15 | * @param cell cell 16 | * @param indexPath indexPath 17 | */ 18 | -(void)jk_applyiOS7SettingsStyleGrouping:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath; 19 | @end 20 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UITableViewCell/UITableViewCell+JKDelaysContentTouches.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewCell+TS_delaysContentTouches.h 3 | // tableViewCellDelaysContentTouches 4 | // 5 | // Created by Nicholas Hodapp on 1/31/14. 6 | // Copyright (c) 2014 Nicholas Hodapp. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UITableViewCell (JKDelaysContentTouches) 12 | 13 | @property (nonatomic, assign) BOOL jk_delaysContentTouches; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UITableViewCell/UITableViewCell+JKDelaysContentTouches.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewCell+TS_delaysContentTouches.m 3 | // tableViewCellDelaysContentTouches 4 | // 5 | // Created by Nicholas Hodapp on 1/31/14. 6 | // Copyright (c) 2014 Nicholas Hodapp. All rights reserved. 7 | // 8 | 9 | #import "UITableViewCell+JKDelaysContentTouches.h" 10 | 11 | @implementation UITableViewCell (JKDelaysContentTouches) 12 | 13 | - (UIScrollView*) jk_scrollView 14 | { 15 | id sv = self.contentView.superview; 16 | while ( ![sv isKindOfClass: [UIScrollView class]] && sv != self ) 17 | { 18 | sv = [sv superview]; 19 | } 20 | 21 | return sv == self ? nil : sv; 22 | } 23 | 24 | - (void) setJk_delaysContentTouches:(BOOL)delaysContentTouches 25 | { 26 | [self willChangeValueForKey: @"jk_delaysContentTouches"]; 27 | 28 | [[self jk_scrollView] setDelaysContentTouches: delaysContentTouches]; 29 | 30 | [self didChangeValueForKey: @"jk_delaysContentTouches"]; 31 | } 32 | 33 | - (BOOL) jk_delaysContentTouches 34 | { 35 | return [[self jk_scrollView] delaysContentTouches]; 36 | } 37 | 38 | 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UITableViewCell/UITableViewCell+JKNIB.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewCell+NIB.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/11/19. 6 | // Copyright (c) 2014年 jakey. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UITableViewCell (JKNIB) 12 | /** 13 | * @brief 加载同类名的nib 14 | * 15 | * @return nib 16 | */ 17 | +(UINib*)jk_nib; 18 | @end 19 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UITableViewCell/UITableViewCell+JKNIB.m: -------------------------------------------------------------------------------- 1 | // 2 | // UITableViewCell+NIB.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/11/19. 6 | // Copyright (c) 2014年 jakey. All rights reserved. 7 | // 8 | 9 | #import "UITableViewCell+JKNIB.h" 10 | 11 | @implementation UITableViewCell (JKNIB) 12 | /** 13 | * @brief 加载同类名的nib 14 | * 15 | * @return nib 16 | */ 17 | +(UINib*)jk_nib{ 18 | return [UINib nibWithNibName:NSStringFromClass([self class]) bundle:nil]; 19 | } 20 | @end 21 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UITextField/UITextField+JKHistory.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+History.h 3 | // Demo 4 | // 5 | // Created by DamonDing on 15/5/26. 6 | // Copyright (c) 2015年 morenotepad. All rights reserved. 7 | // 8 | // https://github.com/Jameson-zxm/UITextField-History 9 | // A category of UITextfiled that can record it's input as history 10 | 11 | #import 12 | 13 | @interface UITextField (JKHistory) 14 | 15 | /** 16 | * identity of this textfield 17 | */ 18 | @property (retain, nonatomic) NSString *jk_identify; 19 | 20 | /** 21 | * load textfiled input history 22 | * 23 | * 24 | * @return the history of it's input 25 | */ 26 | - (NSArray*)jk_loadHistroy; 27 | 28 | /** 29 | * save current input text 30 | */ 31 | - (void)jk_synchronize; 32 | 33 | - (void)jk_showHistory; 34 | - (void)jk_hideHistroy; 35 | 36 | - (void)jk_clearHistory; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UITextField/UITextField+JKInputLimit.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+JKInputLimit.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 2016/11/29. 6 | // Copyright © 2016年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UITextField (JKInputLimit) 12 | @property (assign, nonatomic) NSInteger jk_maxLength;//if <=0, no limit 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UITextField/UITextField+JKSelect.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextField+Select.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/6/1. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UITextField (JKSelect) 12 | /** 13 | * @brief 当前选中的字符串范围 14 | * 15 | * @return NSRange 16 | */ 17 | - (NSRange)jk_selectedRange; 18 | /** 19 | * @brief 选中所有文字 20 | */ 21 | - (void)jk_selectAllText; 22 | /** 23 | * @brief 选中指定范围的文字 24 | * 25 | * @param range NSRange范围 26 | */ 27 | - (void)jk_setSelectedRange:(NSRange)range; 28 | @end 29 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UITextView/UITextView+JKInputLimit.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextView+JKInputLimit.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 2016/11/29. 6 | // Copyright © 2016年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UITextView (JKInputLimit) 12 | @property (assign, nonatomic) NSInteger jk_maxLength;//if <=0, no limit 13 | @end 14 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UITextView/UITextView+JKPinchZoom.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextView+PinchZoom.h 3 | // 4 | // Created by Stan Serebryakov on 04.12.12. 5 | // 6 | // Based on Aral Balkan snippet. 7 | 8 | // https://github.com/cfr/UITextView-PinchZoom 9 | // Simple pinch-zoom category for UITextView 10 | 11 | /* 12 | UITextView *textView = [[UITextView alloc] initWithFrame:self.view.frame]; 13 | [self.view addSubview:textView]; 14 | textView.zoomEnabled = YES; 15 | textView.minFontSize = 10; 16 | textView.maxFontSize = 40; 17 | */ 18 | #import 19 | 20 | @interface UITextView (JKPinchZoom) 21 | 22 | @property (nonatomic) CGFloat jk_maxFontSize, jk_minFontSize; 23 | 24 | @property (nonatomic, getter = isJk_zoomEnabled) BOOL jk_zoomEnabled; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UITextView/UITextView+JKPlaceHolder.h: -------------------------------------------------------------------------------- 1 | // 2 | // UITextView+PlaceHolder.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | @interface UITextView (JKPlaceHolder) 12 | @property (nonatomic, strong) UITextView *jk_placeHolderTextView; 13 | - (void)jk_addPlaceHolder:(NSString *)placeHolder; 14 | @end 15 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIView/UIView+JKBlockGesture.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+UIView_BlockGesture.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/30. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | typedef void (^JKGestureActionBlock)(UIGestureRecognizer *gestureRecoginzer); 11 | 12 | @interface UIView (JKBlockGesture) 13 | /** 14 | * @brief 添加tap手势 15 | * 16 | * @param block 代码块 17 | */ 18 | - (void)jk_addTapActionWithBlock:(JKGestureActionBlock)block; 19 | /** 20 | * @brief 添加长按手势 21 | * 22 | * @param block 代码块 23 | */ 24 | - (void)jk_addLongPressActionWithBlock:(JKGestureActionBlock)block; 25 | @end 26 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIView/UIView+JKConstraints.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+JKConstraints.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/5/22. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (JKConstraints) 12 | - (NSLayoutConstraint *)jk_constraintForAttribute:(NSLayoutAttribute)attribute; 13 | 14 | - (NSLayoutConstraint *)jk_leftConstraint; 15 | - (NSLayoutConstraint *)jk_rightConstraint; 16 | - (NSLayoutConstraint *)jk_topConstraint; 17 | - (NSLayoutConstraint *)jk_bottomConstraint; 18 | - (NSLayoutConstraint *)jk_leadingConstraint; 19 | - (NSLayoutConstraint *)jk_trailingConstraint; 20 | - (NSLayoutConstraint *)jk_widthConstraint; 21 | - (NSLayoutConstraint *)jk_heightConstraint; 22 | - (NSLayoutConstraint *)jk_centerXConstraint; 23 | - (NSLayoutConstraint *)jk_centerYConstraint; 24 | - (NSLayoutConstraint *)jk_baseLineConstraint; 25 | @end 26 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIView/UIView+JKFrame.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+JKFrame.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (JKFrame) 12 | 13 | // shortcuts for frame properties 14 | @property (nonatomic, assign) CGPoint jk_origin; 15 | @property (nonatomic, assign) CGSize jk_size; 16 | 17 | // shortcuts for positions 18 | @property (nonatomic) CGFloat jk_centerX; 19 | @property (nonatomic) CGFloat jk_centerY; 20 | 21 | // shortcuts for the coords 22 | @property (nonatomic) CGFloat jk_top; 23 | @property (nonatomic) CGFloat jk_bottom; 24 | @property (nonatomic) CGFloat jk_left; 25 | @property (nonatomic) CGFloat jk_right; 26 | 27 | // shortcuts for the size 28 | @property (nonatomic) CGFloat jk_width; 29 | @property (nonatomic) CGFloat jk_height; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIView/UIView+JKNib.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Nib.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface UIView (JKNib) 13 | + (UINib *)jk_loadNib; 14 | + (UINib *)jk_loadNibNamed:(NSString*)nibName; 15 | + (UINib *)jk_loadNibNamed:(NSString*)nibName bundle:(NSBundle *)bundle; 16 | 17 | + (instancetype)jk_loadInstanceFromNib; 18 | + (instancetype)jk_loadInstanceFromNibWithName:(NSString *)nibName; 19 | + (instancetype)jk_loadInstanceFromNibWithName:(NSString *)nibName owner:(id)owner; 20 | + (instancetype)jk_loadInstanceFromNibWithName:(NSString *)nibName owner:(id)owner bundle:(NSBundle *)bundle; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIView/UIView+JKRecursion.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Recursion.h 3 | // JKCategories 4 | // 5 | // Created by Jakey on 15/6/23. 6 | // Copyright © 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | typedef void (^JKSubviewBlock) (UIView* view); 11 | typedef void (^JKSuperviewBlock) (UIView* superview); 12 | @interface UIView (JKRecursion) 13 | 14 | /** 15 | * @brief 寻找子视图 16 | * 17 | * @param recurse 回调 18 | * 19 | * @return Return YES from the block to recurse into the subview. 20 | Set stop to YES to return the subview. 21 | */ 22 | - (UIView*)jk_findViewRecursively:(BOOL(^)(UIView* subview, BOOL* stop))recurse; 23 | 24 | 25 | -(void)jk_runBlockOnAllSubviews:(JKSubviewBlock)block; 26 | -(void)jk_runBlockOnAllSuperviews:(JKSuperviewBlock)block; 27 | -(void)jk_enableAllControlsInViewHierarchy; 28 | -(void)jk_disableAllControlsInViewHierarchy; 29 | @end 30 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIView/UIView+JKScreenshot.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Screenshot.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/1/10. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (JKScreenshot) 12 | /** 13 | * @brief view截图 14 | * 15 | * @return 截图 16 | */ 17 | - (UIImage *)jk_screenshot; 18 | 19 | /** 20 | * @author Jakey 21 | * 22 | * @brief 截图一个view中所有视图 包括旋转缩放效果 23 | * 24 | * @param maxWidth 限制缩放的最大宽度 保持默认传0 25 | * 26 | * @return 截图 27 | */ 28 | - (UIImage *)jk_screenshot:(CGFloat)maxWidth; 29 | @end 30 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIViewController/UIViewController+JKBackButtonTouched.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+BackButtonTouched.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/30. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | #import 9 | typedef void (^JKBackButtonHandler)(UIViewController *vc); 10 | @interface UIViewController (JKBackButtonTouched) 11 | /** 12 | * @author JKCategories 13 | * 14 | * navgation 返回按钮回调 15 | * 16 | * @param backButtonHandler <#backButtonHandler description#> 17 | */ 18 | -(void)jk_backButtonTouched:(JKBackButtonHandler)backButtonHandler; 19 | @end 20 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIViewController/UIViewController+JKRecursiveDescription.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+RecursiveDescription.h 3 | // HLiPad 4 | // 5 | // Created by Richard Turton on 07/01/2013. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface UIViewController (JKRecursiveDescription) 12 | /** 13 | * @brief 视图层级 14 | * 15 | * @return 视图层级字符串 16 | */ 17 | -(NSString*)jk_recursiveDescription; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIViewController/UIViewController+JKVisible.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+Visible.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIViewController (JKVisible) 12 | - (BOOL)jk_isVisible; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIViewController/UIViewController+JKVisible.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+JKVisible.m 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import "UIViewController+JKVisible.h" 10 | 11 | @implementation UIViewController (JKVisible) 12 | - (BOOL)jk_isVisible { 13 | return [self isViewLoaded] && self.view.window; 14 | } 15 | @end 16 | -------------------------------------------------------------------------------- /JKCategories/UIKit/UIWindow/UIWindow+JKHierarchy.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWindow+JKHierarchy.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 15/1/16. 6 | // Copyright (c) 2015年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIWindow (JKHierarchy) 12 | /*! 13 | @method topMostController 14 | 15 | @return Returns the current Top Most ViewController in hierarchy. 16 | */ 17 | - (UIViewController*)jk_topMostController; 18 | 19 | /*! 20 | @method currentViewController 21 | 22 | @return Returns the topViewController in stack of topMostController. 23 | */ 24 | - (UIViewController*)jk_currentViewController; 25 | @end 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 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 | 23 | -------------------------------------------------------------------------------- /NotRenamed/UIView+Debug.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIVIew+Debug.h 3 | // Constraints_Hybrid 4 | // 5 | // Created by Eric Rolf on 1/3/13. 6 | // Copyright (c) 2013 Cardinal Solutions. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | @interface UIView (Debug) 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /NotRenamed/UIWebView+Alert.h: -------------------------------------------------------------------------------- 1 | // 2 | // WebView+Alert.h 3 | // AlertProject 4 | // 5 | // Created by Peter.Kang on 14-1-23. 6 | // Copyright (c) 2014年 Peter.Kang. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIWebView (JavaScriptAlert) 12 | -(void)webView:(UIWebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(id)frame; 13 | 14 | -(BOOL)webView:(UIWebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(id)frame; 15 | @end 16 | -------------------------------------------------------------------------------- /NotRenamed/UIWebView/UIWebVIew+JKSwipeGesture.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWebVIew+SwipeGesture.h 3 | // SNSwipeGestureSample 4 | // 5 | // Created by Noda Shimpei on 2013/05/18. 6 | // Copyright (c) 2013年 Noda Shimpei. All rights reserved. 7 | // 8 | 9 | /** 10 | * @Author(作者) JKCategories 11 | * 12 | * @URL(地址) https://github.com/OopsMouse/UIWebView-SwipeGesture 13 | * 14 | * @Version(版本) 20150620 15 | * 16 | * @Requirements(运行要求) 17 | * 18 | * @Description(描述) Category for UIWebView to back and go a browser page with double finger swipe. 19 | * @Usage(使用) .. 20 | */ 21 | 22 | 23 | #import 24 | 25 | @interface UIWebView (JKSwipeGesture) 26 | 27 | - (void)jk_useSwipeGesture; 28 | 29 | @end -------------------------------------------------------------------------------- /NotRenamed/UIWebView/UIWebView+JKLoad.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWebView+loadURL.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 14/12/15. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIWebView (JKLoad) 12 | /** 13 | * @brief 读取一个网页地址 14 | * 15 | * @param URLString 网页地址 16 | */ 17 | - (void)jk_loadURL:(NSString*)URLString; 18 | /** 19 | * @brief 读取bundle中的webview 20 | * 21 | * @param htmlName 文件名称 xxx.html 22 | */ 23 | - (void)jk_loadLocalHtml:(NSString*)htmlName; 24 | /** 25 | * 26 | * 读取bundle中的webview 27 | * 28 | * @param htmlName htmlName 文件名称 xxx.html 29 | * @param inBundle bundle 30 | */ 31 | - (void)jk_loadLocalHtml:(NSString*)htmlName inBundle:(NSBundle*)inBundle; 32 | 33 | /** 34 | * @brief 清空cookie 35 | */ 36 | - (void)jk_clearCookies; 37 | @end 38 | -------------------------------------------------------------------------------- /NotRenamed/UIWebView/UIWebView+JKLoadInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWebView+JKLoadInfo.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 2016/12/9. 6 | // Copyright © 2016年 Jakey. All rights reserved. 7 | // 8 | 9 | #import 10 | typedef NS_ENUM(NSUInteger, JKReadyState) { 11 | JK_JKReadyState_uninitialized = 0, //还未开始载入 12 | JK_JKReadyState_loading, //载入中 13 | JK_JKReadyState_interactive, //已加载,文档与用户可以开始交互 14 | JK_JKReadyState_complete //载入完成 15 | 16 | }; 17 | typedef void(^jk_webViewLoadChangeBlock)(UIWebView *webView,float progress,CGSize contentSize); 18 | 19 | @interface UIWebView (JKLoadInfo) 20 | @property (nonatomic, readonly) float jk_progress; // 0.0..1.0 21 | @property (nonatomic, readonly) CGSize jk_contentSize; 22 | @property (nonatomic, readonly) JKReadyState jk_readyState; 23 | @property (copy, nonatomic) jk_webViewLoadChangeBlock jk_webViewLoadChangeBlock; 24 | 25 | -(void)setJk_webViewLoadChangeBlock:(jk_webViewLoadChangeBlock)jk_webViewLoadChangeBlock; 26 | @end 27 | -------------------------------------------------------------------------------- /NotRenamed/UIWebView/UIWebView+JKMetaParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWebView+MetaParser.h 3 | // UIWebView+MetaParser 4 | // 5 | // Created by Hirose Tatsuya on 2013/09/15. 6 | // Copyright (c) 2013年 Tatyusa. All rights reserved. 7 | // 8 | /** 9 | * @Author(作者) Hirose Tatsuya 10 | * 11 | * @URL(地址) https://github.com/tatyusa/UIWebView-MetaParser 12 | * 13 | * @Version(版本) 20150620 14 | * 15 | * @Requirements(运行要求) 16 | * 17 | * @Description(描述) UIWebView Category to parse meta tags in HTML. 18 | 19 | * 20 | * @Usage(使用) .. 21 | */ 22 | 23 | 24 | #import 25 | 26 | @interface UIWebView (JKMetaParser) 27 | /** 28 | * @brief 获取网页meta信息 29 | * 30 | * @return meta信息 31 | */ 32 | -(NSArray *)jk_getMetaData; 33 | @end 34 | -------------------------------------------------------------------------------- /NotRenamed/UIWebView/UIWebView+JKStyle.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWebView+style.h 3 | // JKCategories 4 | // 5 | // Created by jakey on 14-3-11. 6 | // Copyright (c) 2014年 www.skyfox.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIWebView (JKStyle) 12 | /** 13 | * @brief 是否显示阴影 14 | * 15 | * @param hidden 是否显示阴影 16 | */ 17 | - (void)jk_shadowViewHidden:(BOOL)hidden; 18 | 19 | /** 20 | * @brief 是否显示水平滑动指示器 21 | * 22 | * @param hidden 是否显示水平滑动指示器 23 | */ 24 | - (void)jk_showsHorizontalScrollIndicator:(BOOL)hidden; 25 | /** 26 | * @brief 是否显示垂直滑动指示器 27 | * 28 | * @param hidden 是否显示垂直滑动指示器 29 | */ 30 | - (void)jk_showsVerticalScrollIndicator:(BOOL)hidden; 31 | 32 | /** 33 | * @brief 网页透明 34 | */ 35 | -(void)jk_makeTransparent; 36 | /** 37 | * @brief 网页透明移除+阴影 38 | */ 39 | -(void)jk_makeTransparentAndRemoveShadow; 40 | @end 41 | -------------------------------------------------------------------------------- /NotRenamed/UIWebView/UIWebView+JKWebStorage.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWebView+JKWebStorage.h 3 | // JKCategories (https://github.com/shaojiankui/JKCategories) 4 | // 5 | // Created by Jakey on 2016/12/14. 6 | // Copyright © 2016年 www.skyfox.org. All rights reserved. 7 | // https://github.com/cprime/UIWebView-WebStorage 8 | 9 | #import 10 | 11 | @interface UIWebView (JKWebStorage) 12 | #pragma mark - Local Storage 13 | 14 | - (void)jk_setLocalStorageString:(NSString *)string forKey:(NSString *)key; 15 | 16 | - (NSString *)jk_localStorageStringForKey:(NSString *)key; 17 | 18 | - (void)jk_removeLocalStorageStringForKey:(NSString *)key; 19 | 20 | - (void)jk_clearLocalStorage; 21 | 22 | #pragma mark - Session Storage 23 | 24 | - (void)jk_setSessionStorageString:(NSString *)string forKey:(NSString *)key; 25 | 26 | - (NSString *)jk_sessionStorageStringForKey:(NSString *)key; 27 | 28 | - (void)jk_removeSessionStorageStringForKey:(NSString *)key; 29 | 30 | - (void)jk_clearSessionStorage; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /PodTest/PodTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PodTest/PodTest.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PodTest/PodTest.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /PodTest/PodTest.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PodTest/PodTest/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // PodTest 4 | // 5 | // Created by Jakey on 2018/10/11. 6 | // Copyright © 2018 Jakey. 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 | -------------------------------------------------------------------------------- /PodTest/PodTest/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /PodTest/PodTest/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // PodTest 4 | // 5 | // Created by Jakey on 2018/10/11. 6 | // Copyright © 2018 Jakey. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /PodTest/PodTest/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // PodTest 4 | // 5 | // Created by Jakey on 2018/10/11. 6 | // Copyright © 2018 Jakey. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view, typically from a nib. 21 | } 22 | 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /PodTest/PodTest/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // PodTest 4 | // 5 | // Created by Jakey on 2018/10/11. 6 | // Copyright © 2018 Jakey. 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 | -------------------------------------------------------------------------------- /PodTest/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '8.0' 3 | 4 | target 'PodTest' do 5 | # Uncomment the next line if you're using Swift or would like to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for PodTest 9 | pod 'JKCategories', :path => '../' 10 | 11 | end 12 | -------------------------------------------------------------------------------- /PodTest/Pods/Target Support Files/JKCategories/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.8.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /PodTest/Pods/Target Support Files/JKCategories/JKCategories-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_JKCategories : NSObject 3 | @end 4 | @implementation PodsDummy_JKCategories 5 | @end 6 | -------------------------------------------------------------------------------- /PodTest/Pods/Target Support Files/JKCategories/JKCategories-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /PodTest/Pods/Target Support Files/JKCategories/JKCategories.modulemap: -------------------------------------------------------------------------------- 1 | framework module JKCategories { 2 | umbrella header "JKCategories-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /PodTest/Pods/Target Support Files/JKCategories/JKCategories.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/JKCategories 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_LDFLAGS = -l"z" -framework "CoreData" -framework "CoreLocation" -framework "Foundation" -framework "MapKit" -framework "QuartzCore" -framework "Security" -framework "UIKit" 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /PodTest/Pods/Target Support Files/Pods-PodTest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /PodTest/Pods/Target Support Files/Pods-PodTest/Pods-PodTest-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_PodTest : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_PodTest 5 | @end 6 | -------------------------------------------------------------------------------- /PodTest/Pods/Target Support Files/Pods-PodTest/Pods-PodTest-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_PodTestVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_PodTestVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /PodTest/Pods/Target Support Files/Pods-PodTest/Pods-PodTest.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JKCategories" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/JKCategories/JKCategories.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "JKCategories" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | -------------------------------------------------------------------------------- /PodTest/Pods/Target Support Files/Pods-PodTest/Pods-PodTest.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_PodTest { 2 | umbrella header "Pods-PodTest-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /PodTest/Pods/Target Support Files/Pods-PodTest/Pods-PodTest.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/JKCategories" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/JKCategories/JKCategories.framework/Headers" 5 | OTHER_LDFLAGS = $(inherited) -framework "JKCategories" 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 9 | PODS_ROOT = ${SRCROOT}/Pods 10 | --------------------------------------------------------------------------------