Skip to content

Commit

Permalink
#update - nullabilities further
Browse files Browse the repository at this point in the history
Signed-off-by: Ryne Cheow <[email protected]>
  • Loading branch information
rynecheow committed Oct 20, 2015
1 parent c4a4990 commit beea9cd
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 21 deletions.
5 changes: 3 additions & 2 deletions Code/Views/ATLAddressBarTextView.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
extern NSString *const ATLAddressBarPartAttributeName;
extern NSString *const ATLAddressBarNamePart;
extern NSString *const ATLAddressBarDelimiterPart;
Expand All @@ -29,10 +29,11 @@ extern CGFloat const ATLAddressBarTextContainerInset;

@interface ATLAddressBarTextView : UITextView

@property (nonatomic) UIFont *addressBarFont UI_APPEARANCE_SELECTOR;
@property (nonatomic, null_unspecified) UIFont *addressBarFont UI_APPEARANCE_SELECTOR;

@property (nonatomic) UIColor *addressBarTextColor UI_APPEARANCE_SELECTOR;

@property (nonatomic) UIColor *addressBarHighlightColor UI_APPEARANCE_SELECTOR;

@end
NS_ASSUME_NONNULL_END
3 changes: 2 additions & 1 deletion Code/Views/ATLAddressBarView.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#import <UIKit/UIKit.h>
#import "ATLAddressBarTextView.h"

NS_ASSUME_NONNULL_BEGIN
/**
@abstract The `ATLAddressBarView handles displaying the contents of the `ATLAddressBarController`.
*/
Expand All @@ -31,3 +31,4 @@
@property (nonatomic) UIButton *addContactsButton;

@end
NS_ASSUME_NONNULL_END
5 changes: 3 additions & 2 deletions Code/Views/ATLAvatarImageView.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#import <UIKit/UIKit.h>
#import "ATLAvatarItem.h"

NS_ASSUME_NONNULL_BEGIN
extern CGFloat const ATLAvatarImageDiameter;

/**
Expand All @@ -33,7 +33,7 @@ extern CGFloat const ATLAvatarImageDiameter;
@abstract An object conforming to the `ATLAvatarItem` protocol.
@disucssion The object's image or initials will be used for display in the receiver.
*/
@property (nonatomic) id<ATLAvatarItem> avatarItem;
@property (nonatomic, null_resettable) id<ATLAvatarItem> avatarItem;

/**
@abstract Sets the diameter for the avatar image view. Default is 30.
Expand Down Expand Up @@ -63,3 +63,4 @@ extern CGFloat const ATLAvatarImageDiameter;
- (void)resetView;

@end
NS_ASSUME_NONNULL_END
7 changes: 4 additions & 3 deletions Code/Views/ATLConversationCollectionViewFooter.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#import <UIKit/UIKit.h>

@class LYRMessage;

NS_ASSUME_NONNULL_BEGIN
extern NSString *const ATLConversationViewFooterIdentifier;

/**
Expand All @@ -39,14 +39,15 @@ extern NSString *const ATLConversationViewFooterIdentifier;
@abstract Displays a string of text representing the read status of a message.
@param recipientStatus The string representing the status.
*/
- (void)updateWithAttributedStringForRecipientStatus:(NSAttributedString *)recipientStatus;
- (void)updateWithAttributedStringForRecipientStatus:(nullable NSAttributedString *)recipientStatus;

/**
@abstract Performs calculations to determine the footer height.
@param recipientStatus An `NSAttributedString` containing attributes that will be used in the calculation.
@param clustered A boolean value to determines whether the message cell corresponding to the footer should be clustered with the previous cell. Messages sent within 60 seconds of each other are clustered.
@return The height for the footer.
*/
+ (CGFloat)footerHeightWithRecipientStatus:(NSAttributedString *)recipientStatus clustered:(BOOL)clustered;
+ (CGFloat)footerHeightWithRecipientStatus:(nullable NSAttributedString *)recipientStatus clustered:(BOOL)clustered;

@end
NS_ASSUME_NONNULL_END
5 changes: 3 additions & 2 deletions Code/Views/ATLConversationCollectionViewHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
@class LYRMessage;

extern NSString *const ATLConversationViewHeaderIdentifier;
Expand All @@ -33,7 +33,7 @@ extern NSString *const ATLConversationViewHeaderIdentifier;
/**
@abstract The message associated with the header.
*/
@property (nonatomic) LYRMessage *message;
@property (nonatomic, null_unspecified) LYRMessage *message;

/**
@abstract The font for the participant label displayed in the header. Default is 10pt system font.
Expand Down Expand Up @@ -68,3 +68,4 @@ extern NSString *const ATLConversationViewHeaderIdentifier;
+ (CGFloat)headerHeightWithDateString:(NSAttributedString *)dateString participantName:(NSString *)participantName inView:(UIView *)view;

@end
NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import <UIKit/UIKit.h>

extern NSString *const ATLMoreMessagesHeaderIdentifier;
extern NSString *__nonnull const ATLMoreMessagesHeaderIdentifier;

@interface ATLConversationCollectionViewMoreMessagesHeader : UICollectionReusableView

Expand Down
3 changes: 2 additions & 1 deletion Code/Views/ATLConversationTableViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#import <UIKit/UIKit.h>
#import "ATLConversationPresenting.h"

NS_ASSUME_NONNULL_BEGIN
/**
@abstract The `ATLConversationTableViewCell` class provides a lightweight, customizable table
view cell for presenting Layer conversation objects.
Expand Down Expand Up @@ -68,3 +68,4 @@
@property (nonatomic) UIColor *cellBackgroundColor UI_APPEARANCE_SELECTOR;

@end
NS_ASSUME_NONNULL_END
5 changes: 3 additions & 2 deletions Code/Views/ATLConversationView.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
@interface ATLConversationView : UIView

@property (nonatomic) UIView *inputAccessoryView;
@property (nonatomic, null_unspecified) UIView *inputAccessoryView;

@end
NS_ASSUME_NONNULL_END
2 changes: 1 addition & 1 deletion Code/Views/ATLIncomingMessageCollectionViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#import "ATLMessageCollectionViewCell.h"

extern NSString *const ATLIncomingMessageCellIdentifier;
extern NSString *__nonnull const ATLIncomingMessageCellIdentifier;

/**
@abstract The `ATLIncomingMessageCollectionViewCell` class provides a lightweight, customizable collection
Expand Down
4 changes: 3 additions & 1 deletion Code/Views/ATLMessageBubbleView.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#import <MapKit/MapKit.h>
#import "ATLProgressView.h"

NS_ASSUME_NONNULL_BEGIN
extern CGFloat const ATLMessageBubbleLabelVerticalPadding;
extern CGFloat const ATLMessageBubbleLabelHorizontalPadding;
extern CGFloat const ATLMessageBubbleMapWidth;
Expand Down Expand Up @@ -103,6 +104,7 @@ extern NSString *const ATLUserDidTapPhoneNumberNotification;
overriding this property's default value.
@default `UIMenuItem` copy action.
*/
@property (nonatomic) NSArray *menuControllerActions;
@property (nonatomic) NSArray <UIMenuItem*>*menuControllerActions;

@end
NS_ASSUME_NONNULL_END
2 changes: 2 additions & 0 deletions Code/Views/ATLMessageCollectionViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#import "ATLConstants.h"
#import "ATLAvatarImageView.h"

NS_ASSUME_NONNULL_BEGIN
extern CGFloat const ATLMessageCellHorizontalMargin;
extern NSString *const ATLGIFAccessibilityLabel;
extern NSString *const ATLImageAccessibilityLabel;
Expand Down Expand Up @@ -95,3 +96,4 @@ extern CGFloat const ATLAvatarImageTailPadding;
+ (CGFloat)cellHeightForMessage:(LYRMessage *)message inView:(UIView *)view;

@end
NS_ASSUME_NONNULL_END
3 changes: 2 additions & 1 deletion Code/Views/ATLMessageComposeTextView.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
/**
@abstract The ATLMessageComposeTextView handles displaying content in an
`ATLMessageInputToolbar`. The class provides support for displaying text,
Expand All @@ -39,3 +39,4 @@
@property (nonatomic, weak) UIResponder *overrideNextResponder;

@end
NS_ASSUME_NONNULL_END
4 changes: 3 additions & 1 deletion Code/Views/ATLMessageInputToolbar.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#import "ATLMessageComposeTextView.h"
#import "ATLMediaAttachment.h"

NS_ASSUME_NONNULL_BEGIN
@class ATLMessageInputToolbar;

extern NSString *const ATLMessageInputToolbarDidChangeHeightNotification;
Expand Down Expand Up @@ -168,7 +169,7 @@ extern NSString *const ATLMessageInputToolbarAccessibilityLabel;
@abstract An array of all media attachments displayed in the text view.
@discussion Any existing media attachments will be removed when the right accessory button is tapped.
*/
@property (nonatomic, readonly) NSArray *mediaAttachments;
@property (nonatomic, readonly, nullable) NSArray <ATLMediaAttachment*>*mediaAttachments;

//-------------------
// Layout Accessories
Expand All @@ -182,3 +183,4 @@ extern NSString *const ATLMessageInputToolbarAccessibilityLabel;
@property (nonatomic, weak) UIViewController *containerViewController;

@end
NS_ASSUME_NONNULL_END
2 changes: 1 addition & 1 deletion Code/Views/ATLOutgoingMessageCollectionViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#import "ATLMessageCollectionViewCell.h"

extern NSString *const ATLOutgoingMessageCellIdentifier;
extern NSString *__nonnull const ATLOutgoingMessageCellIdentifier;

/**
@abstract The `ATLOutgoingMessageCollectionViewCell` class provides a lightweight, customizable collection
Expand Down
3 changes: 2 additions & 1 deletion Code/Views/ATLParticipantSectionHeaderView.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
/**
@abstract The `ATLParticipantSectionHeaderView` displays a letter representing a section
in the participant picker.
Expand Down Expand Up @@ -47,3 +47,4 @@
@property (nonatomic) UIColor *sectionHeaderBackgroundColor UI_APPEARANCE_SELECTOR;

@end
NS_ASSUME_NONNULL_END
3 changes: 2 additions & 1 deletion Code/Views/ATLParticipantTableViewCell.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#import <UIKit/UIKit.h>
#import "ATLParticipantPresenting.h"
#import "ATLParticipant.h"

NS_ASSUME_NONNULL_BEGIN
/**
@abstract The `ATLParticipantTableViewCell` class provides a lightweight, customizable table
view cell for presenting Layer conversation participants.
Expand All @@ -44,3 +44,4 @@
@property (nonatomic) UIColor *titleColor UI_APPEARANCE_SELECTOR;

@end
NS_ASSUME_NONNULL_END
2 changes: 2 additions & 0 deletions Code/Views/ATLProgressView.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
/**
@abstract A custom progress view that displays the progress in a circular
shape. It includes two visual components: a subtle transparent background
Expand All @@ -46,3 +47,4 @@
- (void)setProgress:(float)newProgress animated:(BOOL)animated;

@end
NS_ASSUME_NONNULL_END

0 comments on commit beea9cd

Please sign in to comment.