- August 28, 2025
- Mins Read
A way to quickly add a notification icon to a UIView (iOS6 and up). Support
Code:
RKNotificationHub* hub = [[RKNotificationHub alloc]initWithView:yourView]; // sets the count to 0
[hub increment]; // increments the count to 1, making the notification visible
pod ‘RKNotificationHub’

[hub increment];
-(void)increment;
-(void)incrementBy:(int)amount;
-(void)decrement;
-(void)decrementBy:(int)amount;
@property (nonatomic, assign) int count; //%%% set to a certain number
Combine Actions!

[hub increment];
[hub pop];

//%%% COLOR
[hub setCircleColor:[UIColor colorWithRed:0.98 green:0.66 blue:0.2 alpha:1]
labelColor:[UIColor whiteColor]];

//%%% CIRCLE FRAME
[hub setCircleAtFrame:CGRectMake(-10, -10, 30, 30)]; //frame relative to the view you set it to
//%%% MOVE FRAME
[hub moveCircleByX:-5 Y:5]; // moves the circle 5 pixels left and down from its current position
//%%% CIRCLE SIZE
[hub scaleCircleSizeBy:2]; // doubles the size of the circle, keeps the same center

//%%% BLANK BADGE
[hub hideCount];
/* shoutout to imkevinxu for this suggestion */
[increment][self.view addSubview: yourView]?)[hideCount] anywhere. Call [showCount] to counter this[scaleCircleSizeBy:]. 0.5 will give you half the size, 2 will give you double[moveCircleByX: Y:]. This shifts the circle by the number of pixels given[setCircleAtFrame:] and give it your own CGRectNSUInteger (removed support for negative counts), made local constants static constThis package provides you with an easy way to show tooltips over any SwiftUI view, since Apple does not provide ...
SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or ...
Create Toast Views with Minimal Effort in SwiftUI Using SSToastMessage. SSToastMessage enables you to effortlessly add toast notifications, alerts, and ...