Various improvements

This commit is contained in:
Ilya Laktyushin
2022-04-24 06:30:30 +04:00
parent c929cce94f
commit b9f141aae4
10 changed files with 279 additions and 151 deletions

View File

@@ -50,5 +50,6 @@ NSInteger UITabBarItem_addSetBadgeListener(UITabBarItem * _Nonnull item, UITabBa
@property (nonatomic, strong) NSString * _Nullable animationName;
@property (nonatomic, assign) CGPoint animationOffset;
@property (nonatomic, assign) bool ringSelection;
@end

View File

@@ -18,6 +18,7 @@ static const void *setBadgeListenerBagKey = &setBadgeListenerBagKey;
static const void *badgeKey = &badgeKey;
static const void *animationNameKey = &animationNameKey;
static const void *animationOffsetKey = &animationOffsetKey;
static const void *ringSelectionKey = &ringSelectionKey;
@implementation UINavigationItem (Proxy)
@@ -419,4 +420,12 @@ NSInteger UITabBarItem_addSetBadgeListener(UITabBarItem *item, UITabBarItemSetBa
return ((NSValue *)[self associatedObjectForKey:animationOffsetKey]).CGPointValue;
}
- (void)setRingSelection:(bool)ringSelection {
[self setAssociatedObject:@(ringSelection) forKey:ringSelectionKey];
}
- (bool)ringSelection {
return ((NSNumber *)[self associatedObjectForKey:ringSelectionKey]).boolValue;
}
@end