Skip to content

Commit

Permalink
make it work with TARGET_OS_TV
Browse files Browse the repository at this point in the history
  • Loading branch information
mickeyl authored and michaeltyson committed Nov 8, 2020
1 parent 79e0cb4 commit 90b94cc
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions TPKeyboardAvoiding/TPKeyboardAvoidingCollectionView.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
//

#import <UIKit/UIKit.h>

#if ! TARGET_OS_TV

#import "UIScrollView+TPKeyboardAvoidingAdditions.h"

@interface TPKeyboardAvoidingCollectionView : UICollectionView <UITextFieldDelegate, UITextViewDelegate>
- (BOOL)focusNextTextField;
- (void)scrollToActiveTextField;
@end

#endif
5 changes: 5 additions & 0 deletions TPKeyboardAvoiding/TPKeyboardAvoidingCollectionView.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#import "TPKeyboardAvoidingCollectionView.h"

#if ! TARGET_OS_TV

@interface TPKeyboardAvoidingCollectionView () <UITextFieldDelegate, UITextViewDelegate>
@end

Expand Down Expand Up @@ -111,3 +113,6 @@ -(void)layoutSubviews {
}

@end

#endif

5 changes: 5 additions & 0 deletions TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#import "TPKeyboardAvoidingScrollView.h"

#if ! TARGET_OS_TV

@interface TPKeyboardAvoidingScrollView () <UITextFieldDelegate, UITextViewDelegate>
@end

Expand Down Expand Up @@ -90,3 +92,6 @@ -(void)layoutSubviews {
}

@end

#endif

5 changes: 5 additions & 0 deletions TPKeyboardAvoiding/TPKeyboardAvoidingTableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#import "TPKeyboardAvoidingTableView.h"

#if ! TARGET_OS_TV

@interface TPKeyboardAvoidingTableView () <UITextFieldDelegate, UITextViewDelegate>
@end

Expand Down Expand Up @@ -115,3 +117,6 @@ -(void)layoutSubviews {
}

@end

#endif

5 changes: 5 additions & 0 deletions TPKeyboardAvoiding/UIScrollView+TPKeyboardAvoidingAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
//

#import "UIScrollView+TPKeyboardAvoidingAdditions.h"

#if ! TARGET_OS_TV

#import "TPKeyboardAvoidingScrollView.h"
#import <objc/runtime.h>

Expand Down Expand Up @@ -460,3 +463,5 @@ - (void)TPKeyboardAvoiding_initializeView:(UIView*)view {

@implementation TPKeyboardAvoidingState
@end

#endif

0 comments on commit 90b94cc

Please sign in to comment.