diff --git a/Source/Classes/SLKTextViewController.h b/Source/Classes/SLKTextViewController.h index fb72325d..25773194 100644 --- a/Source/Classes/SLKTextViewController.h +++ b/Source/Classes/SLKTextViewController.h @@ -39,7 +39,7 @@ typedef NS_ENUM(NSUInteger, SLKKeyboardStatus) { }; /** @name A drop-in UIViewController subclass with a growing text input view and other useful messaging features. */ -@interface SLKTextViewController : UIViewController +NS_CLASS_AVAILABLE_IOS(7_0) @interface SLKTextViewController : UIViewController /** The main table view managed by the controller object. Created by default initializing with -init or initWithNibName:bundle: */ @property (nonatomic, readonly) UITableView *tableView; @@ -88,7 +88,7 @@ typedef NS_ENUM(NSUInteger, SLKKeyboardStatus) { */ @property (nonatomic, assign, getter = isInverted) BOOL inverted; -/** YES if the view controller is presented inside of a popover controller. If YES, the keyboard won't move the text input bar and tapping on the tableView/collectionView will not cause the keyboard to be dismissed. This doesn't do anything on iPhone. */ +/** YES if the view controller is presented inside of a popover controller. If YES, the keyboard won't move the text input bar and tapping on the tableView/collectionView will not cause the keyboard to be dismissed. This property is compatible only with iPad. */ @property (nonatomic, getter = isPresentedInPopover) BOOL presentedInPopover; /** Convenience accessors (accessed through the text input bar) */ diff --git a/Source/Classes/SLKTextViewController.m b/Source/Classes/SLKTextViewController.m index 3d70d109..729349be 100644 --- a/Source/Classes/SLKTextViewController.m +++ b/Source/Classes/SLKTextViewController.m @@ -304,6 +304,11 @@ - (BOOL)isEditing return NO; } +- (BOOL)isPresentedInPopover +{ + return _presentedInPopover && UI_IS_IPAD; +} + - (SLKTextView *)textView { return self.textInputbar.textView;