diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..7ebbd1b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+<<<<<<< HEAD
+XUIKit.xcodeproj/xcuserdata
+=======
+Carthage/Build
+.DS_Store
+*.xcuserdatad
+>>>>>>> refs/remotes/mz2/master
diff --git a/Resources/Info.plist b/Resources/Info.plist
index 8ad60c9..3d55dbd 100644
--- a/Resources/Info.plist
+++ b/Resources/Info.plist
@@ -9,7 +9,7 @@
CFBundleIconFile
CFBundleIdentifier
- com.iccir.XUIKit
+ $(PRODUCT_BUNDLE_IDENTIFIER)
CFBundleInfoDictionaryVersion
6.0
CFBundleName
diff --git a/Source/XUIBezierPathAdditions.h b/Source/XUIBezierPathAdditions.h
index 0d37d04..9b226ad 100644
--- a/Source/XUIBezierPathAdditions.h
+++ b/Source/XUIBezierPathAdditions.h
@@ -18,6 +18,8 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#import
+
#import
@@ -31,7 +33,7 @@
- (void) addLineToPoint:(CGPoint)point;
- (void) addCurveToPoint:(CGPoint)endPoint controlPoint1:(CGPoint)controlPoint1 controlPoint2:(CGPoint)controlPoint2;
- (void) addQuadCurveToPoint:(CGPoint)endPoint controlPoint:(CGPoint)controlPoint;
-- (void) addArcWithCenter:(CGPoint)center radius:(CGFloat)radius startAngle:(CGFloat)startAngle endAngle:(CGFloat)endAngle clockwise:(BOOL)clockwise __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0);
+- (void) addArcWithCenter:(CGPoint)center radius:(CGFloat)radius startAngle:(CGFloat)startAngle endAngle:(CGFloat)endAngle clockwise:(BOOL)clockwise;
- (void) appendPath:(NSBezierPath *)bezierPath;
- (void) applyTransform:(CGAffineTransform)transform;
diff --git a/Source/XUIColorAdditions.h b/Source/XUIColorAdditions.h
index 6a71f2b..f542bb9 100644
--- a/Source/XUIColorAdditions.h
+++ b/Source/XUIColorAdditions.h
@@ -18,6 +18,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#import
@interface NSColor (XUIKitAdditions)
diff --git a/Source/XUIFontAdditions.h b/Source/XUIFontAdditions.h
index f65d37c..eb73a29 100644
--- a/Source/XUIFontAdditions.h
+++ b/Source/XUIFontAdditions.h
@@ -18,6 +18,8 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#import
+
@interface NSFont (XUIKitAdditions)
+ (NSArray *) familyNames;
diff --git a/Source/XUIFontAdditions.m b/Source/XUIFontAdditions.m
index 422a95b..1705d78 100644
--- a/Source/XUIFontAdditions.m
+++ b/Source/XUIFontAdditions.m
@@ -93,7 +93,7 @@ - (CGFloat) xui_lineHeight
int unitsPerEm = CTFontGetUnitsPerEm(ctFont);
long ascent = lroundf( ( CTFontGetAscent( ctFont) / unitsPerEm) * pointSize);
- long descent = lroundf(-(-abs(CTFontGetDescent(ctFont)) / unitsPerEm) * pointSize);
+ long descent = lroundf(-(-fabs(CTFontGetDescent(ctFont)) / unitsPerEm) * pointSize);
long lineGap = lroundf( ( CTFontGetLeading(ctFont) / unitsPerEm) * pointSize);
return ascent + descent + lineGap;
diff --git a/Source/XUIGeometry.h b/Source/XUIGeometry.h
index a673e01..35cd80b 100644
--- a/Source/XUIGeometry.h
+++ b/Source/XUIGeometry.h
@@ -18,7 +18,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import
+#import
#import
diff --git a/Source/XUIGraphics.h b/Source/XUIGraphics.h
index 7199a20..0e79bf9 100644
--- a/Source/XUIGraphics.h
+++ b/Source/XUIGraphics.h
@@ -18,6 +18,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#import
#import
@class NSImage;
diff --git a/Source/XUIImageAdditions.h b/Source/XUIImageAdditions.h
index 2514e43..feaf94f 100644
--- a/Source/XUIImageAdditions.h
+++ b/Source/XUIImageAdditions.h
@@ -19,8 +19,7 @@
*/
#import
-#import
-
+#import
@class CIImage;
diff --git a/Source/XUIIndexPathAdditions.h b/Source/XUIIndexPathAdditions.h
index 4895386..11cf26a 100644
--- a/Source/XUIIndexPathAdditions.h
+++ b/Source/XUIIndexPathAdditions.h
@@ -17,8 +17,10 @@
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import
+#import
+
+#import
@interface NSIndexPath (XUIKitAdditions)
diff --git a/Source/XUIKit.h b/Source/XUIKit.h
index 8fbbcec..3ca9b7a 100644
--- a/Source/XUIKit.h
+++ b/Source/XUIKit.h
@@ -20,6 +20,7 @@
*/
#import
+#import
#import
#import
diff --git a/Source/XUIValueAdditions.h b/Source/XUIValueAdditions.h
index 1100afb..222e0ca 100644
--- a/Source/XUIValueAdditions.h
+++ b/Source/XUIValueAdditions.h
@@ -18,6 +18,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#import
#import
#import
diff --git a/Source/XUIView.h b/Source/XUIView.h
index 2c3d6a1..e05b08d 100644
--- a/Source/XUIView.h
+++ b/Source/XUIView.h
@@ -18,6 +18,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#import
#import
#import
#import
diff --git a/Source/XUIViewAdditions.h b/Source/XUIViewAdditions.h
index 20cb436..ee0b5a7 100644
--- a/Source/XUIViewAdditions.h
+++ b/Source/XUIViewAdditions.h
@@ -18,6 +18,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#import
#import
diff --git a/XUIKit.podspec b/XUIKit.podspec
new file mode 100644
index 0000000..6f6ccd6
--- /dev/null
+++ b/XUIKit.podspec
@@ -0,0 +1,21 @@
+Pod::Spec.new do |s|
+ s.name = "XUIKit"
+ s.version = "1.0.0"
+ s.summary = "XUIKit uses categories to make NSBezierPath, NSColor, NSFont completely API compatible with their UIKit counterparts."
+
+ s.description = <<-DESC
+ XUIKit uses categories to make NSBezierPath, NSColor, NSFont completely API compatible with their UIKit counterparts.
+ DESC
+
+ s.homepage = "https://github.com/iccir/XUIKit"
+ s.license = { :type => "MIT", :file => "LICENSE" }
+ s.author = { "Ricci Adams" => "leonard@hecker.io" }
+
+ s.platform = :osx
+ s.source = { :git => "https://github.com/iccir/XUIKit.git", :tag => "1.0.0" }
+
+ s.source_files = "Source/*.{h,m}"
+ s.public_header_files = "Source/*.h"
+
+ s.requires_arc = true
+end
diff --git a/XUIKit.xcodeproj/project.pbxproj b/XUIKit.xcodeproj/project.pbxproj
index 2d122f1..f37e783 100644
--- a/XUIKit.xcodeproj/project.pbxproj
+++ b/XUIKit.xcodeproj/project.pbxproj
@@ -12,26 +12,26 @@
551008EA159BEE7D00C86022 /* XUIGeometry.m in Sources */ = {isa = PBXBuildFile; fileRef = 55545A3814EC6B1B0074B45E /* XUIGeometry.m */; };
551008EB159BEE7D00C86022 /* XUIGraphics.m in Sources */ = {isa = PBXBuildFile; fileRef = 55545A2E14EC68F80074B45E /* XUIGraphics.m */; };
55100902159BEE7D00C86022 /* XUIView.m in Sources */ = {isa = PBXBuildFile; fileRef = 55545A1E14EC60D70074B45E /* XUIView.m */; };
- 55100903159BEEA600C86022 /* XUIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 55D4248614EDDB31001F6F71 /* XUIKit.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 55100907159BEED100C86022 /* XUIGeometry.h in Headers */ = {isa = PBXBuildFile; fileRef = 55545A3714EC6B1B0074B45E /* XUIGeometry.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 55100908159BEED100C86022 /* XUIGraphics.h in Headers */ = {isa = PBXBuildFile; fileRef = 55545A2D14EC68F70074B45E /* XUIGraphics.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 55100920159BEED100C86022 /* XUIView.h in Headers */ = {isa = PBXBuildFile; fileRef = 55545A1D14EC60D70074B45E /* XUIView.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 559BE0C2159C151F00A1735C /* XUIBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 55545A3514EC69500074B45E /* XUIBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 55100903159BEEA600C86022 /* XUIKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 55D4248614EDDB31001F6F71 /* XUIKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 55100907159BEED100C86022 /* XUIGeometry.h in Headers */ = {isa = PBXBuildFile; fileRef = 55545A3714EC6B1B0074B45E /* XUIGeometry.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 55100908159BEED100C86022 /* XUIGraphics.h in Headers */ = {isa = PBXBuildFile; fileRef = 55545A2D14EC68F70074B45E /* XUIGraphics.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 55100920159BEED100C86022 /* XUIView.h in Headers */ = {isa = PBXBuildFile; fileRef = 55545A1D14EC60D70074B45E /* XUIView.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 559BE0C2159C151F00A1735C /* XUIBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 55545A3514EC69500074B45E /* XUIBase.h */; settings = {ATTRIBUTES = (Public, ); }; };
559BE0EF159C19F900A1735C /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 559BE0EE159C19F800A1735C /* QuartzCore.framework */; };
- 55F84906181CC05700BABB66 /* XUITypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F84905181CC05700BABB66 /* XUITypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 55F8490C181CC13A00BABB66 /* XUIBezierPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F84908181CC13A00BABB66 /* XUIBezierPathAdditions.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 55F84906181CC05700BABB66 /* XUITypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F84905181CC05700BABB66 /* XUITypes.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 55F8490C181CC13A00BABB66 /* XUIBezierPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F84908181CC13A00BABB66 /* XUIBezierPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
55F8490D181CC13A00BABB66 /* XUIBezierPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F84909181CC13A00BABB66 /* XUIBezierPathAdditions.m */; };
- 55F8490E181CC13A00BABB66 /* XUIColorAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F8490A181CC13A00BABB66 /* XUIColorAdditions.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 55F8490E181CC13A00BABB66 /* XUIColorAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F8490A181CC13A00BABB66 /* XUIColorAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
55F8490F181CC13A00BABB66 /* XUIColorAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F8490B181CC13A00BABB66 /* XUIColorAdditions.m */; };
- 55F84912181CC16C00BABB66 /* XUIFontAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F84910181CC16C00BABB66 /* XUIFontAdditions.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 55F84912181CC16C00BABB66 /* XUIFontAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F84910181CC16C00BABB66 /* XUIFontAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
55F84913181CC16C00BABB66 /* XUIFontAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F84911181CC16C00BABB66 /* XUIFontAdditions.m */; };
- 55F84916181CC21A00BABB66 /* XUIIndexPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F84914181CC21A00BABB66 /* XUIIndexPathAdditions.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 55F84916181CC21A00BABB66 /* XUIIndexPathAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F84914181CC21A00BABB66 /* XUIIndexPathAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
55F84917181CC21A00BABB66 /* XUIIndexPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F84915181CC21A00BABB66 /* XUIIndexPathAdditions.m */; };
- 55F8491A181CC22500BABB66 /* XUIValueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F84918181CC22500BABB66 /* XUIValueAdditions.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 55F8491A181CC22500BABB66 /* XUIValueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F84918181CC22500BABB66 /* XUIValueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
55F8491B181CC22500BABB66 /* XUIValueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F84919181CC22500BABB66 /* XUIValueAdditions.m */; };
55F8491E181CC2BB00BABB66 /* XUIViewAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F8491C181CC2BB00BABB66 /* XUIViewAdditions.m */; };
- 55F8491F181CC2BB00BABB66 /* XUIViewAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F8491D181CC2BB00BABB66 /* XUIViewAdditions.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 55F84922181CC99900BABB66 /* XUIImageAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F84920181CC99900BABB66 /* XUIImageAdditions.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 55F8491F181CC2BB00BABB66 /* XUIViewAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F8491D181CC2BB00BABB66 /* XUIViewAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 55F84922181CC99900BABB66 /* XUIImageAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 55F84920181CC99900BABB66 /* XUIImageAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; };
55F84923181CC99900BABB66 /* XUIImageAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 55F84921181CC99900BABB66 /* XUIImageAdditions.m */; };
/* End PBXBuildFile section */
@@ -272,7 +272,7 @@
555459F514EC607B0074B45E /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0600;
+ LastUpgradeCheck = 0730;
};
buildConfigurationList = 555459F814EC607B0074B45E /* Build configuration list for PBXProject "XUIKit" */;
compatibilityVersion = "Xcode 3.2";
@@ -328,10 +328,14 @@
baseConfigurationReference = 5579297B14FEE1FC00FCDE7C /* XUIKit_Mac_Debug.xcconfig */;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
+ DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
GCC_PREFIX_HEADER = Source/XUIKitPrefix.pch;
MACH_O_TYPE = mh_dylib;
+ MACOSX_DEPLOYMENT_TARGET = 10.10;
+ PRODUCT_BUNDLE_IDENTIFIER = com.iccir.XUIKit;
+ VALID_ARCHS = x86_64;
};
name = Debug;
};
@@ -341,10 +345,14 @@
buildSettings = {
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
+ DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
GCC_PREFIX_HEADER = Source/XUIKitPrefix.pch;
MACH_O_TYPE = mh_dylib;
+ MACOSX_DEPLOYMENT_TARGET = 10.10;
+ PRODUCT_BUNDLE_IDENTIFIER = com.iccir.XUIKit;
+ VALID_ARCHS = x86_64;
};
name = Profile;
};
@@ -354,16 +362,22 @@
buildSettings = {
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
+ DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
GCC_PREFIX_HEADER = Source/XUIKitPrefix.pch;
MACH_O_TYPE = mh_dylib;
+ MACOSX_DEPLOYMENT_TARGET = 10.10;
+ PRODUCT_BUNDLE_IDENTIFIER = com.iccir.XUIKit;
+ VALID_ARCHS = x86_64;
};
name = Release;
};
55545A1214EC607B0074B45E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEFINES_MODULE = YES;
+ ENABLE_TESTABILITY = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
};
@@ -372,6 +386,7 @@
55545A1314EC607B0074B45E /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEFINES_MODULE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
};
name = Profile;
@@ -379,6 +394,7 @@
5579298314FEE20900FCDE7C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ DEFINES_MODULE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
};
name = Release;
diff --git a/XUIKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/XUIKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/XUIKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/XUIKit.xcodeproj/xcshareddata/xcschemes/XUIKit.xcscheme b/XUIKit.xcodeproj/xcshareddata/xcschemes/XUIKit.xcscheme
new file mode 100644
index 0000000..289980b
--- /dev/null
+++ b/XUIKit.xcodeproj/xcshareddata/xcschemes/XUIKit.xcscheme
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+