Skip to content

Commit

Permalink
Override -[TWTNibBackedView layoutSubviews] to layout contentView
Browse files Browse the repository at this point in the history
* Override -layoutSubviews in TWTNibBackedView to transparently layout contentView
* Update CocoaPods version number to 0.19
  • Loading branch information
Prachi Gauriar committed Sep 13, 2016
1 parent 4fbd7b6 commit a2db5d2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Foundation/Date Range/TWTDateRange.h
Expand Up @@ -60,7 +60,7 @@ NS_ASSUME_NONNULL_BEGIN
this date is before the start date.
@result An initialized date range instance with the specified start and end dates.
*/
- (instancetype)initWithStartDate:(NSDate *)startDate endDate:(NSDate *)endDate NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithStartDate:(nullable NSDate *)startDate endDate:(nullable NSDate *)endDate NS_DESIGNATED_INITIALIZER;


/*!
Expand Down
2 changes: 1 addition & 1 deletion TWTToast.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "TWTToast"
s.version = "0.18"
s.version = "0.19"
s.summary = "Tools and Utilities for Cocoa Development"
s.homepage = "https://github.com/twotoasters/Toast"
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
6 changes: 5 additions & 1 deletion UIKit/Nib-Backed View/TWTNibBackedView.h
Expand Up @@ -27,6 +27,8 @@
#import <UIKit/UIKit.h>


NS_ASSUME_NONNULL_BEGIN

/*!
The TWTNibBacking protocol simply declares the +nib message. This allows users of a class to easily
get the nib that backs it. This is useful when doing things like, e.g., registering a nib for a
Expand Down Expand Up @@ -104,6 +106,8 @@
@discussion The base implementation of this method does nothing. Subclasses should override this
if they wish to perform some initialization after the nib has been loaded.
*/
- (void)didInstantiateObjectsInBackingNib __attribute__((objc_requires_super));
- (void)didInstantiateObjectsInBackingNib NS_REQUIRES_SUPER;

@end

NS_ASSUME_NONNULL_END
7 changes: 7 additions & 0 deletions UIKit/Nib-Backed View/TWTNibBackedView.m
Expand Up @@ -63,6 +63,13 @@ - (void)instantiateObjectsInBackingNib
}


- (void)layoutSubviews
{
[super layoutSubviews];
[self.contentView layoutIfNeeded];
}


- (void)didInstantiateObjectsInBackingNib
{
}
Expand Down

0 comments on commit a2db5d2

Please sign in to comment.