热点连接流程修改
This commit is contained in:
@@ -29,12 +29,6 @@
|
||||
#import <UIKit/UIAccessibility.h>
|
||||
#import <UIKit/UIViewController.h>
|
||||
|
||||
@interface IQTitleBarButtonItem (PrivateAccessor)
|
||||
|
||||
@property(nonatomic, strong) UIButton *titleButton;
|
||||
|
||||
@end
|
||||
|
||||
@implementation IQToolbar
|
||||
@synthesize previousBarButton = _previousBarButton;
|
||||
@synthesize nextBarButton = _nextBarButton;
|
||||
@@ -89,11 +83,6 @@
|
||||
-(void)dealloc
|
||||
{
|
||||
self.items = nil;
|
||||
_previousBarButton = nil;
|
||||
_nextBarButton = nil;
|
||||
_titleBarButton = nil;
|
||||
_doneBarButton = nil;
|
||||
_fixedSpaceBarButton = nil;
|
||||
}
|
||||
|
||||
-(IQBarButtonItem *)previousBarButton
|
||||
@@ -101,7 +90,7 @@
|
||||
if (_previousBarButton == nil)
|
||||
{
|
||||
_previousBarButton = [[IQBarButtonItem alloc] initWithImage:nil style:UIBarButtonItemStylePlain target:nil action:nil];
|
||||
_previousBarButton.accessibilityLabel = @"Toolbar Previous Button";
|
||||
_previousBarButton.accessibilityLabel = @"Previous";
|
||||
}
|
||||
|
||||
return _previousBarButton;
|
||||
@@ -112,7 +101,7 @@
|
||||
if (_nextBarButton == nil)
|
||||
{
|
||||
_nextBarButton = [[IQBarButtonItem alloc] initWithImage:nil style:UIBarButtonItemStylePlain target:nil action:nil];
|
||||
_nextBarButton.accessibilityLabel = @"Toolbar Next Button";
|
||||
_nextBarButton.accessibilityLabel = @"Next";
|
||||
}
|
||||
|
||||
return _nextBarButton;
|
||||
@@ -123,7 +112,7 @@
|
||||
if (_titleBarButton == nil)
|
||||
{
|
||||
_titleBarButton = [[IQTitleBarButtonItem alloc] initWithTitle:nil];
|
||||
_titleBarButton.accessibilityLabel = @"Toolbar Title Button";
|
||||
_titleBarButton.accessibilityLabel = @"Title";
|
||||
}
|
||||
|
||||
return _titleBarButton;
|
||||
@@ -134,7 +123,7 @@
|
||||
if (_doneBarButton == nil)
|
||||
{
|
||||
_doneBarButton = [[IQBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:nil action:nil];
|
||||
_doneBarButton.accessibilityLabel = @"Toolbar Done Button";
|
||||
_doneBarButton.accessibilityLabel = @"Done";
|
||||
}
|
||||
|
||||
return _doneBarButton;
|
||||
@@ -145,18 +134,14 @@
|
||||
if (_fixedSpaceBarButton == nil)
|
||||
{
|
||||
_fixedSpaceBarButton = [[IQBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
|
||||
#ifdef __IPHONE_11_0
|
||||
if (@available(iOS 10.0, *))
|
||||
#else
|
||||
if (IQ_IS_IOS10_OR_GREATER)
|
||||
#endif
|
||||
{
|
||||
[_fixedSpaceBarButton setWidth:6];
|
||||
}
|
||||
else
|
||||
{
|
||||
[_fixedSpaceBarButton setWidth:20];
|
||||
}
|
||||
{
|
||||
[_fixedSpaceBarButton setWidth:6];
|
||||
}
|
||||
else
|
||||
{
|
||||
[_fixedSpaceBarButton setWidth:20];
|
||||
}
|
||||
}
|
||||
|
||||
return _fixedSpaceBarButton;
|
||||
@@ -171,23 +156,6 @@
|
||||
return sizeThatFit;
|
||||
}
|
||||
|
||||
-(void)setBarStyle:(UIBarStyle)barStyle
|
||||
{
|
||||
[super setBarStyle:barStyle];
|
||||
|
||||
if (self.titleBarButton.selectableTitleColor == nil)
|
||||
{
|
||||
if (barStyle == UIBarStyleDefault)
|
||||
{
|
||||
[self.titleBarButton.titleButton setTitleColor:[UIColor colorWithRed:0.0 green:0.5 blue:1.0 alpha:1.0] forState:UIControlStateNormal];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self.titleBarButton.titleButton setTitleColor:[UIColor yellowColor] forState:UIControlStateNormal];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-(void)setTintColor:(UIColor *)tintColor
|
||||
{
|
||||
[super setTintColor:tintColor];
|
||||
@@ -202,12 +170,8 @@
|
||||
{
|
||||
[super layoutSubviews];
|
||||
|
||||
//If running on Xcode9 (iOS11) only then we'll validate for iOS version, otherwise for older versions of Xcode (iOS10 and below) we'll just execute the tweak
|
||||
#ifdef __IPHONE_11_0
|
||||
if (@available(iOS 11.0, *)) {}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
else {
|
||||
CGRect leftRect = CGRectNull;
|
||||
CGRect rightRect = CGRectNull;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user