Skip to content

Commit

Permalink
Nullability and lightweight generics annotations on NYTPhotosOverlayView
Browse files Browse the repository at this point in the history
  • Loading branch information
cdzombak committed Oct 19, 2015
1 parent b4a6332 commit 8bf274d
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions Pod/Classes/ios/NYTPhotosOverlayView.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@

@import UIKit;

NS_ASSUME_NONNULL_BEGIN

/**
* A view that overlays an `NYTPhotosViewController`, and houses the left and right abr button items, a title, and a caption view.
* A view that overlays an `NYTPhotosViewController`, and houses the left and right bar button items, a title, and a caption view.
*/
@interface NYTPhotosOverlayView : UIView

Expand All @@ -21,36 +23,38 @@
/**
* The title of the overlay. Centered between the left and right bar button items.
*/
@property (nonatomic) NSString *title;
@property (nonatomic, copy, nullable) NSString *title;

/**
* The attributes of the overlay's title.
*/
@property (nonatomic) NSDictionary *titleTextAttributes;
@property(nonatomic, copy, nullable) NSDictionary <NSString *, id> *titleTextAttributes;

This comment has been minimized.

Copy link
@zhiyanshao

zhiyanshao Oct 23, 2015

I am getting build errors now after pod install because of this change. I use swift on xcode 6.4
screen shot 2015-10-23 at 9 33 24 am

This comment has been minimized.

Copy link
@cdzombak

cdzombak Oct 23, 2015

Author Contributor

The new version of this library, which is on the develop branch and hasn't been versioned yet, will require Xcode 7 and support iOS 8+. If you need to support older versions of Xcode or iOS, please use the currently-released version of the library (tagged 0.1.2).

This comment has been minimized.

Copy link
@zhiyanshao

zhiyanshao Oct 23, 2015

I see. Changing from head to 0.1.2 fixed the issue. Thanks!

This comment has been minimized.

Copy link
@cdzombak

cdzombak via email Oct 23, 2015

Author Contributor

/**
* The bar button item appearing at the top left of the overlay.
*/
@property (nonatomic) UIBarButtonItem *leftBarButtonItem;
@property (nonatomic, nullable) UIBarButtonItem *leftBarButtonItem;

/**
* The bar button items appearing at the top left of the overlay.
*/
@property (nonatomic, copy) NSArray *leftBarButtonItems;
@property (nonatomic, copy, nullable) NSArray <UIBarButtonItem *> *leftBarButtonItems;

/**
* The bar button item appearing at the top right of the overlay.
*/
@property (nonatomic) UIBarButtonItem *rightBarButtonItem;
@property (nonatomic, nullable) UIBarButtonItem *rightBarButtonItem;

/**
* The bar button items appearing at the top right of the overlay.
*/
@property (nonatomic, copy) NSArray *rightBarButtonItems;
@property (nonatomic, copy, nullable) NSArray <UIBarButtonItem *> *rightBarButtonItems;

/**
* A view representing the caption for the photo, which will be set to full width and locked to the bottom. Can be any `UIView` object, but is expected to respond to `intrinsicContentSize` appropriately to calculate height.
*/
@property (nonatomic) UIView *captionView;
@property (nonatomic, nullable) UIView *captionView;

@end

NS_ASSUME_NONNULL_END

0 comments on commit 8bf274d

Please sign in to comment.