热点连接流程修改
This commit is contained in:
+18
-51
@@ -87,16 +87,12 @@
|
||||
keyboardPreviousiOS9Image = [UIImage imageNamed:@"IQButtonBarArrowLeft" inBundle:resourcesBundle compatibleWithTraitCollection:nil];;
|
||||
|
||||
//Support for RTL languages like Arabic, Persia etc... (Bug ID: #448)
|
||||
#ifdef __IPHONE_11_0
|
||||
if (@available(iOS 9.0, *)) {
|
||||
#endif
|
||||
if ([UIImage instancesRespondToSelector:@selector(imageFlippedForRightToLeftLayoutDirection)])
|
||||
{
|
||||
keyboardPreviousiOS9Image = [keyboardPreviousiOS9Image imageFlippedForRightToLeftLayoutDirection];
|
||||
}
|
||||
#ifdef __IPHONE_11_0
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return keyboardPreviousiOS9Image;
|
||||
@@ -121,16 +117,12 @@
|
||||
keyboardNextiOS9Image = [UIImage imageNamed:@"IQButtonBarArrowRight" inBundle:resourcesBundle compatibleWithTraitCollection:nil];
|
||||
|
||||
//Support for RTL languages like Arabic, Persia etc... (Bug ID: #448)
|
||||
#ifdef __IPHONE_11_0
|
||||
if (@available(iOS 9.0, *)) {
|
||||
#endif
|
||||
if ([UIImage instancesRespondToSelector:@selector(imageFlippedForRightToLeftLayoutDirection)])
|
||||
{
|
||||
keyboardNextiOS9Image = [keyboardNextiOS9Image imageFlippedForRightToLeftLayoutDirection];
|
||||
}
|
||||
#ifdef __IPHONE_11_0
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return keyboardNextiOS9Image;
|
||||
@@ -155,16 +147,12 @@
|
||||
keyboardPreviousiOS10Image = [UIImage imageNamed:@"IQButtonBarArrowUp" inBundle:resourcesBundle compatibleWithTraitCollection:nil];
|
||||
|
||||
//Support for RTL languages like Arabic, Persia etc... (Bug ID: #448)
|
||||
#ifdef __IPHONE_11_0
|
||||
if (@available(iOS 9.0, *)) {
|
||||
#endif
|
||||
if ([UIImage instancesRespondToSelector:@selector(imageFlippedForRightToLeftLayoutDirection)])
|
||||
{
|
||||
keyboardPreviousiOS10Image = [keyboardPreviousiOS10Image imageFlippedForRightToLeftLayoutDirection];
|
||||
}
|
||||
#ifdef __IPHONE_11_0
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return keyboardPreviousiOS10Image;
|
||||
@@ -189,16 +177,12 @@
|
||||
keyboardNextiOS10Image = [UIImage imageNamed:@"IQButtonBarArrowDown" inBundle:resourcesBundle compatibleWithTraitCollection:nil];
|
||||
|
||||
//Support for RTL languages like Arabic, Persia etc... (Bug ID: #448)
|
||||
#ifdef __IPHONE_11_0
|
||||
if (@available(iOS 9.0, *)) {
|
||||
#endif
|
||||
if ([UIImage instancesRespondToSelector:@selector(imageFlippedForRightToLeftLayoutDirection)])
|
||||
{
|
||||
keyboardNextiOS10Image = [keyboardNextiOS10Image imageFlippedForRightToLeftLayoutDirection];
|
||||
}
|
||||
#ifdef __IPHONE_11_0
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return keyboardNextiOS10Image;
|
||||
@@ -206,11 +190,7 @@
|
||||
|
||||
+(UIImage*)keyboardPreviousImage
|
||||
{
|
||||
#ifdef __IPHONE_11_0
|
||||
if (@available(iOS 10.0, *))
|
||||
#else
|
||||
if (IQ_IS_IOS10_OR_GREATER)
|
||||
#endif
|
||||
{
|
||||
return [UIImage keyboardPreviousiOS10Image];
|
||||
}
|
||||
@@ -222,11 +202,7 @@
|
||||
|
||||
+(UIImage*)keyboardNextImage
|
||||
{
|
||||
#ifdef __IPHONE_11_0
|
||||
if (@available(iOS 10.0, *))
|
||||
#else
|
||||
if (IQ_IS_IOS10_OR_GREATER)
|
||||
#endif
|
||||
{
|
||||
return [UIImage keyboardNextiOS10Image];
|
||||
}
|
||||
@@ -277,16 +253,6 @@
|
||||
return [shouldHideToolbarPlaceholder boolValue];
|
||||
}
|
||||
|
||||
-(void)setShouldHidePlaceholderText:(BOOL)shouldHidePlaceholderText
|
||||
{
|
||||
[self setShouldHideToolbarPlaceholder:shouldHidePlaceholderText];
|
||||
}
|
||||
|
||||
-(BOOL)shouldHidePlaceholderText
|
||||
{
|
||||
return [self shouldHideToolbarPlaceholder];
|
||||
}
|
||||
|
||||
-(void)setToolbarPlaceholder:(NSString *)toolbarPlaceholder
|
||||
{
|
||||
objc_setAssociatedObject(self, @selector(toolbarPlaceholder), toolbarPlaceholder, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
||||
@@ -300,16 +266,6 @@
|
||||
return toolbarPlaceholder;
|
||||
}
|
||||
|
||||
-(void)setPlaceholderText:(NSString*)placeholderText
|
||||
{
|
||||
[self setToolbarPlaceholder:placeholderText];
|
||||
}
|
||||
|
||||
-(NSString*)placeholderText
|
||||
{
|
||||
return [self toolbarPlaceholder];
|
||||
}
|
||||
|
||||
-(NSString *)drawingToolbarPlaceholder
|
||||
{
|
||||
if (self.shouldHideToolbarPlaceholder)
|
||||
@@ -330,11 +286,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
-(NSString*)drawingPlaceholderText
|
||||
{
|
||||
return [self drawingToolbarPlaceholder];
|
||||
}
|
||||
|
||||
#pragma mark - Private helper
|
||||
|
||||
+(IQBarButtonItem*)flexibleBarButtonItem
|
||||
@@ -377,6 +328,8 @@
|
||||
prev = [[IQBarButtonItem alloc] initWithImage:previousBarButtonConfiguration.image style:UIBarButtonItemStylePlain target:target action:previousBarButtonConfiguration.action];
|
||||
prev.invocation = toolbar.previousBarButton.invocation;
|
||||
prev.accessibilityLabel = toolbar.previousBarButton.accessibilityLabel;
|
||||
prev.enabled = toolbar.previousBarButton.enabled;
|
||||
prev.tag = toolbar.previousBarButton.tag;
|
||||
toolbar.previousBarButton = prev;
|
||||
}
|
||||
else if (previousBarButtonConfiguration.title)
|
||||
@@ -384,6 +337,8 @@
|
||||
prev = [[IQBarButtonItem alloc] initWithTitle:previousBarButtonConfiguration.title style:UIBarButtonItemStylePlain target:target action:previousBarButtonConfiguration.action];
|
||||
prev.invocation = toolbar.previousBarButton.invocation;
|
||||
prev.accessibilityLabel = toolbar.previousBarButton.accessibilityLabel;
|
||||
prev.enabled = toolbar.previousBarButton.enabled;
|
||||
prev.tag = toolbar.previousBarButton.tag;
|
||||
toolbar.previousBarButton = prev;
|
||||
}
|
||||
else
|
||||
@@ -391,6 +346,8 @@
|
||||
prev = [[IQBarButtonItem alloc] initWithBarButtonSystemItem:previousBarButtonConfiguration.barButtonSystemItem target:target action:previousBarButtonConfiguration.action];
|
||||
prev.invocation = toolbar.previousBarButton.invocation;
|
||||
prev.accessibilityLabel = toolbar.previousBarButton.accessibilityLabel;
|
||||
prev.enabled = toolbar.previousBarButton.enabled;
|
||||
prev.tag = toolbar.previousBarButton.tag;
|
||||
toolbar.previousBarButton = prev;
|
||||
}
|
||||
|
||||
@@ -418,6 +375,8 @@
|
||||
next = [[IQBarButtonItem alloc] initWithImage:nextBarButtonConfiguration.image style:UIBarButtonItemStylePlain target:target action:nextBarButtonConfiguration.action];
|
||||
next.invocation = toolbar.nextBarButton.invocation;
|
||||
next.accessibilityLabel = toolbar.nextBarButton.accessibilityLabel;
|
||||
next.enabled = toolbar.nextBarButton.enabled;
|
||||
next.tag = toolbar.nextBarButton.tag;
|
||||
toolbar.nextBarButton = next;
|
||||
}
|
||||
else if (nextBarButtonConfiguration.title)
|
||||
@@ -425,6 +384,8 @@
|
||||
next = [[IQBarButtonItem alloc] initWithTitle:nextBarButtonConfiguration.title style:UIBarButtonItemStylePlain target:target action:nextBarButtonConfiguration.action];
|
||||
next.invocation = toolbar.nextBarButton.invocation;
|
||||
next.accessibilityLabel = toolbar.nextBarButton.accessibilityLabel;
|
||||
next.enabled = toolbar.nextBarButton.enabled;
|
||||
next.tag = toolbar.nextBarButton.tag;
|
||||
toolbar.nextBarButton = next;
|
||||
}
|
||||
else
|
||||
@@ -432,6 +393,8 @@
|
||||
next = [[IQBarButtonItem alloc] initWithBarButtonSystemItem:nextBarButtonConfiguration.barButtonSystemItem target:target action:nextBarButtonConfiguration.action];
|
||||
next.invocation = toolbar.nextBarButton.invocation;
|
||||
next.accessibilityLabel = toolbar.nextBarButton.accessibilityLabel;
|
||||
next.enabled = toolbar.nextBarButton.enabled;
|
||||
next.tag = toolbar.nextBarButton.tag;
|
||||
toolbar.nextBarButton = next;
|
||||
}
|
||||
|
||||
@@ -445,10 +408,8 @@
|
||||
|
||||
//Title button
|
||||
toolbar.titleBarButton.title = titleText;
|
||||
#ifdef __IPHONE_11_0
|
||||
if (@available(iOS 11.0, *)) {}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
toolbar.titleBarButton.customView.frame = CGRectZero;
|
||||
}
|
||||
@@ -474,6 +435,8 @@
|
||||
done = [[IQBarButtonItem alloc] initWithImage:rightBarButtonConfiguration.image style:UIBarButtonItemStylePlain target:target action:rightBarButtonConfiguration.action];
|
||||
done.invocation = toolbar.doneBarButton.invocation;
|
||||
done.accessibilityLabel = toolbar.doneBarButton.accessibilityLabel;
|
||||
done.enabled = toolbar.doneBarButton.enabled;
|
||||
done.tag = toolbar.doneBarButton.tag;
|
||||
toolbar.doneBarButton = done;
|
||||
}
|
||||
else if (rightBarButtonConfiguration.title)
|
||||
@@ -481,6 +444,8 @@
|
||||
done = [[IQBarButtonItem alloc] initWithTitle:rightBarButtonConfiguration.title style:UIBarButtonItemStylePlain target:target action:rightBarButtonConfiguration.action];
|
||||
done.invocation = toolbar.doneBarButton.invocation;
|
||||
done.accessibilityLabel = toolbar.doneBarButton.accessibilityLabel;
|
||||
done.enabled = toolbar.doneBarButton.enabled;
|
||||
done.tag = toolbar.doneBarButton.tag;
|
||||
toolbar.doneBarButton = done;
|
||||
}
|
||||
else
|
||||
@@ -488,6 +453,8 @@
|
||||
done = [[IQBarButtonItem alloc] initWithBarButtonSystemItem:rightBarButtonConfiguration.barButtonSystemItem target:target action:rightBarButtonConfiguration.action];
|
||||
done.invocation = toolbar.doneBarButton.invocation;
|
||||
done.accessibilityLabel = toolbar.doneBarButton.accessibilityLabel;
|
||||
done.enabled = toolbar.doneBarButton.enabled;
|
||||
done.tag = toolbar.doneBarButton.tag;
|
||||
toolbar.doneBarButton = done;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user