From a43ba9380f5b2a8dc8fcb268b3eb611e1dcfb471 Mon Sep 17 00:00:00 2001 From: Sam Spencer Date: Mon, 20 Apr 2015 17:41:35 -0400 Subject: [PATCH] Nullability & Deprecation Added nullability features available in Xcode 6.3. Added warnings to methods which will be deprecated in the next major release. Removed compile-time module check, because modules should now be the default. --- Classes/BEMSimpleLineGraphView.h | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/Classes/BEMSimpleLineGraphView.h b/Classes/BEMSimpleLineGraphView.h index 7dc90f9..ee4b2df 100644 --- a/Classes/BEMSimpleLineGraphView.h +++ b/Classes/BEMSimpleLineGraphView.h @@ -7,16 +7,9 @@ // Copyright (c) 2014 Sam Spencer. // -#if __has_feature(objc_modules) -// We recommend enabling Objective-C Modules in your project Build Settings for numerous benefits over regular #imports. Read more from the Modules documentation: http://clang.llvm.org/docs/Modules.html @import Foundation; @import UIKit; @import CoreGraphics; -#else -#import -#import -#import -#endif #import "BEMCircle.h" #import "BEMLine.h" @@ -30,6 +23,9 @@ extern const CGFloat BEMNullGraphValue; +// Tell the compiler to assume that no method should have a NULL value +NS_ASSUME_NONNULL_BEGIN + /// Simple line graph / chart UIView subclass for iOS apps. Creates beautiful line graphs (without huge memory impacts) using QuartzCore. IB_DESIGNABLE @interface BEMSimpleLineGraphView : UIView @@ -44,7 +40,7 @@ IB_DESIGNABLE @interface BEMSimpleLineGraphView : UIView delegate; +@property (nonatomic, weak, nullable) IBOutlet id delegate; @@ -123,17 +119,17 @@ IB_DESIGNABLE @interface BEMSimpleLineGraphView : UIView