Nibitaph foundation Objective-C 2.1 classes for OS X (10.6-) and iOS (5.0-) development. ARC and retain/release.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
GKAffineTransform.h
GKAffineTransform.m
GKApplication.h
GKApplication.m
GKArraySelectionViewController.h
GKArraySelectionViewController.m
GKArraySelectionViewController.xib
GKBezierPath.h
GKBezierPath.m
GKBorderlessWindowMenuItemPopoverProtocol.h
GKBorderlessWindowMenuItemPopoverWindow.h
GKBorderlessWindowMenuItemPopoverWindow.m
GKBorderlessWindowMenuItemViewProxy.h
GKBorderlessWindowMenuItemViewProxy.m
GKCGPathElement.h
GKCGPathElement.m
GKCGPathEvaluator.h
GKCGPathEvaluator.m
GKCGPathPointValues.h
GKCGPathPointValues.m
GKCIFilterBase(ProtectedMethods).h
GKCIFilterBase.h
GKCIFilterBase.m
GKColor+ColorHexName.h
GKColor+ColorHexName.m
GKColor+CoreImage.h
GKColor+CoreImage.m
GKColor.h
GKColor.m
GKColorArraySelectionViewController.h
GKColorArraySelectionViewController.m
GKColorPickerViewController.h
GKColorPickerViewController.m
GKColorPickerViewControllerIOS.xib
GKColorPickerViewControllerOSX.xib
GKColorRGBA.h
GKColorRGBA.m
GKColorWheelController.h
GKColorWheelController.m
GKColorWheelViewXibbler.h
GKColorWheelViewXibbler.m
GKColorWheelViewXibblerIOS.xib
GKColorWheelViewXibblerOSX.xib
GKControl.h
GKControl.m
GKControlValueBinding(AppKit).h
GKControlValueBinding(AppKit).m
GKControlValueBinding(UIKit).h
GKControlValueBinding(UIKit).m
GKControlValueBindingProtocol.h
GKControlValueBindingProtocol.m
GKControlXibbler.h
GKControlXibbler.m
GKCoreGraphics.h
GKCoreGraphics.m
GKCoreText.h
GKCoreText.m
GKDispatch.h
GKDispatch.m
GKDispatchQueue.h
GKDispatchQueue.m
GKDispatchQueueConcurrent.h
GKDispatchQueueConcurrent.m
GKDispatchSource(Protected).h
GKDispatchSource.h
GKDispatchSource.m
GKDisplayLink.h
GKDisplayLink.m
GKFont.h
GKFont.m
GKFontArraySelectionViewController.h
GKFontArraySelectionViewController.m
GKGeometry.h
GKGeometryPolarPoint.h
GKGraphicsContext.h
GKGraphicsContext.m
GKImage+CoreGraphics.h
GKImage+CoreGraphics.m
GKImage+CoreImage.h
GKImage+CoreImage.m
GKImage.h
GKImage.m
GKManualSegueAction.h
GKManualSegueAction.m
GKMenuTableViewDataSource.h
GKMenuTableViewDataSource.m
GKModelObjectBase.h
GKModelObjectBase.m
GKNSSplitViewPane.h
GKNSSplitViewPane.m
GKNSSplitViewPaneController.h
GKNSSplitViewPaneController.m
GKNSThread.h
GKNSThread.m
GKNib.h
GKNib.m
GKNibModelViewController.h
GKNibModelViewController.m
GKNibPopUpMenuViewController.h
GKNibPopUpMenuViewController.m
GKNibViewController.h
GKNibViewController.m
GKNibViewControllerSubViewIOS.h
GKNibViewControllerSubViewIOS.m
GKPopoverMenuTableViewController.h
GKPopoverMenuTableViewController.m
GKResponder.h
GKResponder.m
GKRunLoop.h
GKSingleTouchView(AppKit).h
GKSingleTouchView(AppKit).m
GKSingleTouchView(UIKit).h
GKSingleTouchView(UIKit).m
GKSingleTouchView.h
GKSingleTouchView.m
GKSingleton.h
GKSingleton.m
GKSingletonUnitTest.h
GKSingletonUnitTest.m
GKSnowOutletModelPopoverMenuControllerOSX.h
GKSnowOutletModelPopoverMenuControllerOSX.m
GKSnowPopoverMenuControllerOSX(CloseButton).h
GKSnowPopoverMenuControllerOSX(CloseButton).m
GKSnowPopoverMenuControllerOSX.h
GKSnowPopoverMenuControllerOSX.m
GKSnowPopoverMenuControllerOSX.xib
GKStoryboard.h
GKStoryboard.m
GKStrongReferencer.h
GKStrongReferencer.m
GKTextFieldToolbarController.h
GKTextFieldToolbarController.m
GKTextFieldToolbarControllerIOS.h
GKTextFieldToolbarControllerIOS.m
GKTextFieldToolbarControllerOSX.h
GKTextFieldToolbarControllerOSX.m
GKTextStorage.h
GKTextStorage.m
GKTransparentBackgroundSearchBar.h
GKTransparentBackgroundSearchBar.m
GKTransparentBackgroundSearchBar.png
GKUIViewXibbler.h
GKUIViewXibbler.m
GKView.h
GKView.m
GKViewController+PopoverAction.h
GKViewController+PopoverAction.m
GKViewController+StoryboardXibs.h
GKViewController+StoryboardXibs.m
GKViewController+xibTopLevelOwnedObjects.h
GKViewController+xibTopLevelOwnedObjects.m
GKViewController.h
GKViewController.m
GKViewControllerViewXibbler.h
GKViewControllerViewXibbler.m
GKViewXibbler.h
GKViewXibbler.m
GKWindow.h
GKWindow.m
GKXibblerSuperview.h
GKXibblerSuperview.m
LICENSE
NSDictionary+NSAttributedString.h
NSDictionary+NSAttributedString.m
NSObject+AssociatedProperties.h
NSObject+AssociatedProperties.m
NSString+HTMLEntities.h
NSString+HTMLEntities.m
README.md
UFoundationArcSingletonPattern.h
UFoundationColor.h
UFoundationFont.h
UFoundationImage.h
UIAffineTransform.h
UIAffineTransform.m
UIApplication+Utilities.h
UIApplication+Utilities.m
UIGraphicsContext.h
UIGraphicsContext.m
UIImage+CGImageHelpers.h
UIImage+CGImageHelpers.m
UIViewController+NavigationRootedPopOver.h
UIViewController+NavigationRootedPopOver.m

README.md

GKApplication

Protocol-oriented Objective-C 2.1 library for OS X (10.6-) and iOS (5.0-) development. ARC or no ARC.

Attempts to unify UIKit and AppKit programming by establishing an interface union between analogous classes in UIKit and AppKit.

For example, both UIView and NSView have a designated initializer initWithFrame:

However, NSView defines it this way:

  • (instancetype)initWithFrame:(NSRect)frame;

And UIView defines it thusly:

  • (instancetype)initWithFrame:(CGRect)frame;

By writing code using the GKApplication library, you can write this:

#import "GKView.h"'

@interface MyView : GKView
- (instancetype)initWithFrame:(GKRect)frame;
@end

// Under MacOS X, this code effectively expands to:
@interface MyView : NSView
- (instancetype)initWithFrame:(NSRect)frame;
@end

// Under iOS, this code expands to:
@interface MyView : UIView
- (instancetype)initWithFrame:(CGRect)frame;
@end

( DETAILS https://github.com/genkiyooka/GKApplication/blob/master/GKView.h )

When a method is missing from UIKit that AppKit includes, or vice-versa, GKApplication implements an analogous method with the exact prototype so that the code is uniform across platforms. One simply need change any UIKit code by changing all UIViews to GKViews, all CGRects to GKRect etc. Or, if porting from Cocoa to GKApplication, use GKViewController in place of NSViewController.

The resulting code is suprisingly uniform and portable.

( BEST CASE EXAMPLE https://github.com/genkiyooka/GKApplication/blob/master/GKColorPickerViewController.* )

It may seem counter-intuitive, but once these base symbols and protocols are established, it becomes quite easy to write code which runs uniformly on both iOS and Mac and behaves in a manner consistent across the platforms. Drawing with CoreGraphics functions will make the code more portable.

GKApplication provides the overall cross-platform basis for macOS/iOS development in the Nibitaph project.

FOR MORE INFORMATION

https://github.com/genkiyooka/Nibitaph