Top Related Projects
A React-inspired view framework for iOS.
Smooth asynchronous user interfaces for iOS apps.
Cocoa framework and Obj-C dynamism bindings for ReactiveSwift.
A delightful networking framework for iOS, macOS, watchOS, and tvOS.
Elegant HTTP Networking in Swift
Bolts is a collection of low-level libraries designed to make developing mobile apps easier.
Quick Overview
Nimbus is an iOS framework designed to accelerate app development. It provides a collection of well-documented, modular, and extensible Objective-C components that solve common iOS development challenges. Nimbus aims to enhance productivity by offering reusable components and best practices for iOS app development.
Pros
- Comprehensive set of UI components and utilities
- Well-documented and maintained
- Modular architecture allowing developers to use only needed components
- Follows iOS design patterns and best practices
Cons
- Primarily focused on Objective-C, which may be less relevant for newer Swift-based projects
- Some components may require additional setup or configuration
- Learning curve for developers unfamiliar with the framework
- May add unnecessary overhead for smaller projects
Code Examples
- Adding a photo album view:
NIPhotoAlbumScrollView* photoAlbumView = [[NIPhotoAlbumScrollView alloc] initWithFrame:self.view.bounds];
photoAlbumView.dataSource = self;
[self.view addSubview:photoAlbumView];
- Creating a network image view:
NINetworkImageView* imageView = [[NINetworkImageView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
imageView.contentMode = UIViewContentModeScaleAspectFit;
[imageView setPathToNetworkImage:@"https://example.com/image.jpg"];
[self.view addSubview:imageView];
- Implementing a table view with Nimbus:
NITableViewModel* model = [[NITableViewModel alloc] initWithListArray:@[
@"Row 1",
@"Row 2",
@"Row 3"
]];
NITableViewActions* actions = [[NITableViewActions alloc] initWithTarget:self];
self.tableView.dataSource = model;
self.tableView.delegate = [NITableViewActions actionsDelegateForUITableView:self.tableView withActions:actions];
Getting Started
- Add Nimbus to your project using CocoaPods:
pod 'Nimbus', '~> 1.3'
- Import Nimbus in your source files:
#import <Nimbus/Nimbus.h>
- Start using Nimbus components in your view controllers and views:
NIButtonFormElement* button = [NIButtonFormElement buttonElementWithID:0
title:@"Submit"
tappedTarget:self
tappedSelector:@selector(submitButtonTapped:)];
NITableViewModel* model = [[NITableViewModel alloc] initWithSectionedArray:@[button]];
self.tableView.dataSource = model;
Competitor Comparisons
A React-inspired view framework for iOS.
Pros of ComponentKit
- Declarative UI programming model for better maintainability
- Efficient rendering through automatic diffing and batching
- Strong focus on component reusability and composition
Cons of ComponentKit
- Steeper learning curve due to its unique architecture
- Limited to iOS development, while Nimbus supports multiple platforms
- Less flexibility for custom UI elements compared to Nimbus
Code Comparison
ComponentKit:
CKComponentScope scope(self, [NSString stringWithFormat:@"%@", @(index)]);
return [CKStackLayoutComponent
newWithView:{[UIView class], {{@selector(setBackgroundColor:), [UIColor whiteColor]}}}
size:{}
style:{.alignItems = CKStackLayoutAlignItemsStretch}
children:{
{[CKLabelComponent newWithLabelAttributes:{} text:text]}
}
];
Nimbus:
NITableViewActions *actions = [[NITableViewActions alloc] initWithTarget:self];
[actions attachToClass:[NISubtitleCellObject class]
tapSelector:@selector(tappedOnObject:)];
self.tableViewModel = [[NITableViewModel alloc] initWithListArray:objects
delegate:(id)[NICellFactory class]];
Smooth asynchronous user interfaces for iOS apps.
Pros of AsyncDisplayKit
- Designed for asynchronous and concurrent rendering, leading to smoother scrolling and better performance
- Offers a more comprehensive set of UI components and layout system
- Actively maintained by a large community and used in high-profile apps
Cons of AsyncDisplayKit
- Steeper learning curve due to its unique approach to UI construction
- Larger codebase and potentially higher memory footprint
- May be overkill for simpler applications that don't require advanced performance optimizations
Code Comparison
AsyncDisplayKit:
ASDisplayNode *node = [[ASDisplayNode alloc] init];
node.backgroundColor = [UIColor redColor];
node.bounds = CGRectMake(0, 0, 100, 100);
[self.view addSubnode:node];
Nimbus:
NITableViewModel *model = [[NITableViewModel alloc] initWithListArray:@[@"Item 1", @"Item 2"]];
NITableViewActions *actions = [[NITableViewActions alloc] initWithTarget:self];
self.tableView.dataSource = model;
self.tableView.delegate = actions;
While AsyncDisplayKit focuses on high-performance rendering and layout, Nimbus provides a more traditional approach to iOS development with a focus on simplifying common tasks. AsyncDisplayKit is better suited for complex, performance-critical apps, while Nimbus may be more appropriate for rapid development of simpler applications.
Cocoa framework and Obj-C dynamism bindings for ReactiveSwift.
Pros of ReactiveCocoa
- Provides a robust framework for reactive programming in iOS and macOS
- Offers powerful abstractions for handling asynchronous events and data streams
- Integrates well with Swift and Objective-C, supporting modern iOS development practices
Cons of ReactiveCocoa
- Steeper learning curve, especially for developers new to reactive programming
- Can lead to more complex code for simple tasks compared to traditional approaches
- Requires careful management to avoid memory leaks and retain cycles
Code Comparison
ReactiveCocoa:
let searchResults = searchTextField.reactive.continuousTextValues
.throttle(0.3, on: QueueScheduler.main)
.flatMap(.latest) { (query: String) -> SignalProducer<[SearchResult], NoError> in
return API.search(query)
}
Nimbus:
NITableViewModel *model = [[NITableViewModel alloc] initWithListArray:@[
@"Row 1",
@"Row 2",
@"Row 3"
]];
self.tableView.dataSource = model;
ReactiveCocoa focuses on reactive programming patterns, while Nimbus provides a more traditional approach to iOS development with utility classes and UI components. ReactiveCocoa offers powerful abstractions for handling asynchronous events, while Nimbus simplifies common iOS development tasks with its pre-built components.
A delightful networking framework for iOS, macOS, watchOS, and tvOS.
Pros of AFNetworking
- More focused on networking tasks, providing a comprehensive set of tools for HTTP/HTTPS operations
- Actively maintained with frequent updates and a large community
- Supports modern iOS features like background transfers and security configurations
Cons of AFNetworking
- Limited to networking functionality, unlike Nimbus which offers a broader range of UI components
- May require additional libraries for non-networking tasks
- Steeper learning curve for developers new to iOS networking concepts
Code Comparison
AFNetworking:
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
[manager GET:@"https://api.example.com/data" parameters:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
NSLog(@"JSON: %@", responseObject);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
NSLog(@"Error: %@", error);
}];
Nimbus:
NINetworkImageView *imageView = [[NINetworkImageView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
imageView.contentMode = UIViewContentModeScaleAspectFit;
[imageView setPathToNetworkImage:@"https://example.com/image.jpg"];
[self.view addSubview:imageView];
While AFNetworking focuses on general networking tasks, Nimbus provides UI components like NINetworkImageView for easy image loading. AFNetworking offers more flexibility for complex networking operations, while Nimbus simplifies common UI-related tasks.
Elegant HTTP Networking in Swift
Pros of Alamofire
- More active development and larger community support
- Comprehensive networking features, including request/response serialization and authentication
- Swift-native implementation, leveraging modern language features
Cons of Alamofire
- Focused solely on networking, while Nimbus offers a broader set of iOS utilities
- Steeper learning curve for beginners due to its extensive feature set
- Potentially overkill for simple networking tasks
Code Comparison
Alamofire:
AF.request("https://api.example.com/data").responseJSON { response in
switch response.result {
case .success(let value):
print("JSON: \(value)")
case .failure(let error):
print("Error: \(error)")
}
}
Nimbus:
NSURL *URL = [NSURL URLWithString:@"https://api.example.com/data"];
NSURLRequest *request = [NSURLRequest requestWithURL:URL];
[NSURLConnection sendAsynchronousRequest:request
queue:[NSOperationQueue mainQueue]
completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
// Handle response
}];
Note: Nimbus doesn't provide a dedicated networking module, so this example uses standard iOS networking.
Bolts is a collection of low-level libraries designed to make developing mobile apps easier.
Pros of Bolts-ObjC
- Lightweight and focused on specific tasks (promises, tasks, and app links)
- Better integration with Facebook SDK and Parse
- More active development and maintenance
Cons of Bolts-ObjC
- Less comprehensive feature set compared to Nimbus
- Limited to specific use cases, not a full UI toolkit
- Steeper learning curve for developers new to promises and tasks
Code Comparison
Bolts-ObjC (using BFTask):
[[self saveAsync:object] continueWithBlock:^id(BFTask *task) {
if (task.error) {
NSLog(@"Error: %@", task.error);
} else {
NSLog(@"Object saved successfully");
}
return nil;
}];
Nimbus (using NINetworkImageView):
NINetworkImageView *imageView = [[NINetworkImageView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
imageView.contentMode = UIViewContentModeScaleAspectFit;
[imageView setPathToNetworkImage:@"http://example.com/image.jpg"];
[self.view addSubview:imageView];
Bolts-ObjC focuses on asynchronous programming patterns, while Nimbus provides a wider range of UI components and utilities. Bolts-ObjC is more suitable for projects heavily relying on asynchronous operations, while Nimbus offers a more comprehensive toolkit for building iOS applications.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Nimbus is an iOS framework whose feature set grows only as fast as its documentation.
Support status
Nimbus is in a supported maintenance mode, meaning its feature set and public APIs will not change substantially over time but high priority bugs will be addressed.
Nimbus is maintained and supported on a best-effort basis. Pull requests are welcome with the above in mind.
Getting Started
- Visit the Nimbus website at nimbuskit.info.
- Add Nimbus to your project.
- Follow Nimbus' development through its version history.
- See the latest API diffs.
- Read the Three20 Migration Guide.
- Ask questions and get updates via the Nimbus mailing list.
Top Related Projects
A React-inspired view framework for iOS.
Smooth asynchronous user interfaces for iOS apps.
Cocoa framework and Obj-C dynamism bindings for ReactiveSwift.
A delightful networking framework for iOS, macOS, watchOS, and tvOS.
Elegant HTTP Networking in Swift
Bolts is a collection of low-level libraries designed to make developing mobile apps easier.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot