Welcome to the documentation for Sheeeeeeeeet!
About Sheeeeeeeeet
Sheeeeeeeeet is a powerful library for creating custom and interactive action sheets in iOS apps. It provides an easy-to-use interface for presenting complex and dynamic action sheets with various customization options.
Installation
To install Sheeeeeeeeet, you can use popular dependency managers like CocoaPods or Carthage. Choose the method that suits you best:
CocoaPods
1. Add the following line to your project’s Podfile
:
pod 'Sheeeeeeeeet'
2. Run the following command in your terminal:
pod install
Carthage
1. Add the following line to your Cartfile
:
github "schmidyy/Sheeeeeeeeet"
2. Run the following command in your terminal:
carthage update --platform iOS
Usage
Using Sheeeeeeeeet is straightforward. Here’s a basic example:
Sheeeeeeeeet *actionSheet = [[Sheeeeeeeeet alloc] initWithTitle:@"Actions"];
[actionSheet addAction:[SheeeeeeeeetAction actionWithTitle:@"Option 1" type:SheeeeeeeeetActionTypeDefault handler:nil]];
[actionSheet addAction:[SheeeeeeeeetAction actionWithTitle:@"Option 2" type:SheeeeeeeeetActionTypeDefault handler:nil]];
[actionSheet showInViewController:self];
This creates a simple action sheet titled “Actions” with two default options. You can populate the action sheet with custom actions and handle user interactions using completion handlers.
Customization
With Sheeeeeeeeet, you can customize various aspects of the action sheet to match your app’s design. Here are a few options:
Colors
You can customize the background, title, and option colors using the following properties:
actionSheet.backgroundColor = [UIColor whiteColor];
actionSheet.titleTextColor = [UIColor blackColor];
actionSheet.optionTextColor = [UIColor darkGrayColor];
actionSheet.cancelTextColor = [UIColor redColor];
Icon Support
You can also add icons to actions using the icon
property of SheeeeeeeeetAction
, which accepts UIImage
objects.
UIImage *icon = [UII