Skip to content
This repository was archived by the owner on Feb 17, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .vs/Xamarin.IQKeyboardManager/xs/UserPrefs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Properties StartupConfiguration="{1BF10656-5BD7-4612-BB4D-F23B7526DCA4}|Default">
<MonoDevelop.Ide.Workbench ActiveDocument="IQKeyboardManager.Sample/IQKeyboardManager.SampleViewController.cs">
<Files>
<File FileName="IQKeyboardManager.Sample/IQKeyboardManager.SampleViewController.cs" Line="41" Column="1" />
<File FileName="Xamarin.IQKeyboardManager/ApiDefinitions.cs" Line="7" Column="18" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="Xamarin.IQKeyboardManager" expanded="True" selected="True">
<Node name="IQKeyboardManager.Sample" expanded="True" />
<Node name="Xamarin.IQKeyboardManager" expanded="True" />
</Node>
</State>
</Pad>
</Pads>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MultiItemStartupConfigurations />
<MonoDevelop.Ide.ItemProperties.IQKeyboardManager.Sample PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.CBCAF0AD-435C-4806-AB2C-7F26E6761C28" />
</Properties>
Empty file.
Binary file not shown.
22 changes: 8 additions & 14 deletions IQKeyboardManager.Sample/IQKeyboardManager.SampleViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,11 @@ public override void ViewDidLoad ()
{
base.ViewDidLoad ();

Xamarin.IQKeyboardManager.SharedManager.EnableAutoToolbar = true;
Xamarin.IQKeyboardManager.SharedManager.ShouldResignOnTouchOutside = true;
Xamarin.IQKeyboardManager.SharedManager.ShouldToolbarUsesTextFieldTintColor = true;
Xamarin.IQKeyboardManager.SharedManager.KeyboardDistanceFromTextField = 300f;
Xamarin.IQKeyboardManager.SharedManager().EnableAutoToolbar = true;
Xamarin.IQKeyboardManager.SharedManager().ShouldResignOnTouchOutside = true;
Xamarin.IQKeyboardManager.SharedManager().ShouldToolbarUsesTextFieldTintColor = true;
Xamarin.IQKeyboardManager.SharedManager().KeyboardDistanceFromTextField = 300f;

var npac = Xamarin.IQKeyboardManager.SharedManager.ToolbarPreviousNextAllowedClasses;

var vc = this.View.ViewController();
var dh = this.View.DebugHierarchy();
var isAlertView = this.View.IsAlertViewTextField();
var isSearchView = this.View.IsSearchBarTextField();
}

partial void BtnGetControlType_TouchUpInside(UIButton sender)
Expand All @@ -47,10 +41,10 @@ partial void BtnGetControlType_TouchUpInside(UIButton sender)

if (firstResponder != null)
{
var vc = firstResponder.ViewController();
var dh = firstResponder.DebugHierarchy();
var isAlertView = firstResponder.IsAlertViewTextField();
var isSearchView = firstResponder.IsSearchBarTextField();
//var vc = firstResponder.ViewController;
//var dh = firstResponder.DebugHierarchy();
//var isAlertView = firstResponder.IsAlertViewTextField();
//var isSearchView = firstResponder.IsSearchBarTextField();
}
}

Expand Down
883 changes: 505 additions & 378 deletions Xamarin.IQKeyboardManager/ApiDefinitions.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.


#import <UIKit/UIBarButtonItem.h>

@class NSInvocation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#import "IQUITextFieldView+Additions.h"
#import "IQUIView+Hierarchy.h"
#import "IQUIViewController+Additions.h"
#import "IQUIWindow+Hierarchy.h"
#import "IQKeyboardManagerConstants.h"
#import "IQTextView.h"
#import "IQBarButtonItem.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@
// THE SOFTWARE.

#import "IQKeyboardManagerConstants.h"
#import "IQUIView+IQKeyboardToolbar.h"
#import "IQPreviousNextView.h"
#import "IQUIViewController+Additions.h"
#import "IQKeyboardReturnKeyHandler.h"
#import "IQTextView.h"
#import "IQToolbar.h"
#import "IQUIScrollView+Additions.h"
#import "IQUITextFieldView+Additions.h"
#import "IQBarButtonItem.h"
#import "IQTitleBarButtonItem.h"
#import "IQUIView+Hierarchy.h"

#import <CoreGraphics/CGBase.h>

Expand Down Expand Up @@ -61,7 +72,7 @@ extern NSInteger const kIQPreviousNextButtonToolbarTag;
///--------------------------

/**
Returns the default singleton instance.
Returns the default singleton instance. You are not allowed to create your own instances of this class.
*/
+ (nonnull instancetype)sharedManager;

Expand All @@ -75,11 +86,6 @@ extern NSInteger const kIQPreviousNextButtonToolbarTag;
*/
@property(nonatomic, assign) CGFloat keyboardDistanceFromTextField;

/**
Prevent keyboard manager to slide up the rootView to more than keyboard height. Default is YES.
*/
@property(nonatomic, assign) BOOL preventShowingBottomBlankSpace;

/**
Refreshes textField/textView position if any external changes is explicitly made by user.
*/
Expand Down Expand Up @@ -137,26 +143,39 @@ extern NSInteger const kIQPreviousNextButtonToolbarTag;
@property(nonatomic, assign) IQPreviousNextDisplayMode previousNextDisplayMode;

/**
Toolbar done button icon, If nothing is provided then check toolbarDoneBarButtonItemText to draw done button.
Toolbar previous/next/done button icon, If nothing is provided then check toolbarDoneBarButtonItemText to draw done button.
*/
@property(nullable, nonatomic, strong) UIImage *toolbarPreviousBarButtonItemImage;
@property(nullable, nonatomic, strong) UIImage *toolbarNextBarButtonItemImage;
@property(nullable, nonatomic, strong) UIImage *toolbarDoneBarButtonItemImage;

/**
Toolbar done button text, If nothing is provided then system default 'UIBarButtonSystemItemDone' will be used.
Toolbar previous/next/done button text, If nothing is provided then system default 'UIBarButtonSystemItemDone' will be used.
*/
@property(nullable, nonatomic, strong) NSString *toolbarPreviousBarButtonItemText;
@property(nullable, nonatomic, strong) NSString *toolbarNextBarButtonItemText;
@property(nullable, nonatomic, strong) NSString *toolbarDoneBarButtonItemText;

/**
If YES, then it add the textField's placeholder text on IQToolbar. Default is YES.
*/
@property(nonatomic, assign) BOOL shouldShowTextFieldPlaceholder __attribute__((deprecated("This is renamed to `shouldShowToolbarPlaceholder` for more clear naming.")));
@property(nonatomic, assign) BOOL shouldShowToolbarPlaceholder;

/**
Placeholder Font. Default is nil.
*/
@property(nullable, nonatomic, strong) UIFont *placeholderFont;

/**
Placeholder Color. Default is nil. Which means lightGray
*/
@property(nullable, nonatomic, strong) UIColor *placeholderColor;

/**
Placeholder Button Color when it's treated as button. Default is nil. Which means iOS Blue for light toolbar and Yellow for dark toolbar
*/
@property(nullable, nonatomic, strong) UIColor *placeholderButtonColor;

/**
Reload all toolbar buttons on the fly.
*/
Expand Down Expand Up @@ -231,15 +250,6 @@ extern NSInteger const kIQPreviousNextButtonToolbarTag;
*/
@property(nonatomic, assign) BOOL layoutIfNeededOnUpdate;

///-----------------------------------------------
/// @name InteractivePopGestureRecognizer handling
///-----------------------------------------------

/**
If YES, then always consider UINavigationController.view begin point as {0,0}, this is a workaround to fix a bug #464 because there are no notification mechanism exist when UINavigationController.view.frame gets changed internally.
*/
@property(nonatomic, assign) BOOL shouldFixInteractivePopGestureRecognizer;

///---------------------------------------------
/// @name Class Level enabling/disabling methods
///---------------------------------------------
Expand Down Expand Up @@ -308,7 +318,7 @@ extern NSInteger const kIQPreviousNextButtonToolbarTag;
@property(nonatomic, assign) BOOL enableDebugging;

/**
@warning Use below methods to completely enable/disable notifications registered by library internally. Please keep in mind that library is totally dependent on NSNotification of UITextField, UITextField, Keyboard etc. If you do unregisterAllNotifications then library will not work at all. You should only use below methods if you want to completedly disable all library functions. You should use below methods at your own risk.
@warning Use these methods to completely enable/disable notifications registered by library internally. Please keep in mind that library is totally dependent on NSNotification of UITextField, UITextField, Keyboard etc. If you do unregisterAllNotifications then library will not work at all. You should only use below methods if you want to completedly disable all library functions. You should use below methods at your own risk.
*/
-(void)registerAllNotifications;
-(void)unregisterAllNotifications;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,22 @@ typedef NS_ENUM(NSUInteger, IQPreviousNextDisplayMode) {
IQPreviousNextDisplayModeAlwaysShow,
};

/**
`IQEnableModeDefault`
Pick default settings.

`IQEnableModeEnabled`
setting is enabled.

`IQEnableModeDisabled`
setting is disabled.
*/
typedef NS_ENUM(NSUInteger, IQEnableMode) {
IQEnableModeDefault,
IQEnableModeEnabled,
IQEnableModeDisabled,
};

#endif

/*
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@
*/
@property(nullable, nonatomic,copy) IBInspectable NSString *placeholder;

/**
Set textView's placeholder attributed text. Default is nil.
*/
@property(nullable, nonatomic,copy) IBInspectable NSAttributedString *attributedPlaceholder;

/**
To set textView's placeholder text color. Default is nil.
*/
@property(nullable, nonatomic,copy) IBInspectable UIColor *placeholderTextColor;

@end


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,14 @@
@property(nullable, nonatomic, strong) UIFont *titleFont;

/**
selectableTextColor to be used for displaying button text when button is enabled.
titleColor to be used for displaying button text when displaying title (disabled state).
*/
@property(nullable, nonatomic, strong) UIColor *selectableTextColor;
@property(nullable, nonatomic, strong) UIColor *titleColor;

/**
selectableTitleColor to be used for displaying button text when button is enabled.
*/
@property(nullable, nonatomic, strong) UIColor *selectableTitleColor;

/**
Initialize with frame and title.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,10 @@
*/
@property(nonnull, nonatomic, strong) IQBarButtonItem *doneBarButton;

/**
Fixed space bar button of toolbar.
*/
@property(nonnull, nonatomic, strong) IQBarButtonItem *fixedSpaceBarButton;

@end

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

#import <UIKit/UIKit.h>
#import <UIKit/UITableView.h>
#import <UIKit/UICollectionView.h>


@interface UIScrollView (Additions)
Expand All @@ -37,4 +38,18 @@
@property(nonatomic, assign) BOOL shouldRestoreScrollViewContentOffset;


@end

@interface UITableView (PreviousNextIndexPath)

-(nullable NSIndexPath*)previousIndexPathOfIndexPath:(nonnull NSIndexPath*)indexPath;
//-(nullable NSIndexPath*)nextIndexPathOfIndexPath:(nonnull NSIndexPath*)indexPath;

@end

@interface UICollectionView (PreviousNextIndexPath)

-(nullable NSIndexPath*)previousIndexPathOfIndexPath:(nonnull NSIndexPath*)indexPath;
//-(nullable NSIndexPath*)nextIndexPathOfIndexPath:(nonnull NSIndexPath*)indexPath;

@end
Loading