← Back to slackhq/SlackTextViewController

How to Deploy & Use slackhq/SlackTextViewController

SlackTextViewController Deployment and Usage Guide

Prerequisites

  • Platform: iOS 7, 8 & 9
  • Language: Objective-C or Swift
  • Development Environment: Xcode
  • Dependencies: None required for basic functionality

Installation

Using CocoaPods

  1. Add the following line to your Podfile:
    pod "SlackTextViewController"
    
  2. Run the following command in your terminal:
    pod install
    

Using Carthage

  1. Add the following line to your Cartfile:
    github "slackhq/SlackTextViewController"
    
  2. Run the following command in your terminal:
    carthage update
    

Manual Installation

  1. Copy the Source/ folder from the repository to your project directory
  2. Or compile the project located in Builder/SlackTextViewController.xcodeproj to create a SlackTextViewController.framework package
  3. Link the library into your project following Apple's documentation

Configuration

Subclassing Setup

Create a new subclass of SLKTextViewController and initialize it with your preferred view type:

For UITableView:

// Objective-C
[super initWithTableViewStyle:UITableViewStylePlain]
// Swift
super.init(tableViewStyle: .Plain)

For UICollectionView:

// Objective-C
[super initWithCollectionViewLayout:[UICollectionViewFlowLayout new]]
// Swift
super.init(collectionViewLayout: UICollectionViewFlowLayout())

For UIScrollView:

// Objective-C
[super initWithScrollView:self.myStrongScrollView]
// Swift
super.init(scrollView: self.myStrongScrollView)

Important Notes

  • Update to version >= 1.9 to avoid app rejection risks
  • The library uses inverted mode by default (cells displayed upside-down)
  • Set invertedModeEnabled to NO if you don't want inverted cells

Build & Run

Development

  1. Open your Xcode project
  2. Ensure the SlackTextViewController framework is properly linked
  3. Build and run your application on a simulator or device

Production

  1. Follow the same build process as development
  2. Ensure you're using version >= 1.9 for App Store submission
  3. Test all messaging features thoroughly before deployment

Deployment

App Store Submission

  1. Build your application archive
  2. Upload to App Store Connect
  3. Ensure compliance with Apple's guidelines (version >= 1.9 recommended)

Distribution

  • The library is compatible with iOS 7, 8 & 9
  • Works on both iPhone and iPad devices
  • Supports iPad Multitasking (iOS 9 only)

Troubleshooting

Common Issues

App Rejection

  • Issue: App rejection due to library version
  • Solution: Update to version >= 1.9

Inverted Cells

  • Issue: Cells appear upside-down
  • Solution: Set invertedModeEnabled to NO in your subclass

Keyboard Not Dismissing

  • Issue: Keyboard doesn't dismiss on tap
  • Solution: Ensure tap gesture recognizer is properly configured

Autocomplete Not Working

  • Issue: Autocomplete feature not functioning
  • Solution: Verify prefix keys are properly registered in your subclass

Additional Support

  • Check the GitHub issues for reported problems
  • Review the pull requests for potential fixes
  • The project is deprecated, so community support may be limited

Performance Tips

  • Monitor memory usage when using growing text view with large amounts of text
  • Test undo/redo functionality thoroughly
  • Ensure proper cleanup of text view resources when view controller is deallocated