• Stars
    star
    1,296
  • Rank 36,309 (Top 0.8 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 12 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Customizable UIKit badge view like the one on applications in the iOS springboard.

JSBadgeView

CI Status Version License Platform

Customizable UIKit badge view like the one on applications in the iOS springboard. Very optimized for performance: drawn entirely using CoreGraphics.

Snapshoot:

Usage

  • Clone the repository:
$ git clone [email protected]:JaviSoto/JSBadgeView.git
  • Check out the sample project.

  • Drag the JSBadgeView folder into your project.

  • Include the header file:

#import "JSBadgeView.h"
  • Create a JSBadgeView and attach it to a view at the position you like. Example:
JSBadgeView *badgeView = [[JSBadgeView alloc] initWithParentView:rectangle alignment:JSBadgeViewAlignmentTopRight];
badgeView.badgeText = @"3";
  • Check the header file for all the things you can customize.

CocoaPods:

  • Add pod 'JSBadgeView' to your Podfile.
  • You're done!

UIAppearance

  • You can customize all JSBadgeViews in your application, or the ones that are subviews of a specific type of view, using UIAppearance. Example:
[[JSBadgeView appearance] setBadgeBackgroundColor:UIColor.blackColor];
[[JSBadgeView appearance] setBadgeAlignment:JSBadgeViewAlignmentTopRight];

Compatibility

  • Supports ARC. If you want to use it in a project without ARC, mark JSBadgeView.m with the linker flag -fobjc-arc.
  • Compatible with iOS7.0+.

MIT License

Copyright 2013 Javier Soto ([email protected])

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

iOS10-Runtime-Headers

iOS 10 Runtime Headers
Objective-C
975
star
2

JSAnimatedImagesView

UIView subclass to easily add a cool animated photo carrusel to your iOS app
Objective-C
408
star
3

JSDecoupledAppDelegate

UIApplicationDelegate class that separates the different responsibilities into more more reusable classes.
Objective-C
353
star
4

JSErrorStackTrace

Category on NSError that stores the stack trace of the creation of the NSError object for later retrieval
Objective-C
122
star
5

Talks

A repo with the talks I've given at conferences, etc
Swift
85
star
6

RubikSwift

Rubik's cube API in Swift + a genetic solver algorithm
Swift
79
star
7

SwiftNeuralNetwork

Swift
76
star
8

Base-iOS-View-Controllers

Convenient base VCs for all your iPhone projects if you, like me, like writing less code. Allows to very easily create controllers with table views, controllers to show data from core data, adjusting the view with the keyboard easily and automatically, and more.
Objective-C
44
star
9

SwiftPoker

Experimental implementation of Poker (Texas Hold'em) rules in Swift Lang
Swift
39
star
10

NotificationCenterSpy

Class to enable NSLogging all NSNotifications being posted in real time
Objective-C
33
star
11

JSSetBreakpointOnMethodForObject

C function that makes the debugger stop whenever an Objective-C method with the specified selector is called on the specified object.
Objective-C
28
star
12

JSReachability

Easy to use iOS class to asynchronously monitor the internet connectivity and reachability of a host.
Objective-C
27
star
13

JSRestNetworkKit

Lightweight library to manage the backend of your iOS / Mac OSX applications perfect to work against a model-based REST backend
Objective-C
27
star
14

JSPebbleReminders

Pebble watchapp and iOS app to retrieve reminders and display them on the watch.
Objective-C
27
star
15

Blog-Posts

My blog posts published in www.javiersoto.me
Swift
26
star
16

JSBarrierOperationQueue

NSOperationQueue subclass that allows you to add operations that behave as a barrier. Basically providing the same functionality dispatch_barrier_async provides in the GCD world.
Objective-C
24
star
17

SwiftChessEngine

Prototype chess engine written in Swift with https://github.com/nvzqz/Sage
Swift
22
star
18

Github-JumpToObjCCounterPart-ChromeExt

Control+Command+Up shortcut to navigate between header and implementation in Objective-C files in Github
JavaScript
16
star
19

JSCache

Simple and fast thread-safe key-value cache class to easily archive objects and cache images to disk (built on top of EGOCache)
Objective-C
15
star
20

UIImageView-AFNetworkingJSAdditions

Improvements over AFNetworking image download handling, meant for perfect perfomance on table views and the ability to fade images in when they finish loading. Requires my fork on AFNetworking
Objective-C
14
star
21

JSLiveCameraFilters

Easy to use UIView subclass to implement a camera feed with real time filters using Core Image (iOS5+)
Objective-C
11
star
22

bash-alfred-workflow

Alfred Workflow to run a bash command and see the output on the Alfred window
PHP
11
star
23

JSTAPIToolsURLProtocol

Easily make your application redirects some of the HTTP(s) requests it makes to your https://www.apitools.com/ account.
Objective-C
9
star
24

Pusher

Mac OSX app to send push notifications to your phone using Pushover
Objective-C
3
star
25

Block-based-UIKit-classes

Subclasses of frequently used UIKit classes to avoid having to implement the delegate method for more readable code
Objective-C
3
star
26

Taller-iOS-Betabeers-Demo-2

Twitter Client
Objective-C
1
star
27

ActiveConfig-SampleNodeBackend

Sample ActiveConfig backend that runs on Heroku.
JavaScript
1
star
28

Taller-iOS-Betabeers-Demo-1

Web Browser
Objective-C
1
star
29

SwiftRayTracer

Swift
1
star
30

javisoto.github.com

Placeholder project to redirect javisoto.github.com to my personal website
1
star
31

watchOSNotificationActionHandlingRadar

A watchOS application to demonstrate a bug when trying to use SwiftUI's NavigationStack to navigate when handling a notification
Swift
1
star