Showing preview only (588K chars total). Download the full file or copy to clipboard to get everything.
Repository: slackhq/SlackTextViewController
Branch: master
Commit: 178750fe96fe
Files: 117
Total size: 550.9 KB
Directory structure:
gitextract_cu9877x5/
├── .github/
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── ISSUE_TEMPLATE.md
│ └── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .travis.yml
├── .xctool-args
├── CHANGELOG.md
├── Examples/
│ ├── Messenger-Programatic/
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Info.plist
│ │ └── main.m
│ ├── Messenger-Shared/
│ │ ├── Bridge-Header.h
│ │ ├── Images.xcassets/
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ ├── Icons/
│ │ │ │ ├── Contents.json
│ │ │ │ ├── icn_append.imageset/
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── icn_arrow_down.imageset/
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── icn_arrow_up.imageset/
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── icn_editing.imageset/
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── icn_pic.imageset/
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── icn_typing.imageset/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── icn_upload.imageset/
│ │ │ │ └── Contents.json
│ │ │ └── LaunchImage.launchimage/
│ │ │ └── Contents.json
│ │ ├── Message.h
│ │ ├── Message.m
│ │ ├── MessageTableViewCell.h
│ │ ├── MessageTableViewCell.m
│ │ ├── MessageTextView.h
│ │ ├── MessageTextView.m
│ │ ├── MessageViewController.h
│ │ ├── MessageViewController.m
│ │ ├── TypingIndicatorView.h
│ │ └── TypingIndicatorView.m
│ ├── Messenger-Storyboard/
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Base.lproj/
│ │ │ ├── LaunchScreen.xib
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── ViewController.h
│ │ ├── ViewController.m
│ │ └── main.m
│ ├── Messenger-Swift/
│ │ ├── AppDelegate.swift
│ │ ├── Base.lproj/
│ │ │ ├── LaunchScreen.xib
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── MessageViewController.swift
│ ├── Messenger-iPad-Sheet/
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Info.plist
│ │ └── main.m
│ ├── Messenger.xcodeproj/
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace/
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata/
│ │ └── Messenger.xccheckout
│ ├── Messenger.xcworkspace/
│ │ └── contents.xcworkspacedata
│ ├── Podfile
│ └── Pods/
│ ├── Local Podspecs/
│ │ └── SlackTextViewController.podspec.json
│ ├── LoremIpsum/
│ │ ├── License.markdown
│ │ ├── LoremIpsum/
│ │ │ ├── LoremIpsum.h
│ │ │ └── LoremIpsum.m
│ │ └── Readme.markdown
│ ├── Pods.xcodeproj/
│ │ └── project.pbxproj
│ └── Target Support Files/
│ ├── LoremIpsum/
│ │ ├── LoremIpsum-dummy.m
│ │ ├── LoremIpsum-prefix.pch
│ │ └── LoremIpsum.xcconfig
│ ├── Pods/
│ │ ├── Pods-acknowledgements.markdown
│ │ ├── Pods-acknowledgements.plist
│ │ ├── Pods-dummy.m
│ │ ├── Pods-frameworks.sh
│ │ ├── Pods-resources.sh
│ │ ├── Pods.debug.xcconfig
│ │ └── Pods.release.xcconfig
│ └── SlackTextViewController/
│ ├── SlackTextViewController-dummy.m
│ ├── SlackTextViewController-prefix.pch
│ └── SlackTextViewController.xcconfig
├── File Templates/
│ ├── SlackTextView Controller.xctemplate/
│ │ ├── TemplateInfo.plist
│ │ ├── UICollectionView/
│ │ │ ├── ___FILEBASENAME___.h
│ │ │ └── ___FILEBASENAME___.m
│ │ └── UITableView/
│ │ ├── ___FILEBASENAME___.h
│ │ └── ___FILEBASENAME___.m
│ └── install.sh
├── Gemfile
├── LICENSE
├── README.md
├── SlackTextViewController/
│ ├── SlackTextViewController/
│ │ ├── Info.plist
│ │ └── SlackTextViewController.h
│ ├── SlackTextViewController.xcodeproj/
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace/
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata/
│ │ ├── xcbaselines/
│ │ │ └── F5B4E78D1C4DA053005CBBE0.xcbaseline/
│ │ │ ├── F8445E9E-5B76-4616-90F9-7D94D0E1142F.plist
│ │ │ └── Info.plist
│ │ └── xcschemes/
│ │ ├── SlackTextViewController.xcscheme
│ │ └── SlackTextViewControllerTests.xcscheme
│ └── SlackTextViewControllerTests/
│ ├── FrameworkTests.m
│ └── Info.plist
├── SlackTextViewController.podspec
└── Source/
├── SLKInputAccessoryView.h
├── SLKInputAccessoryView.m
├── SLKTextInput+Implementation.m
├── SLKTextInput.h
├── SLKTextInputbar.h
├── SLKTextInputbar.m
├── SLKTextView+SLKAdditions.h
├── SLKTextView+SLKAdditions.m
├── SLKTextView.h
├── SLKTextView.m
├── SLKTextViewController.h
├── SLKTextViewController.m
├── SLKTypingIndicatorProtocol.h
├── SLKTypingIndicatorView.h
├── SLKTypingIndicatorView.m
├── SLKUIConstants.h
├── UIResponder+SLKAdditions.h
├── UIResponder+SLKAdditions.m
├── UIScrollView+SLKAdditions.h
├── UIScrollView+SLKAdditions.m
├── UIView+SLKAdditions.h
└── UIView+SLKAdditions.m
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/CODE_OF_CONDUCT.md
================================================
# Slack open source code of conduct
## Introduction
Diversity and inclusion make our community strong. We encourage participation from the most varied and diverse backgrounds possible and want to be very clear about where we stand.
Our goal is to maintain a safe, helpful and friendly community for everyone, regardless of experience, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other defining characteristic.
This code and related procedures also apply to unacceptable behavior occurring outside the scope of community activities, in all community venues (online and in-person) as well as in all one-on-one communications, and anywhere such behavior has the potential to adversely affect the safety and well-being of community members.
## Expected Behavior
* Be welcoming.
* Be kind.
* Look out for each other.
## Unacceptable Behavior
* Conduct or speech which might be considered sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory or offensive in nature.
* Unwelcome, suggestive, derogatory or inappropriate nicknames or terms.
* Disrespect towards others. (Jokes, innuendo, dismissive attitudes.)
* Intimidation or harassment (online or in-person). Please read the [Citizen Code of Conduct](http://citizencodeofconduct.org/) for how we interpret harassment.
* Disrespect towards differences of opinion.
* Inappropriate attention or contact. Be aware of how your actions affect others. If it makes someone uncomfortable, stop.
* Not understanding the differences between constructive criticism and disparagement.
* Sustained disruptions.
* Violence, threats of violence or violent language.
## Enforcement
Understand that speech and actions have consequences, and unacceptable behavior will not be tolerated.
If you are the subject of, or witness to any violations of this Code of Conduct, please contact us by submitting a form [here](https://docs.google.com/a/slack-corp.com/forms/d/1NVqj2S2Q49XVIOT5N3L6Tx1oihvk9CpMa_UX8T_6ESo/viewform), or email conduct@slack.com.
If violations occur, organizers will take any action they deem appropriate for the infraction, up to and including expulsion.
_Thanks to the [Django Code of Conduct](https://www.djangoproject.com/conduct/), [The Citizen Code of Conduct](http://citizencodeofconduct.org/), [The Rust Code of Conduct](https://www.rust-lang.org/conduct.html) and [The Ada Initiative](http://adainitiative.org/2014/02/18/howto-design-a-code-of-conduct-for-your-community/)._
================================================
FILE: .github/CONTRIBUTING.md
================================================
# Contributing at Slack

## Before Contributing
Before contributing, please read our [Code of Conduct](CODE_OF_CONDUCT.md). We take it very seriously, and expect that you will as well.
## New Issues
Before opening a new issue, please consider:
- Reading [the documentation](https://github.com/slackhq/SlackTextViewController/blob/master/README.md) and [the changelog](https://github.com/slackhq/SlackTextViewController/blob/master/CHANGELOG.md) first.
- Searching for any related issues and avoid creating duplicated issues.
- Adding details, diagnoses, screenshots or any type of useful information in existing issues, even if they are marked as closed. The team will still review it.
- Trying out the examples [provided in this repository](https://github.com/slackhq/SlackTextViewController/tree/master/Examples).
- Taking the time to think of a solution and [**open a pull request**](#new-pull-requests) for either improving the documentation, fixing a bug or suggesting a feature.
- Finally, [**open an issue**](https://github.com/slackhq/SlackTextViewController/issues/new) to report a bug, ask for help or suggest a feature. The more information you give, the better people can help you.
## New Pull Requests
We love pull requests and we are generally very receptive to contributions. Things to keep in mind:
- [Fork the repository](https://github.com/slackhq/SlackTextViewController) and make sure to work on a branch up to date with origin master.
- Do your thing!
- Be mindful about doing atomic commits, adding documentation to your changes, not refactoring too much.
- Add tests covering the new code or functionality you are adding.
- Add a descriptive title and add any useful information for the reviewer. If your contribution is a user facing thing, please attach a screenshot and/or screencast (gif preferably).
- Read and agree to our [Contributor License Agreement (CLA)](https://docs.google.com/a/slack-corp.com/forms/d/1q_w8rlJG_x_xJOoSUMNl7R35rkpA7N6pUkKhfHHMD9c/viewform). _We cannot accept your PR without your agreement to our CLA_.
- Create your pull request (yay!). If it is in relation to an existing issue, please mention it on the title or description.
[Interested in knowing more about about pull requests at Slack?](https://slack.engineering/on-empathy-pull-requests-979e4257d158#.awxtvmb2z)
================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
* [ ] I've read and understood the [Contributing guidelines](https://github.com/slackhq/SlackTextViewController/blob/master/.github/CONTRIBUTING.md) and have done my best effort to follow them.
* [ ] I've read and agree to the [Code of Conduct](https://github.com/slackhq/SlackTextViewController/blob/master/.github/CODE_OF_CONDUCT.md).
* [ ] I've searched for any related issues and avoided creating a duplicate issue.
#### Description
> e.g. Description of the bug or feature
#### Reproducible in:
* [ ] This is reproducible in the sample project.
SlackTextViewController version:
iOS version(s):
Device(s):
#### Steps to reproduce:
1.
2.
3.
### Expected result:
> e.g. What you expected to happen
### Actual result:
> e.g. What actually happened
### Attachments:
> e.g. Logs, screenshots, screencast, sample project, funny gif, etc.
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
* [ ] I've read and understood the [Contributing guidelines](https://github.com/slackhq/SlackTextViewController/blob/master/.github/CONTRIBUTING.md) and have done my best effort to follow them.
* [ ] I've read and agree to the [Code of Conduct](https://github.com/slackhq/SlackTextViewController/blob/master/.github/CODE_OF_CONDUCT.md).
* [ ] I've been mindful about doing atomic commits, adding documentation to my changes, not refactoring too much.
* [ ] I've added a descriptive title and added any useful information for the reviewer. Where appropriate, I've attached a screenshot and/or screencast (gif preferrably).
* [ ] I've listed my changes on the [Changelog(https://github.com/slackhq/SlackTextViewController/blob/master/CHANGELOG.md) file.
* [ ] I've read, agree to, and signed the [Contributor License Agreement (CLA)](https://docs.google.com/a/slack-corp.com/forms/d/1q_w8rlJG_x_xJOoSUMNl7R35rkpA7N6pUkKhfHHMD9c/viewform).
#### PR Summary
> e.g. New functionality for producing whatsits.
#### Related Issues
> e.g. Fixes #206 and closes #230
#### Test strategy
> e.g. Add tests around whatsit production.
================================================
FILE: .gitignore
================================================
# Xcode
.DS_Store
*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
profile
*.moved-aside
DerivedData
.idea/
*.hmap
.gutter.json
Carthage/
SlackTextViewController/Pods
SlackTextViewController/Podfile.lock
SlackTextViewController/*.xcworkspace
================================================
FILE: .travis.yml
================================================
osx_image: xcode7
language: objective-c
cache:
- bundler
- cocoapods
before_install:
- bundle install
- cd SlackTextViewController && pod install && cd $TRAVIS_BUILD_DIR
script:
- xctool test
notifications:
slack:
- secure: DOv3x21M1pnyrZ5jT5bZyHG0lg2E2tnj+6TVNHUD2ZYjab3X9oYz6PzL0YaC0M2S0rtiJtjO7jd1hdXHPg9CTUg04oGLSWe43Fmt2WAprszSXwyvNnqHNilBHFwhuM7MqcbV1uu3R/5CZVuHA0MKZqLQtDx2N4ep/5Lg6ehmuoA=
after_success:
- bundle exec slather
================================================
FILE: .xctool-args
================================================
[
"-workspace", "SlackTextViewController/SlackTextViewController.xcworkspace",
"-scheme", "SnapshotTests",
"-sdk", "iphonesimulator",
"-configuration", "Debug",
"-destination", "name=iPhone 6s,OS=9.2",
]
================================================
FILE: CHANGELOG.md
================================================
# Change Log
## [Version 1.9.7](https://github.com/slackhq/SlackTextViewController/releases/tag/v1.9.7)
#### Features:
- Enables building the CocoaPod with `CLANG_MODULES_ENABLED=NO` which enables compiling with `ccache`.
## [Version 1.9.6](https://github.com/slackhq/SlackTextViewController/releases/tag/v1.9.6)
This release includes many iOS 11 and iPhone X hot fixes.
##### Features:
- Allowing color customization in typing indicator. By @dskatz22 (#613)
- Adding support for an optional view to host outlets under the text view. By @dzenbot (#562)
- Exposing auto-completion variables. By @dzenbot (#561)
##### Hot Fixes & Enhancements:
- Fixed the text input not being interactive on iOS 11. By @dzenbot (#624)
- Fixed iPhone X issue where the text input bar wouldn't expand to the bottom of the screen, below the home indicator. (#619)
- Fixed scroll view content inset adjustments on iOS 11. By @gim- (#643)
- Fixed compiler error in example app. By @BasThomas (#629)
- Fixed content offset for keyboard when uninverted. By @ZAndyL (#542)
##### Deprecation:
- Deprecated `-shouldProcessTextForAutoCompletion:` in favor of `-shouldProcessTextForAutoCompletion`
##### CI:
- Building the SlackTextViewController framework and running basic tests using BuddyBuild CI, against all PRs. By @dzenbot (#640)
## [Version 1.9.5](https://github.com/slackhq/SlackTextViewController/releases/tag/v1.9.5)
##### Features:
- Migrated the library to be using NSAttributedString underneath. The `text` property on `SLKTextView` uses a NSAttributedString representation based on its font and text color, and doesn't forward to super. By @jacywu07 (#501)
- As part of the migration to NSAttributedString, new helpers for attributed strings have been added to `SLKTextView+SLKAdditions`.
- Introduced a new API to end users to open the auto-completion mode with a given prefix. By @jacywu07 (#506)
- Exposed the private `cacheTextView` method. By @acandelaria1 (#513)
##### Hot Fixes & Enhancements:
- Updated the sample project to Swift 3! By @cyhsutw (#522)
- Added a property to allow the user to set how many lines of text SLKTextView's placeholder should have. By @jedmund (#505)
- Tweaked keyboard height calculations on invert mode. By @ZAndyL (#512)
## [Version 1.9.4](https://github.com/slackhq/SlackTextViewController/releases/tag/v1.9.4)
##### Hot Fixes & Enhancements:
- Fixed keyboard status updates inconsistencies, causing sometimes the text input bar not to follow the keyboard.
- Fixed bottom margin inconsistencies. Thanks @yury! 💪
- Fixed an edge case where the caret would jump to the end after double-space completion in middle of text. Thanks @mtackes
- Improved Carthage support
## [Version 1.9.3](https://github.com/slackhq/SlackTextViewController/releases/tag/v1.9.3)
##### Hot Fixes & Enhancements:
- Fixes a regression causing to trigger auto-completion text processing even if no prefix have been registered. This was causing a crash to many. Sorry about that!
- Ignores keyboard notifications when no valid first responder is detected. This fixes the text input not following the keyboard at times.
- Now `shouldProcessTextForAutoCompletion:` requires calling super.
## [Version 1.9.2](https://github.com/slackhq/SlackTextViewController/releases/tag/v1.9.2)
#### SlackTextViewController is now MIT licensed!
##### Features & Enhancements:
- Better Swift 2.2 support with nullability annotations and shiny new Swift sample code. You rock @weijentu 🙇
- Introduced `SLKTextInput` protocol: A `UITextInput` extension to decouple all the text processing features related to auto-completion, to reuse in any text component such as UISearchBar, UITextField, UITextView, etc.
- Added a new API `-shouldProcessTextForAutoCompletion` to be able to opt-out from text processing for auto-completion.
- The `registeredPrefixes` property are now of type NSSet (instead of NSArray).
- Added animation to views when switching from a keyboard to a custom input view. Thanks @cyhsutw!
- Made `keyboardStatus` public, making it easier to check for the current keyboard state.
##### Hot Fixes:
- Fixed a use case where the textInput would not follow the keyboard when dismissing.
- Improved text caching from the textInput, specially when moving the app to the background (in case the app crashes while being on the background).
- Fixed misaligned placeholder labels in the textView and out of bounds.
- Fixed the textInput not growing accordantly to the font size. This was a regressions since version `1.7.1`
- Many, many, many auto-completion bug fixes 💪
## [Version 1.9.1](https://github.com/slackhq/SlackTextViewController/releases/tag/v1.9.1)
##### Features & Enhancements:
- Renamed public `autoCompleteFormatting` to `formattingEnabled`.
- Doesn't opt-out anymore from the built-in menu menu items **Define**, **Replace** and **Share**.
- Made the collectionView's default background color to white.
- The auto-completion view is now presented above of the table/collection view avoiding to push it up/down every time. Much better UX!
- Stored all key commands in a instance variable, to avoid recreating the array at every character update.
##### Hot Fixes:
- Fixed library from not compiling on iOS 8.
- Fixed the right button from stretching when animating the constrains. This was broken since iOS 9.
- Improved `UITabBar` support by considering `hidesBottomBarWhenPushed` too.
- Fixed crash when double tapping the space bar while the textView was empty.
- Fixed issue causing not to forward all UITextViewDelegate callbacks.
## [Version 1.9](https://github.com/slackhq/SlackTextViewController/releases/tag/v1.9)
##### Deprecations:
- Deprecated the keyboard panning gesture on iOS 9, to drag the keyboard up and down. More information about this in #361
- Deprecated `isLoupeVisible`, which will cause issues when auto-completion mode is active and moving the cursor of the text view. More information about this in #361
##### Features & Enhancements:
- Enabled interaction while the right button and the auto-completion view are being presented animatedly
- Does not scroll to the bottom anymore, if the content size is smaller than its bounds, when `shouldScrollToBottomAfterKeyboardShows` is enabled.
##### Hot Fixes:
- Fixed the keyboard status and custom notifications not being set on the right order.
- Fixed a crash when calling unrecognised selectors internally in the `UITextViewDelegate` method implementation, when using other subclasses of UITextView.
- Fixed `UITabBar` support. This was a regression. Thanks @LHIOUI for the headsup 👊
- Fixed cursor dragging issues when deep pressing on the keyboard's trackpad.
- Fixed the auto-completion layout being busted in 1.8. This was a regression.
## [Version 1.8](https://github.com/slackhq/SlackTextViewController/releases/tag/v1.8)
##### Features & Enhancements:
* Added [Markdown Formatting](https://github.com/slackhq/SlackTextViewController#markdown-formatting) ⚡️📝, a useful and simple way to allow your users to auto-complete any markdown formatting from within the text input. 1 small step to make writing markdown quicker.
* The shake gesture now presents an `UIAlertController` for iOS 8 and above. Still supports the old and good `UIAlertView` for legacy versions.
##### Hot Fixes:
* Fixed some content inset non-sense
* Scrolling to top now really scrolls to top. Not down. Oopsie.
* Scrolling down when the keyboard gets presented is also working now. Yay :tada: !
* The placeholder font now matches the textView font, for real this time.
* Avoids reloading the text view when there is [no key for cache](https://github.com/slackhq/SlackTextViewController/commit/d3730e2a880c9fd8768623f923d5443432829ee9). Thanks @susieyy!
* Removed annoying iOS 8 warnings.
## [Version 1.7.2](https://github.com/slackhq/SlackTextViewController/releases/tag/v1.7.2)
##### Hot Fixes:
* Better [Carthage](https://github.com/Carthage/Carthage) support 🙏
* Fixed the textInput's [right margin not being honored or honoured](https://github.com/slackhq/SlackTextViewController/commit/6ed6b29f3a82ef22b626eda08dfe57ec4ab37df1). Thanks @ikesyo 🙌
* Fixed the textView's contentSize to never be higher than its bounds. Very useful for stuff.
## [Version 1.7.1](https://github.com/slackhq/SlackTextViewController/releases/tag/v1.7.1)
##### Features & Enhancements:
* Changed how the auto-completion API worked: it now allows asynch auto-completion! Have a look at how to set it up / update it](https://github.com/slackhq/SlackTextViewController#autocompletion)
* Added keyboard trackpad detection for iOS 9. Used internally for disables auto-completion while its detected, so we avoid crazy things! 👻
* Improved the magnifying glass detection.
* Gonna get a nice warning to remind you to `super` in `viewDidLoad` now. Fancy!
* Slowed down bouncy animation by 0.15 seconds
* Disabled `cellLayoutMarginsFollowReadableWidth` on iOS 9 for the auto-completion view. No need for large margins, come on!
##### Hot Fixes:
* Fixed compatibility issues with [Cocoapods](https://github.com/CocoaPods/CocoaPods) 0.39.0 new requirements. All sources are now in the same root level.
* Fixed keyboard presentation when pushing a view controller instance. Thanks @fastred!
* Fixed auto-layout issues on the Edit Mode.
* Fixed `maximumHeightForAutoCompletionView` calculations. Maths!
* Fixed [crash caused by calling `layoutIfNeeded` too early](https://github.com/slackhq/SlackTextViewController/commit/dceedc70393e873d70c82da39c9f2cc9f18fda5a)
* [Removed duplicated declarations](https://github.com/slackhq/SlackTextViewController/commit/f61e4e2cbc03ff30c9391fc86eba2c5ba8674f47), specially causing nightmares to Swifters.
* Removed unused internal methods.
* Better (Carthage)[https://github.com/Carthage/Carthage] support 🙏
## [Version 1.7](https://github.com/slackhq/SlackTextViewController/releases/tag/v1.7)
##### Deprecations:
- Removed `shouldForceTextInputbarAdjustment` and replace it with `-forceTextInputbarAdjustmentForResponder:`
- Renamed `canShowTypeIndicator` and replace it with `canShowTypingIndicator`
- Renamed `editortLeftButton` with `editorLeftButton`, and `editortRightButton` with `editorRightButton`
##### Features & enhancements:
- Added iOS 9 (beta 5) support, with fixes for multi-tasking on iPad and external keyboard shortcut hud support, and many small layout tweaks.
- Added the ability to show/hide the text input bar, with animation support, using `setTextInputbarHidden:animated:`. Thanks @aryaxt!
- Added better Accessibility support with [Dynamic Type](https://github.com/slackhq/SlackTextViewController#dynamic-type)
- [Improved the keyboard panning gesture by dragging the text input bar from the bottom](https://cloud.githubusercontent.com/assets/590579/9448678/5423f254-4a74-11e5-870d-80c377d24937.gif) (feature flagged as it needs more testing)
- Added 2 more `UIScrollViewDelegate` method declarations to SLKTextViewController's header. `super` is required!
##### Hot Fixes:
- Fixed wrong auto-completion view height calculations.
- Fixed a very bad retain cycle reported in #234
- Fixed the keyboard view detection on iOS 9
- Fixed swift compiler warning. Thanks @csjones
## [Version 1.6](https://github.com/slackhq/SlackTextViewController/releases/tag/v1.6)
##### Features:
- Added support for custom typing indicator, following the same pattern of registering a class using `registerClassForTypingIndicatorView:`, while this class conforms to `SLKTypingIndicatorProtocol`. Please refer to the documentation for more details about the feature. Thanks @sveinhal! (#207)
- Added support for registering longer auto-completion prefixes
- Improved drastically the keyboard panning experience, making it much more smooth now. Awesome stuff @camitox!
- Added the ability to ignore the text inputbar adjustment when the keyboard is presented, using `ignoreTextInputbarAdjustment`. This is generally useful when SLKTVC is used in a custom modal presentation and when you want to manipulate the view's alignment yourself.
##### Hot Fixes:
- No longer overriding the default background color of UITableView. Oupsi! (#205)
- Made sure not to register the same notifications twice.
- Fixes issue where the text input would not adjust on top of the keyboard when presenting an `UIAlertViewController` (`UIAlertView` or `UIActionSheet`) in iOS8
## Previous versions
For more release notes of this project, please visit https://github.com/slackhq/SlackTextViewController/releases
================================================
FILE: Examples/Messenger-Programatic/AppDelegate.h
================================================
//
// AppDelegate.h
// Messenger-Programatic
//
// Created by Ignacio Romero Zurbuchen on 8/15/14.
// Copyright (c) 2014 Slack Technologies, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
================================================
FILE: Examples/Messenger-Programatic/AppDelegate.m
================================================
//
// AppDelegate.m
// Messenger-Programatic
//
// Created by Ignacio Romero Zurbuchen on 8/15/14.
// Copyright (c) 2014 Slack Technologies, Inc. All rights reserved.
//
#import "AppDelegate.h"
#import "SLKTextViewController.h"
#import "MessageViewController.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[MessageViewController new]];
[self.window makeKeyAndVisible];
return YES;
}
@end
================================================
FILE: Examples/Messenger-Programatic/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Messenger</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
================================================
FILE: Examples/Messenger-Programatic/main.m
================================================
//
// main.m
// Messenger-Programatic
//
// Created by Ignacio Romero Zurbuchen on 8/15/14.
// Copyright (c) 2014 Slack Technologies, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
================================================
FILE: Examples/Messenger-Shared/Bridge-Header.h
================================================
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import <SLKTextViewController.h>
#import "Message.h"
#import "MessageTableViewCell.h"
#import "MessageTextView.h"
#import "TypingIndicatorView.h"
#import <LoremIpsum/LoremIpsum.h>
================================================
FILE: Examples/Messenger-Shared/Images.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "AppIcon-29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "AppIcon-29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "AppIcon-40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "AppIcon-40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "AppIcon-60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "AppIcon-60@3x.png",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "AppIcon-29~ipad.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "AppIcon-29@2x~ipad.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "AppIcon-40~ipad.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "AppIcon-40@2x~ipad.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "AppIcon-76~ipad.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "AppIcon-76@2x~ipad.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "AppIcon-83.5@2x.png",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: Examples/Messenger-Shared/Images.xcassets/Contents.json
================================================
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: Examples/Messenger-Shared/Images.xcassets/Icons/Contents.json
================================================
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: Examples/Messenger-Shared/Images.xcassets/Icons/icn_append.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "icn_append.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}
================================================
FILE: Examples/Messenger-Shared/Images.xcassets/Icons/icn_arrow_down.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "icn_arrow_down.pdf",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: Examples/Messenger-Shared/Images.xcassets/Icons/icn_arrow_up.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "icn_arrow_up.pdf",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: Examples/Messenger-Shared/Images.xcassets/Icons/icn_editing.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "icn_editing.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}
================================================
FILE: Examples/Messenger-Shared/Images.xcassets/Icons/icn_pic.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "icn_pic.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}
================================================
FILE: Examples/Messenger-Shared/Images.xcassets/Icons/icn_typing.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "icn_typing.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}
================================================
FILE: Examples/Messenger-Shared/Images.xcassets/Icons/icn_upload.imageset/Contents.json
================================================
{
"images" : [
{
"idiom" : "universal",
"filename" : "icn_upload.pdf"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}
================================================
FILE: Examples/Messenger-Shared/Images.xcassets/LaunchImage.launchimage/Contents.json
================================================
{
"images" : [
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "736h",
"filename" : "Default-hd-plus@2x.png",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "736h",
"filename" : "Default-hd-plus@2x~landscape.png",
"minimum-system-version" : "8.0",
"orientation" : "landscape",
"scale" : "3x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "667h",
"filename" : "Default-hd@2x.png",
"minimum-system-version" : "8.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"filename" : "Default@2x.png",
"scale" : "2x"
},
{
"extent" : "full-screen",
"idiom" : "iphone",
"subtype" : "retina4",
"filename" : "Default-568@2x.png",
"minimum-system-version" : "7.0",
"orientation" : "portrait",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: Examples/Messenger-Shared/Message.h
================================================
//
// Message.h
// Messenger
//
// Created by Ignacio Romero Z. on 1/16/15.
// Copyright (c) 2015 Slack Technologies, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface Message : NSObject
@property (nonatomic, strong) NSString *username;
@property (nonatomic, strong) NSString *text;
@end
================================================
FILE: Examples/Messenger-Shared/Message.m
================================================
//
// Message.m
// Messenger
//
// Created by Ignacio Romero Z. on 1/16/15.
// Copyright (c) 2015 Slack Technologies, Inc. All rights reserved.
//
#import "Message.h"
@implementation Message
@end
================================================
FILE: Examples/Messenger-Shared/MessageTableViewCell.h
================================================
//
// MessageTableViewCell.h
// Messenger
//
// Created by Ignacio Romero Zurbuchen on 9/1/14.
// Copyright (c) 2014 Slack Technologies, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
static CGFloat kMessageTableViewCellMinimumHeight = 50.0;
static CGFloat kMessageTableViewCellAvatarHeight = 30.0;
static NSString *MessengerCellIdentifier = @"MessengerCell";
static NSString *AutoCompletionCellIdentifier = @"AutoCompletionCell";
@interface MessageTableViewCell : UITableViewCell
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *bodyLabel;
@property (nonatomic, strong) UIImageView *thumbnailView;
@property (nonatomic, strong) NSIndexPath *indexPath;
@property (nonatomic) BOOL usedForMessage;
+ (CGFloat)defaultFontSize;
@end
================================================
FILE: Examples/Messenger-Shared/MessageTableViewCell.m
================================================
//
// MessageTableViewCell.m
// Messenger
//
// Created by Ignacio Romero Zurbuchen on 9/1/14.
// Copyright (c) 2014 Slack Technologies, Inc. All rights reserved.
//
#import "MessageTableViewCell.h"
#import "SLKUIConstants.h"
@implementation MessageTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
self.selectionStyle = UITableViewCellSelectionStyleNone;
self.backgroundColor = [UIColor whiteColor];
[self configureSubviews];
}
return self;
}
- (void)configureSubviews
{
[self.contentView addSubview:self.thumbnailView];
[self.contentView addSubview:self.titleLabel];
[self.contentView addSubview:self.bodyLabel];
NSDictionary *views = @{@"thumbnailView": self.thumbnailView,
@"titleLabel": self.titleLabel,
@"bodyLabel": self.bodyLabel,
};
NSDictionary *metrics = @{@"tumbSize": @(kMessageTableViewCellAvatarHeight),
@"padding": @15,
@"right": @10,
@"left": @5
};
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-left-[thumbnailView(tumbSize)]-right-[titleLabel(>=0)]-right-|" options:0 metrics:metrics views:views]];
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-left-[thumbnailView(tumbSize)]-right-[bodyLabel(>=0)]-right-|" options:0 metrics:metrics views:views]];
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-right-[thumbnailView(tumbSize)]-(>=0)-|" options:0 metrics:metrics views:views]];
if ([self.reuseIdentifier isEqualToString:MessengerCellIdentifier]) {
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-right-[titleLabel(20)]-left-[bodyLabel(>=0@999)]-left-|" options:0 metrics:metrics views:views]];
}
else {
[self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[titleLabel]|" options:0 metrics:metrics views:views]];
}
}
- (void)prepareForReuse
{
[super prepareForReuse];
self.selectionStyle = UITableViewCellSelectionStyleNone;
CGFloat pointSize = [MessageTableViewCell defaultFontSize];
self.titleLabel.font = [UIFont boldSystemFontOfSize:pointSize];
self.bodyLabel.font = [UIFont systemFontOfSize:pointSize];
self.titleLabel.text = @"";
self.bodyLabel.text = @"";
}
#pragma mark - Getters
- (UILabel *)titleLabel
{
if (!_titleLabel) {
_titleLabel = [UILabel new];
_titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
_titleLabel.backgroundColor = [UIColor clearColor];
_titleLabel.userInteractionEnabled = NO;
_titleLabel.numberOfLines = 0;
_titleLabel.textColor = [UIColor grayColor];
_titleLabel.font = [UIFont boldSystemFontOfSize:[MessageTableViewCell defaultFontSize]];
}
return _titleLabel;
}
- (UILabel *)bodyLabel
{
if (!_bodyLabel) {
_bodyLabel = [UILabel new];
_bodyLabel.translatesAutoresizingMaskIntoConstraints = NO;
_bodyLabel.backgroundColor = [UIColor clearColor];
_bodyLabel.userInteractionEnabled = NO;
_bodyLabel.numberOfLines = 0;
_bodyLabel.textColor = [UIColor darkGrayColor];
_bodyLabel.font = [UIFont systemFontOfSize:[MessageTableViewCell defaultFontSize]];
}
return _bodyLabel;
}
- (UIImageView *)thumbnailView
{
if (!_thumbnailView) {
_thumbnailView = [UIImageView new];
_thumbnailView.translatesAutoresizingMaskIntoConstraints = NO;
_thumbnailView.userInteractionEnabled = NO;
_thumbnailView.backgroundColor = [UIColor colorWithWhite:0.9 alpha:1.0];
_thumbnailView.layer.cornerRadius = kMessageTableViewCellAvatarHeight/2.0;
_thumbnailView.layer.masksToBounds = YES;
}
return _thumbnailView;
}
+ (CGFloat)defaultFontSize
{
CGFloat pointSize = 16.0;
NSString *contentSizeCategory = [[UIApplication sharedApplication] preferredContentSizeCategory];
pointSize += SLKPointSizeDifferenceForCategory(contentSizeCategory);
return pointSize;
}
@end
================================================
FILE: Examples/Messenger-Shared/MessageTextView.h
================================================
//
// MessageTextView.h
// Messenger
//
// Created by Ignacio Romero Z. on 1/20/15.
// Copyright (c) 2015 Slack Technologies, Inc. All rights reserved.
//
#import "SLKTextView.h"
@interface MessageTextView : SLKTextView
@end
================================================
FILE: Examples/Messenger-Shared/MessageTextView.m
================================================
//
// MessageTextView.m
// Messenger
//
// Created by Ignacio Romero Z. on 1/20/15.
// Copyright (c) 2015 Slack Technologies, Inc. All rights reserved.
//
#import "MessageTextView.h"
@implementation MessageTextView
- (instancetype)init
{
if (self = [super init]) {
// Do something
}
return self;
}
- (void)willMoveToSuperview:(UIView *)newSuperview
{
[super willMoveToSuperview:newSuperview];
self.backgroundColor = [UIColor whiteColor];
self.placeholder = NSLocalizedString(@"Message", nil);
self.placeholderColor = [UIColor lightGrayColor];
self.pastableMediaTypes = SLKPastableMediaTypeAll;
self.layer.borderColor = [UIColor colorWithRed:217.0/255.0 green:217.0/255.0 blue:217.0/255.0 alpha:1.0].CGColor;
}
@end
================================================
FILE: Examples/Messenger-Shared/MessageViewController.h
================================================
//
// MessageViewController.h
// Messenger
//
// Created by Ignacio Romero Zurbuchen on 8/15/14.
// Copyright (c) 2014 Slack Technologies, Inc. All rights reserved.
//
#import "SLKTextViewController.h"
@interface MessageViewController : SLKTextViewController
@end
================================================
FILE: Examples/Messenger-Shared/MessageViewController.m
================================================
//
// MessageViewController.m
// Messenger
//
// Created by Ignacio Romero Zurbuchen on 8/15/14.
// Copyright (c) 2014 Slack Technologies, Inc. All rights reserved.
//
#import "MessageViewController.h"
#import "MessageTableViewCell.h"
#import "MessageTextView.h"
#import "TypingIndicatorView.h"
#import "Message.h"
#import <LoremIpsum/LoremIpsum.h>
#define DEBUG_CUSTOM_TYPING_INDICATOR 0
#define DEBUG_CUSTOM_BOTTOM_VIEW 0
@interface MessageViewController ()
@property (nonatomic, strong) NSMutableArray *messages;
@property (nonatomic, strong) NSArray *users;
@property (nonatomic, strong) NSArray *channels;
@property (nonatomic, strong) NSArray *emojis;
@property (nonatomic, strong) NSArray *commands;
@property (nonatomic, strong) NSArray *searchResult;
@property (nonatomic, strong) UIWindow *pipWindow;
@property (nonatomic, weak) Message *editingMessage;
@end
@implementation MessageViewController
- (instancetype)init
{
self = [super initWithTableViewStyle:UITableViewStylePlain];
if (self) {
[self commonInit];
}
return self;
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithCoder:aDecoder];
if (self) {
[self commonInit];
}
return self;
}
+ (UITableViewStyle)tableViewStyleForCoder:(NSCoder *)decoder
{
return UITableViewStylePlain;
}
- (void)commonInit
{
[[NSNotificationCenter defaultCenter] addObserver:self.tableView selector:@selector(reloadData) name:UIContentSizeCategoryDidChangeNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textInputbarDidMove:) name:SLKTextInputbarDidMoveNotification object:nil];
// Register a SLKTextView subclass, if you need any special appearance and/or behavior customisation.
[self registerClassForTextView:[MessageTextView class]];
#if DEBUG_CUSTOM_TYPING_INDICATOR
// Register a UIView subclass, conforming to SLKTypingIndicatorProtocol, to use a custom typing indicator view.
[self registerClassForTypingIndicatorView:[TypingIndicatorView class]];
#endif
}
#pragma mark - View lifecycle
- (void)viewDidLoad
{
[super viewDidLoad];
// Example's configuration
[self configureDataSource];
[self configureActionItems];
// SLKTVC's configuration
self.bounces = YES;
self.shakeToClearEnabled = YES;
self.keyboardPanningEnabled = YES;
self.shouldScrollToBottomAfterKeyboardShows = NO;
self.inverted = YES;
[self.leftButton setImage:[UIImage imageNamed:@"icn_upload"] forState:UIControlStateNormal];
[self.leftButton setTintColor:[UIColor grayColor]];
[self.rightButton setTitle:NSLocalizedString(@"Send", nil) forState:UIControlStateNormal];
self.textInputbar.autoHideRightButton = YES;
self.textInputbar.maxCharCount = 256;
self.textInputbar.counterStyle = SLKCounterStyleSplit;
self.textInputbar.counterPosition = SLKCounterPositionTop;
[self.textInputbar.editorTitle setTextColor:[UIColor darkGrayColor]];
[self.textInputbar.editorLeftButton setTintColor:[UIColor colorWithRed:0.0/255.0 green:122.0/255.0 blue:255.0/255.0 alpha:1.0]];
[self.textInputbar.editorRightButton setTintColor:[UIColor colorWithRed:0.0/255.0 green:122.0/255.0 blue:255.0/255.0 alpha:1.0]];
#if DEBUG_CUSTOM_BOTTOM_VIEW
// Example of view that can be added to the bottom of the text view
UIView *bannerView = [UIView new];
bannerView.translatesAutoresizingMaskIntoConstraints = NO;
bannerView.backgroundColor = [UIColor blueColor];
NSDictionary *views = NSDictionaryOfVariableBindings(bannerView);
[self.textInputbar.contentView addSubview:bannerView];
[self.textInputbar.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[bannerView]|" options:0 metrics:nil views:views]];
[self.textInputbar.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[bannerView(40)]|" options:0 metrics:nil views:views]];
#endif
#if !DEBUG_CUSTOM_TYPING_INDICATOR
self.typingIndicatorView.canResignByTouch = YES;
#endif
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
[self.tableView registerClass:[MessageTableViewCell class] forCellReuseIdentifier:MessengerCellIdentifier];
[self.autoCompletionView registerClass:[MessageTableViewCell class] forCellReuseIdentifier:AutoCompletionCellIdentifier];
[self registerPrefixesForAutoCompletion:@[@"@", @"#", @":", @"+:", @"/"]];
[self.textView registerMarkdownFormattingSymbol:@"*" withTitle:@"Bold"];
[self.textView registerMarkdownFormattingSymbol:@"_" withTitle:@"Italics"];
[self.textView registerMarkdownFormattingSymbol:@"~" withTitle:@"Strike"];
[self.textView registerMarkdownFormattingSymbol:@"`" withTitle:@"Code"];
[self.textView registerMarkdownFormattingSymbol:@"```" withTitle:@"Preformatted"];
[self.textView registerMarkdownFormattingSymbol:@">" withTitle:@"Quote"];
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
}
#pragma mark - Example's Configuration
- (void)configureDataSource
{
NSMutableArray *array = [[NSMutableArray alloc] init];
for (int i = 0; i < 100; i++) {
NSInteger words = (arc4random() % 40)+1;
Message *message = [Message new];
message.username = [LoremIpsum name];
message.text = [LoremIpsum wordsWithNumber:words];
[array addObject:message];
}
NSArray *reversed = [[array reverseObjectEnumerator] allObjects];
self.messages = [[NSMutableArray alloc] initWithArray:reversed];
self.users = @[@"Allen", @"Anna", @"Alicia", @"Arnold", @"Armando", @"Antonio", @"Brad", @"Catalaya", @"Christoph", @"Emerson", @"Eric", @"Everyone", @"Steve"];
self.channels = @[@"General", @"Random", @"iOS", @"Bugs", @"Sports", @"Android", @"UI", @"SSB"];
self.emojis = @[@"-1", @"m", @"man", @"machine", @"block-a", @"block-b", @"bowtie", @"boar", @"boat", @"book", @"bookmark", @"neckbeard", @"metal", @"fu", @"feelsgood"];
self.commands = @[@"msg", @"call", @"text", @"skype", @"kick", @"invite"];
}
- (void)configureActionItems
{
UIBarButtonItem *arrowItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icn_arrow_down"]
style:UIBarButtonItemStylePlain
target:self
action:@selector(hideOrShowTextInputbar:)];
UIBarButtonItem *editItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icn_editing"]
style:UIBarButtonItemStylePlain
target:self
action:@selector(editRandomMessage:)];
UIBarButtonItem *typeItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icn_typing"]
style:UIBarButtonItemStylePlain
target:self
action:@selector(simulateUserTyping:)];
UIBarButtonItem *appendItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icn_append"]
style:UIBarButtonItemStylePlain
target:self
action:@selector(fillWithText:)];
UIBarButtonItem *pipItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icn_pic"]
style:UIBarButtonItemStylePlain
target:self
action:@selector(togglePIPWindow:)];
self.navigationItem.rightBarButtonItems = @[arrowItem, pipItem, editItem, appendItem, typeItem];
}
#pragma mark - Action Methods
- (void)hideOrShowTextInputbar:(id)sender
{
BOOL hide = !self.textInputbarHidden;
UIImage *image = hide ? [UIImage imageNamed:@"icn_arrow_up"] : [UIImage imageNamed:@"icn_arrow_down"];
UIBarButtonItem *buttonItem = (UIBarButtonItem *)sender;
[self setTextInputbarHidden:hide animated:YES];
[buttonItem setImage:image];
}
- (void)fillWithText:(id)sender
{
if (self.textView.text.length == 0)
{
int sentences = (arc4random() % 4);
if (sentences <= 1) sentences = 1;
self.textView.text = [LoremIpsum sentencesWithNumber:sentences];
}
else {
[self.textView slk_insertTextAtCaretRange:[NSString stringWithFormat:@" %@", [LoremIpsum word]]];
}
}
- (void)simulateUserTyping:(id)sender
{
if ([self canShowTypingIndicator]) {
#if DEBUG_CUSTOM_TYPING_INDICATOR
__block TypingIndicatorView *view = (TypingIndicatorView *)self.typingIndicatorProxyView;
CGFloat scale = [UIScreen mainScreen].scale;
CGSize imgSize = CGSizeMake(kTypingIndicatorViewAvatarHeight*scale, kTypingIndicatorViewAvatarHeight*scale);
// This will cause the typing indicator to show after a delay ¯\_(ツ)_/¯
[LoremIpsum asyncPlaceholderImageWithSize:imgSize
completion:^(UIImage *image) {
UIImage *thumbnail = [UIImage imageWithCGImage:image.CGImage scale:scale orientation:UIImageOrientationUp];
[view presentIndicatorWithName:[LoremIpsum name] image:thumbnail];
}];
#else
[self.typingIndicatorView insertUsername:[LoremIpsum name]];
#endif
}
}
- (void)didLongPressCell:(UIGestureRecognizer *)gesture
{
if (gesture.state != UIGestureRecognizerStateBegan) {
return;
}
#ifdef __IPHONE_8_0
if (SLK_IS_IOS8_AND_HIGHER && [UIAlertController class]) {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
alertController.modalPresentationStyle = UIModalPresentationPopover;
alertController.popoverPresentationController.sourceView = gesture.view.superview;
alertController.popoverPresentationController.sourceRect = gesture.view.frame;
[alertController addAction:[UIAlertAction actionWithTitle:@"Edit Message" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
[self editCellMessage:gesture];
}]];
[alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:NULL]];
[self.navigationController presentViewController:alertController animated:YES completion:nil];
}
else {
[self editCellMessage:gesture];
}
#else
[self editCellMessage:gesture];
#endif
}
- (void)editCellMessage:(UIGestureRecognizer *)gesture
{
MessageTableViewCell *cell = (MessageTableViewCell *)gesture.view;
self.editingMessage = self.messages[cell.indexPath.row];
[self editText:self.editingMessage.text];
[self.tableView scrollToRowAtIndexPath:cell.indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES];
}
- (void)editRandomMessage:(id)sender
{
int sentences = (arc4random() % 10);
if (sentences <= 1) sentences = 1;
[self editText:[LoremIpsum sentencesWithNumber:sentences]];
}
- (void)editLastMessage:(id)sender
{
if (self.textView.text.length > 0) {
return;
}
NSInteger lastSectionIndex = [self.tableView numberOfSections]-1;
NSInteger lastRowIndex = [self.tableView numberOfRowsInSection:lastSectionIndex]-1;
Message *lastMessage = [self.messages objectAtIndex:lastRowIndex];
[self editText:lastMessage.text];
[self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:lastRowIndex inSection:lastSectionIndex] atScrollPosition:UITableViewScrollPositionBottom animated:YES];
}
- (void)togglePIPWindow:(id)sender
{
if (!_pipWindow) {
[self showPIPWindow:sender];
}
else {
[self hidePIPWindow:sender];
}
}
- (void)showPIPWindow:(id)sender
{
CGRect frame = CGRectMake(CGRectGetWidth(self.view.frame) - 60.0, 0.0, 50.0, 50.0);
frame.origin.y = CGRectGetMinY(self.textInputbar.frame) - 60.0;
_pipWindow = [[UIWindow alloc] initWithFrame:frame];
_pipWindow.backgroundColor = [UIColor blackColor];
_pipWindow.layer.cornerRadius = 10.0;
_pipWindow.layer.masksToBounds = YES;
_pipWindow.hidden = NO;
_pipWindow.alpha = 0.0;
[[UIApplication sharedApplication].keyWindow addSubview:_pipWindow];
[UIView animateWithDuration:0.25
animations:^{
_pipWindow.alpha = 1.0;
}];
}
- (void)hidePIPWindow:(id)sender
{
[UIView animateWithDuration:0.3
animations:^{
_pipWindow.alpha = 0.0;
}
completion:^(BOOL finished) {
_pipWindow.hidden = YES;
_pipWindow = nil;
}];
}
- (void)textInputbarDidMove:(NSNotification *)note
{
if (!_pipWindow) {
return;
}
CGRect frame = self.pipWindow.frame;
frame.origin.y = [note.userInfo[@"origin"] CGPointValue].y - 60.0;
self.pipWindow.frame = frame;
}
#pragma mark - Overriden Methods
- (BOOL)ignoreTextInputbarAdjustment
{
return [super ignoreTextInputbarAdjustment];
}
- (BOOL)forceTextInputbarAdjustmentForResponder:(UIResponder *)responder
{
if ([responder isKindOfClass:[UIAlertController class]]) {
return YES;
}
// On iOS 9, returning YES helps keeping the input view visible when the keyboard if presented from another app when using multi-tasking on iPad.
return SLK_IS_IPAD;
}
- (void)didChangeKeyboardStatus:(SLKKeyboardStatus)status
{
// Notifies the view controller that the keyboard changed status.
switch (status) {
case SLKKeyboardStatusWillShow: return NSLog(@"Will Show");
case SLKKeyboardStatusDidShow: return NSLog(@"Did Show");
case SLKKeyboardStatusWillHide: return NSLog(@"Will Hide");
case SLKKeyboardStatusDidHide: return NSLog(@"Did Hide");
}
}
- (void)textWillUpdate
{
// Notifies the view controller that the text will update.
[super textWillUpdate];
}
- (void)textDidUpdate:(BOOL)animated
{
// Notifies the view controller that the text did update.
[super textDidUpdate:animated];
}
- (void)didPressLeftButton:(id)sender
{
// Notifies the view controller when the left button's action has been triggered, manually.
[super didPressLeftButton:sender];
UIViewController *vc = [UIViewController new];
vc.view.backgroundColor = [UIColor whiteColor];
vc.title = @"Details";
[self.navigationController pushViewController:vc animated:YES];
}
- (void)didPressRightButton:(id)sender
{
// Notifies the view controller when the right button's action has been triggered, manually or by using the keyboard return key.
// This little trick validates any pending auto-correction or auto-spelling just after hitting the 'Send' button
[self.textView refreshFirstResponder];
Message *message = [Message new];
message.username = [LoremIpsum name];
message.text = [self.textView.text copy];
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
UITableViewRowAnimation rowAnimation = self.inverted ? UITableViewRowAnimationBottom : UITableViewRowAnimationTop;
UITableViewScrollPosition scrollPosition = self.inverted ? UITableViewScrollPositionBottom : UITableViewScrollPositionTop;
[self.tableView beginUpdates];
[self.messages insertObject:message atIndex:0];
[self.tableView insertRowsAtIndexPaths:@[indexPath] withRowAnimation:rowAnimation];
[self.tableView endUpdates];
[self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:scrollPosition animated:YES];
// Fixes the cell from blinking (because of the transform, when using translucent cells)
// See https://github.com/slackhq/SlackTextViewController/issues/94#issuecomment-69929927
[self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
[super didPressRightButton:sender];
}
- (void)didPressArrowKey:(UIKeyCommand *)keyCommand
{
if ([keyCommand.input isEqualToString:UIKeyInputUpArrow] && self.textView.text.length == 0) {
[self editLastMessage:nil];
}
else {
[super didPressArrowKey:keyCommand];
}
}
- (NSString *)keyForTextCaching
{
return [[NSBundle mainBundle] bundleIdentifier];
}
- (void)didPasteMediaContent:(NSDictionary *)userInfo
{
// Notifies the view controller when the user has pasted a media (image, video, etc) inside of the text view.
[super didPasteMediaContent:userInfo];
SLKPastableMediaType mediaType = [userInfo[SLKTextViewPastedItemMediaType] integerValue];
NSString *contentType = userInfo[SLKTextViewPastedItemContentType];
id data = userInfo[SLKTextViewPastedItemData];
NSLog(@"%s : %@ (type = %ld) | data : %@",__FUNCTION__, contentType, (unsigned long)mediaType, data);
}
- (void)willRequestUndo
{
// Notifies the view controller when a user did shake the device to undo the typed text
[super willRequestUndo];
}
- (void)didCommitTextEditing:(id)sender
{
// Notifies the view controller when tapped on the right "Accept" button for commiting the edited text
self.editingMessage.text = [self.textView.text copy];
[self.tableView reloadData];
[super didCommitTextEditing:sender];
}
- (void)didCancelTextEditing:(id)sender
{
// Notifies the view controller when tapped on the left "Cancel" button
[super didCancelTextEditing:sender];
}
- (BOOL)canPressRightButton
{
return [super canPressRightButton];
}
- (BOOL)canShowTypingIndicator
{
#if DEBUG_CUSTOM_TYPING_INDICATOR
return YES;
#else
return [super canShowTypingIndicator];
#endif
}
- (BOOL)shouldProcessTextForAutoCompletion
{
return [super shouldProcessTextForAutoCompletion];
}
- (BOOL)shouldDisableTypingSuggestionForAutoCompletion
{
return [super shouldDisableTypingSuggestionForAutoCompletion];
}
- (void)didChangeAutoCompletionPrefix:(NSString *)prefix andWord:(NSString *)word
{
NSArray *array = nil;
self.searchResult = nil;
if ([prefix isEqualToString:@"@"]) {
if (word.length > 0) {
array = [self.users filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"self BEGINSWITH[c] %@", word]];
}
else {
array = self.users;
}
}
else if ([prefix isEqualToString:@"#"] && word.length > 0) {
array = [self.channels filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"self BEGINSWITH[c] %@", word]];
}
else if (([prefix isEqualToString:@":"] || [prefix isEqualToString:@"+:"]) && word.length > 1) {
array = [self.emojis filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"self BEGINSWITH[c] %@", word]];
}
else if ([prefix isEqualToString:@"/"] && self.foundPrefixRange.location == 0) {
if (word.length > 0) {
array = [self.commands filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"self BEGINSWITH[c] %@", word]];
}
else {
array = self.commands;
}
}
if (array.count > 0) {
array = [array sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
}
self.searchResult = [[NSMutableArray alloc] initWithArray:array];
BOOL show = (self.searchResult.count > 0);
[self showAutoCompletionView:show];
}
- (CGFloat)heightForAutoCompletionView
{
CGFloat cellHeight = [self.autoCompletionView.delegate tableView:self.autoCompletionView heightForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
return cellHeight*self.searchResult.count;
}
#pragma mark - SLKTextViewDelegate Methods
- (BOOL)textView:(SLKTextView *)textView shouldOfferFormattingForSymbol:(NSString *)symbol
{
if ([symbol isEqualToString:@">"]) {
NSRange selection = textView.selectedRange;
// The Quote formatting only applies new paragraphs
if (selection.location == 0 && selection.length > 0) {
return YES;
}
// or older paragraphs too
NSString *prevString = [textView.text substringWithRange:NSMakeRange(selection.location-1, 1)];
if ([[NSCharacterSet newlineCharacterSet] characterIsMember:[prevString characterAtIndex:0]]) {
return YES;
}
return NO;
}
return [super textView:textView shouldOfferFormattingForSymbol:symbol];
}
- (BOOL)textView:(SLKTextView *)textView shouldInsertSuffixForFormattingWithSymbol:(NSString *)symbol prefixRange:(NSRange)prefixRange
{
if ([symbol isEqualToString:@">"]) {
return NO;
}
return [super textView:textView shouldInsertSuffixForFormattingWithSymbol:symbol prefixRange:prefixRange];
}
#pragma mark - UITextViewDelegate Methods
- (BOOL)textView:(SLKTextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
return [super textView:textView shouldChangeTextInRange:range replacementText:text];
}
#pragma mark - UITableViewDataSource Methods
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
if ([tableView isEqual:self.tableView]) {
return self.messages.count;
}
else {
return self.searchResult.count;
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([tableView isEqual:self.tableView]) {
return [self messageCellForRowAtIndexPath:indexPath];
}
else {
return [self autoCompletionCellForRowAtIndexPath:indexPath];
}
}
- (MessageTableViewCell *)messageCellForRowAtIndexPath:(NSIndexPath *)indexPath
{
MessageTableViewCell *cell = (MessageTableViewCell *)[self.tableView dequeueReusableCellWithIdentifier:MessengerCellIdentifier];
if (cell.gestureRecognizers.count == 0) {
UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(didLongPressCell:)];
[cell addGestureRecognizer:longPress];
}
Message *message = self.messages[indexPath.row];
cell.titleLabel.text = message.username;
cell.bodyLabel.text = message.text;
cell.indexPath = indexPath;
cell.usedForMessage = YES;
// Cells must inherit the table view's transform
// This is very important, since the main table view may be inverted
cell.transform = self.tableView.transform;
return cell;
}
- (MessageTableViewCell *)autoCompletionCellForRowAtIndexPath:(NSIndexPath *)indexPath
{
MessageTableViewCell *cell = (MessageTableViewCell *)[self.autoCompletionView dequeueReusableCellWithIdentifier:AutoCompletionCellIdentifier];
cell.indexPath = indexPath;
NSString *text = self.searchResult[indexPath.row];
if ([self.foundPrefix isEqualToString:@"#"]) {
text = [NSString stringWithFormat:@"# %@", text];
}
else if (([self.foundPrefix isEqualToString:@":"] || [self.foundPrefix isEqualToString:@"+:"])) {
text = [NSString stringWithFormat:@":%@:", text];
}
cell.titleLabel.text = text;
cell.selectionStyle = UITableViewCellSelectionStyleDefault;
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([tableView isEqual:self.tableView]) {
Message *message = self.messages[indexPath.row];
NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new];
paragraphStyle.lineBreakMode = NSLineBreakByWordWrapping;
paragraphStyle.alignment = NSTextAlignmentLeft;
CGFloat pointSize = [MessageTableViewCell defaultFontSize];
NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:pointSize],
NSParagraphStyleAttributeName: paragraphStyle};
CGFloat width = CGRectGetWidth(tableView.frame)-kMessageTableViewCellAvatarHeight;
width -= 25.0;
CGRect titleBounds = [message.username boundingRectWithSize:CGSizeMake(width, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:attributes context:NULL];
CGRect bodyBounds = [message.text boundingRectWithSize:CGSizeMake(width, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:attributes context:NULL];
if (message.text.length == 0) {
return 0.0;
}
CGFloat height = CGRectGetHeight(titleBounds);
height += CGRectGetHeight(bodyBounds);
height += 40.0;
if (height < kMessageTableViewCellMinimumHeight) {
height = kMessageTableViewCellMinimumHeight;
}
return height;
}
else {
return kMessageTableViewCellMinimumHeight;
}
}
#pragma mark - UITableViewDelegate Methods
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([tableView isEqual:self.autoCompletionView]) {
NSMutableString *item = [self.searchResult[indexPath.row] mutableCopy];
if ([self.foundPrefix isEqualToString:@"@"] && self.foundPrefixRange.location == 0) {
[item appendString:@":"];
}
else if (([self.foundPrefix isEqualToString:@":"] || [self.foundPrefix isEqualToString:@"+:"])) {
[item appendString:@":"];
}
[item appendString:@" "];
[self acceptAutoCompletionWithString:item keepPrefix:YES];
}
}
#pragma mark - UIScrollViewDelegate Methods
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
// Since SLKTextViewController uses UIScrollViewDelegate to update a few things, it is important that if you override this method, to call super.
[super scrollViewDidScroll:scrollView];
}
#pragma mark - Lifeterm
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
@end
================================================
FILE: Examples/Messenger-Shared/TypingIndicatorView.h
================================================
//
// TypingIndicatorView.h
// Messenger
//
// Created by Ignacio Romero Z. on 6/27/15.
// Copyright (c) 2015 Slack Technologies, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "SLKTypingIndicatorProtocol.h"
static CGFloat kTypingIndicatorViewMinimumHeight = 80.0;
static CGFloat kTypingIndicatorViewAvatarHeight = 30.0;
@interface TypingIndicatorView : UIView <SLKTypingIndicatorProtocol>
- (void)presentIndicatorWithName:(NSString *)name image:(UIImage *)image;
- (void)dismissIndicator;
@end
================================================
FILE: Examples/Messenger-Shared/TypingIndicatorView.m
================================================
//
// TypingIndicatorView.m
// Messenger
//
// Created by Ignacio Romero Z. on 6/27/15.
// Copyright (c) 2015 Slack Technologies, Inc. All rights reserved.
//
#import "TypingIndicatorView.h"
#import "SLKUIConstants.h"
@interface TypingIndicatorView ()
@property (nonatomic, strong) UIImageView *thumbnailView;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) CAGradientLayer *backgroundGradient;
@end
@implementation TypingIndicatorView
@synthesize visible = _visible;
- (instancetype)init
{
self = [super init];
if (self) {
[self configureSubviews];
}
return self;
}
- (void)configureSubviews
{
[self addSubview:self.thumbnailView];
[self addSubview:self.titleLabel];
[self.layer insertSublayer:self.backgroundGradient atIndex:0];
NSDictionary *views = @{@"thumbnailView": self.thumbnailView,
@"titleLabel": self.titleLabel
};
NSDictionary *metrics = @{@"invertedThumbSize": @(-kTypingIndicatorViewAvatarHeight/2.0),
};
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|-5-[thumbnailView]-10-[titleLabel]-(>=0)-|" options:0 metrics:metrics views:views]];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(>=0)-[thumbnailView]-(invertedThumbSize)-|" options:0 metrics:metrics views:views]];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(>=0)-[titleLabel]-(3@750)-|" options:0 metrics:metrics views:views]];
}
#pragma mark - SLKTypingIndicatorProtocol
- (void)dismissIndicator
{
if (self.isVisible) {
self.visible = NO;
}
}
#pragma mark - UIView
- (void)layoutSubviews
{
[super layoutSubviews];
self.backgroundGradient.frame = self.bounds;
}
#pragma mark - Getters
- (UIImageView *)thumbnailView
{
if (!_thumbnailView) {
_thumbnailView = [UIImageView new];
_thumbnailView.translatesAutoresizingMaskIntoConstraints = NO;
_thumbnailView.userInteractionEnabled = NO;
_thumbnailView.backgroundColor = [UIColor grayColor];
_thumbnailView.contentMode = UIViewContentModeTopLeft;
_thumbnailView.layer.cornerRadius = kTypingIndicatorViewAvatarHeight/2.0;
_thumbnailView.layer.masksToBounds = YES;
}
return _thumbnailView;
}
- (UILabel *)titleLabel
{
if (!_titleLabel) {
_titleLabel = [UILabel new];
_titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
_titleLabel.backgroundColor = [UIColor clearColor];
_titleLabel.userInteractionEnabled = NO;
_titleLabel.numberOfLines = 1;
_titleLabel.contentMode = UIViewContentModeTopLeft;
_titleLabel.font = [UIFont systemFontOfSize:12.0];
_titleLabel.textColor = [UIColor lightGrayColor];
}
return _titleLabel;
}
- (CAGradientLayer *)backgroundGradient
{
if (!_backgroundGradient) {
_backgroundGradient = [CAGradientLayer layer];
_backgroundGradient.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(SLKKeyWindowBounds()), [self height]);
_backgroundGradient.colors = @[(id)[UIColor colorWithWhite:1.0 alpha:0].CGColor,
(id)[UIColor colorWithWhite:1.0 alpha:0.9].CGColor,
(id)[UIColor colorWithWhite:1.0 alpha:1.0].CGColor];
_backgroundGradient.locations = @[@0, @0.5, @1];
}
return _backgroundGradient;
}
- (CGSize)intrinsicContentSize
{
return CGSizeMake(UIViewNoIntrinsicMetric, [self height]);
}
- (CGFloat)height
{
CGFloat height = 13.0;
height += self.titleLabel.font.lineHeight;
return height;
}
#pragma mark - TypingIndicatorView
- (void)presentIndicatorWithName:(NSString *)name image:(UIImage *)image
{
if (self.isVisible || name.length == 0 || !image) {
return;
}
NSString *text = [NSString stringWithFormat:@"%@ is typing...", name];
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:text];
[attributedString addAttributes:@{NSFontAttributeName: [UIFont boldSystemFontOfSize:12.0]} range:[text rangeOfString:name]];
self.titleLabel.attributedText = attributedString;
self.thumbnailView.image = image;
self.visible = YES;
}
#pragma mark - Hit Testing
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesBegan:touches withEvent:event];
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesEnded:touches withEvent:event];
[self dismissIndicator];
}
#pragma mark - Lifeterm
- (void)dealloc
{
_titleLabel = nil;
_thumbnailView = nil;
_backgroundGradient = nil;
}
@end
================================================
FILE: Examples/Messenger-Storyboard/AppDelegate.h
================================================
//
// AppDelegate.h
// Messenger-Storyboard
//
// Created by Ignacio Romero Zurbuchen on 10/16/14.
// Copyright (c) 2014 Slack Technologies, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
================================================
FILE: Examples/Messenger-Storyboard/AppDelegate.m
================================================
//
// AppDelegate.m
// Messenger-Storyboard
//
// Created by Ignacio Romero Zurbuchen on 10/16/14.
// Copyright (c) 2014 Slack Technologies, Inc. All rights reserved.
//
#import "AppDelegate.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window.backgroundColor = [UIColor whiteColor];
return YES;
}
@end
================================================
FILE: Examples/Messenger-Storyboard/Base.lproj/LaunchScreen.xib
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>
================================================
FILE: Examples/Messenger-Storyboard/Base.lproj/Main.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="0WO-Kt-Oxc">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<scenes>
<!--Message View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController hidesBottomBarWhenPushed="YES" id="BYZ-38-t0r" customClass="MessageViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" id="nZY-L4-a9K"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2060" y="492"/>
</scene>
<!--Tab Bar Controller-->
<scene sceneID="SEt-8k-R87">
<objects>
<tabBarController id="0WO-Kt-Oxc" sceneMemberID="viewController">
<nil key="simulatedBottomBarMetrics"/>
<tabBar key="tabBar" contentMode="scaleToFill" id="US0-fN-o9u">
<rect key="frame" x="0.0" y="0.0" width="320" height="49"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</tabBar>
<connections>
<segue destination="nJp-d0-Z0H" kind="relationship" relationship="viewControllers" id="nd7-Np-oUR"/>
</connections>
</tabBarController>
<placeholder placeholderIdentifier="IBFirstResponder" id="bQn-nb-Tgr" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-132" y="492"/>
</scene>
<!--Tab-->
<scene sceneID="5B4-6e-pdF">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="nJp-d0-Z0H" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" title="Tab" image="icn_editing" id="whH-lj-Whp"/>
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="fWe-MD-oZ3">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="5J0-Za-g0P" kind="relationship" relationship="rootViewController" id="Tb1-Ti-lhP"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="wkR-Np-z1e" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="583" y="492"/>
</scene>
<!--View Controller-->
<scene sceneID="TSR-94-Tub">
<objects>
<viewController id="5J0-Za-g0P" customClass="ViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="8s3-hO-PR9"/>
<viewControllerLayoutGuide type="bottom" id="I8X-fm-814"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="702-Fr-1mD">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yN8-wX-kH9">
<rect key="frame" x="215" y="285" width="170" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="170" id="D2a-Y2-2f5"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal" title="Show Messages">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="showMessages:" destination="5J0-Za-g0P" eventType="touchUpInside" id="48k-1a-e8y"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="yN8-wX-kH9" firstAttribute="centerX" secondItem="702-Fr-1mD" secondAttribute="centerX" id="yIo-92-tsh"/>
<constraint firstItem="yN8-wX-kH9" firstAttribute="centerY" secondItem="702-Fr-1mD" secondAttribute="centerY" id="zkf-aa-kmw"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="9qv-Ey-Yxv"/>
<connections>
<segue destination="BYZ-38-t0r" kind="show" identifier="show_messages" id="4hj-5O-t4I"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="8p4-cT-JUo" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1322" y="492"/>
</scene>
</scenes>
<resources>
<image name="icn_editing" width="24" height="24"/>
</resources>
</document>
================================================
FILE: Examples/Messenger-Storyboard/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Messenger</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAppTransportSecurity</key>
<true/>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
================================================
FILE: Examples/Messenger-Storyboard/ViewController.h
================================================
//
// ViewController.h
// Messenger
//
// Created by Ignacio Romero Z. on 4/8/15.
// Copyright (c) 2015 Slack Technologies, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
- (IBAction)showMessages:(id)sender;
@end
================================================
FILE: Examples/Messenger-Storyboard/ViewController.m
================================================
//
// ViewController.m
// Messenger
//
// Created by Ignacio Romero Z. on 4/8/15.
// Copyright (c) 2015 Slack Technologies, Inc. All rights reserved.
//
#import "ViewController.h"
@implementation ViewController
- (IBAction)showMessages:(id)sender
{
[self performSegueWithIdentifier:@"show_messages" sender:sender];
}
@end
================================================
FILE: Examples/Messenger-Storyboard/main.m
================================================
//
// main.m
// Messenger-Storyboard
//
// Created by Ignacio Romero Z. on 10/16/14.
// Copyright (c) 2014 Slack Technologies, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
================================================
FILE: Examples/Messenger-Swift/AppDelegate.swift
================================================
//
// AppDelegate.swift
// Messenger
//
// Created by Ignacio Romero Zurbuchen on 10/16/14.
// Copyright (c) 2014 Slack Technologies, Inc. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
window?.backgroundColor = UIColor.white
return true
}
}
================================================
FILE: Examples/Messenger-Swift/Base.lproj/LaunchScreen.xib
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>
================================================
FILE: Examples/Messenger-Swift/Base.lproj/Main.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="jPN-Ft-lgW">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Message Thread-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController title="Message Thread" id="BYZ-38-t0r" customClass="MessageViewController" customModule="Messenger_Swift" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" id="Kuo-HA-7nc"/>
<connections>
<segue destination="kwe-Wv-66Y" kind="show" identifier="Push" id="rAO-Fs-P9l"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1213" y="478"/>
</scene>
<!--Message Detail-->
<scene sceneID="EBE-UJ-9Eg">
<objects>
<viewController title="Message Detail" id="kwe-Wv-66Y" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="08R-wf-6EQ"/>
<viewControllerLayoutGuide type="bottom" id="9ks-NF-Vcp"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="KMe-76-E1y">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Qla-sV-EqK" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1977" y="478"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="Tsc-df-QmC">
<objects>
<navigationController automaticallyAdjustsScrollViewInsets="NO" id="jPN-Ft-lgW" sceneMemberID="viewController">
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="xqF-ez-ADD">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
<connections>
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="CLW-sF-SRl"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="0OH-fa-FRa" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="436" y="478"/>
</scene>
</scenes>
</document>
================================================
FILE: Examples/Messenger-Swift/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Messenger</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
================================================
FILE: Examples/Messenger-Swift/MessageViewController.swift
================================================
//
// MessageViewController.swift
// Messenger
//
// Created by Ignacio Romero Zurbuchen on 10/16/14.
// Copyright (c) 2014 Slack Technologies, Inc. All rights reserved.
//
let DEBUG_CUSTOM_TYPING_INDICATOR = false
class MessageViewController: SLKTextViewController {
var messages = [Message]()
var users: Array = ["Allen", "Anna", "Alicia", "Arnold", "Armando", "Antonio", "Brad", "Catalaya", "Christoph", "Emerson", "Eric", "Everyone", "Steve"]
var channels: Array = ["General", "Random", "iOS", "Bugs", "Sports", "Android", "UI", "SSB"]
var emojis: Array = ["-1", "m", "man", "machine", "block-a", "block-b", "bowtie", "boar", "boat", "book", "bookmark", "neckbeard", "metal", "fu", "feelsgood"]
var commands: Array = ["msg", "call", "text", "skype", "kick", "invite"]
var searchResult: [String]?
var pipWindow: UIWindow?
var editingMessage = Message()
override var tableView: UITableView {
get {
return super.tableView!
}
}
// MARK: - Initialisation
override class func tableViewStyle(for decoder: NSCoder) -> UITableViewStyle {
return .plain
}
func commonInit() {
NotificationCenter.default.addObserver(self.tableView, selector: #selector(UITableView.reloadData), name: NSNotification.Name.UIContentSizeCategoryDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(MessageViewController.textInputbarDidMove(_:)), name: NSNotification.Name.SLKTextInputbarDidMove, object: nil)
}
override func viewDidLoad() {
// Register a SLKTextView subclass, if you need any special appearance and/or behavior customisation.
self.registerClass(forTextView: MessageTextView.classForCoder())
if DEBUG_CUSTOM_TYPING_INDICATOR == true {
// Register a UIView subclass, conforming to SLKTypingIndicatorProtocol, to use a custom typing indicator view.
self.registerClass(forTypingIndicatorView: TypingIndicatorView.classForCoder())
}
super.viewDidLoad()
self.commonInit()
// Example's configuration
self.configureDataSource()
self.configureActionItems()
// SLKTVC's configuration
self.bounces = true
self.shakeToClearEnabled = true
self.isKeyboardPanningEnabled = true
self.shouldScrollToBottomAfterKeyboardShows = false
self.isInverted = true
self.leftButton.setImage(UIImage(named: "icn_upload"), for: UIControlState())
self.leftButton.tintColor = UIColor.gray
self.rightButton.setTitle(NSLocalizedString("Send", comment: ""), for: UIControlState())
self.textInputbar.autoHideRightButton = true
self.textInputbar.maxCharCount = 256
self.textInputbar.counterStyle = .split
self.textInputbar.counterPosition = .top
self.textInputbar.editorTitle.textColor = UIColor.darkGray
self.textInputbar.editorLeftButton.tintColor = UIColor(red: 0/255, green: 122/255, blue: 255/255, alpha: 1)
self.textInputbar.editorRightButton.tintColor = UIColor(red: 0/255, green: 122/255, blue: 255/255, alpha: 1)
if DEBUG_CUSTOM_TYPING_INDICATOR == false {
self.typingIndicatorView!.canResignByTouch = true
}
self.tableView.separatorStyle = .none
self.tableView.register(MessageTableViewCell.classForCoder(), forCellReuseIdentifier: MessengerCellIdentifier)
self.autoCompletionView.register(MessageTableViewCell.classForCoder(), forCellReuseIdentifier: AutoCompletionCellIdentifier)
self.registerPrefixes(forAutoCompletion: ["@", "#", ":", "+:", "/"])
self.textView.placeholder = "Message";
self.textView.registerMarkdownFormattingSymbol("*", withTitle: "Bold")
self.textView.registerMarkdownFormattingSymbol("_", withTitle: "Italics")
self.textView.registerMarkdownFormattingSymbol("~", withTitle: "Strike")
self.textView.registerMarkdownFormattingSymbol("`", withTitle: "Code")
self.textView.registerMarkdownFormattingSymbol("```", withTitle: "Preformatted")
self.textView.registerMarkdownFormattingSymbol(">", withTitle: "Quote")
}
// MARK: - Lifeterm
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
deinit {
NotificationCenter.default.removeObserver(self)
}
}
extension MessageViewController {
// MARK: - Example's Configuration
func configureDataSource() {
var array = [Message]()
for _ in 0..<100 {
let words = Int((arc4random() % 40)+1)
let message = Message()
message.username = LoremIpsum.name()
message.text = LoremIpsum.words(withNumber: words)
array.append(message)
}
let reversed = array.reversed()
self.messages.append(contentsOf: reversed)
}
func configureActionItems() {
let arrowItem = UIBarButtonItem(image: UIImage(named: "icn_arrow_down"), style: .plain, target: self, action: #selector(MessageViewController.hideOrShowTextInputbar(_:)))
let editItem = UIBarButtonItem(image: UIImage(named: "icn_editing"), style: .plain, target: self, action: #selector(MessageViewController.editRandomMessage(_:)))
let typeItem = UIBarButtonItem(image: UIImage(named: "icn_typing"), style: .plain, target: self, action: #selector(MessageViewController.simulateUserTyping(_:)))
let appendItem = UIBarButtonItem(image: UIImage(named: "icn_append"), style: .plain, target: self, action: #selector(MessageViewController.fillWithText(_:)))
let pipItem = UIBarButtonItem(image: UIImage(named: "icn_pic"), style: .plain, target: self, action: #selector(MessageViewController.togglePIPWindow(_:)))
self.navigationItem.rightBarButtonItems = [arrowItem, pipItem, editItem, appendItem, typeItem]
}
// MARK: - Action Methods
func hideOrShowTextInputbar(_ sender: AnyObject) {
guard let buttonItem = sender as? UIBarButtonItem else {
return
}
let hide = !self.isTextInputbarHidden
let image = hide ? UIImage(named: "icn_arrow_up") : UIImage(named: "icn_arrow_down")
self.setTextInputbarHidden(hide, animated: true)
buttonItem.image = image
}
func fillWithText(_ sender: AnyObject) {
if self.textView.text.characters.count == 0 {
var sentences = Int(arc4random() % 4)
if sentences <= 1 {
sentences = 1
}
self.textView.text = LoremIpsum.sentences(withNumber: sentences)
}
else {
self.textView.slk_insertText(atCaretRange: " " + LoremIpsum.word())
}
}
func simulateUserTyping(_ sender: AnyObject) {
if !self.canShowTypingIndicator() {
return
}
if DEBUG_CUSTOM_TYPING_INDICATOR == true {
guard let view = self.typingIndicatorProxyView as? TypingIndicatorView else {
return
}
let scale = UIScreen.main.scale
let imgSize = CGSize(width: kTypingIndicatorViewAvatarHeight*scale, height: kTypingIndicatorViewAvatarHeight*scale)
// This will cause the typing indicator to show after a delay ¯\_(ツ)_/¯
LoremIpsum.asyncPlaceholderImage(with: imgSize, completion: { (image) -> Void in
guard let cgImage = image?.cgImage else {
return
}
let thumbnail = UIImage(cgImage: cgImage, scale: scale, orientation: .up)
view.presentIndicator(withName: LoremIpsum.name(), image: thumbnail)
})
}
else {
self.typingIndicatorView!.insertUsername(LoremIpsum.name())
}
}
func didLongPressCell(_ gesture: UIGestureRecognizer) {
guard let view = gesture.view else {
return
}
if gesture.state != .began {
return
}
if #available(iOS 8, *) {
let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
alertController.modalPresentationStyle = .popover
alertController.popoverPresentationController?.sourceView = view.superview
alertController.popoverPresentationController?.sourceRect = view.frame
alertController.addAction(UIAlertAction(title: "Edit Message", style: .default, handler: { [unowned self] (action) -> Void in
self.editCellMessage(gesture)
}))
alertController.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil))
self.navigationController?.present(alertController, animated: true, completion: nil)
}
else {
self.editCellMessage(gesture)
}
}
func editCellMessage(_ gesture: UIGestureRecognizer) {
guard let cell = gesture.view as? MessageTableViewCell else {
return
}
self.editingMessage = self.messages[cell.indexPath.row]
self.editText(self.editingMessage.text)
self.tableView.scrollToRow(at: cell.indexPath, at: .bottom, animated: true)
}
func editRandomMessage(_ sender: AnyObject) {
var sentences = Int(arc4random() % 10)
if sentences <= 1 {
sentences = 1
}
self.editText(LoremIpsum.sentences(withNumber: sentences))
}
func editLastMessage(_ sender: AnyObject?) {
if self.textView.text.characters.count > 0 {
return
}
let lastSectionIndex = self.tableView.numberOfSections-1
let lastRowIndex = self.tableView.numberOfRows(inSection: lastSectionIndex)-1
let lastMessage = self.messages[lastRowIndex]
self.editText(lastMessage.text)
self.tableView.scrollToRow(at: IndexPath(row: lastRowIndex, section: lastSectionIndex), at: .bottom, animated: true)
}
func togglePIPWindow(_ sender: AnyObject) {
if self.pipWindow == nil {
self.showPIPWindow(sender)
}
else {
self.hidePIPWindow(sender)
}
}
func showPIPWindow(_ sender: AnyObject) {
var frame = CGRect(x: self.view.frame.width - 60.0, y: 0.0, width: 50.0, height: 50.0)
frame.origin.y = self.textInputbar.frame.minY - 60.0
self.pipWindow = UIWindow(frame: frame)
self.pipWindow?.backgroundColor = UIColor.black
self.pipWindow?.layer.cornerRadius = 10
self.pipWindow?.layer.masksToBounds = true
self.pipWindow?.isHidden = false
self.pipWindow?.alpha = 0.0
UIApplication.shared.keyWindow?.addSubview(self.pipWindow!)
UIView.animate(withDuration: 0.25, animations: { [unowned self] () -> Void in
self.pipWindow?.alpha = 1.0
})
}
func hidePIPWindow(_ sender: AnyObject) {
UIView.animate(withDuration: 0.3, animations: { [unowned self] () -> Void in
self.pipWindow?.alpha = 0.0
}, completion: { [unowned self] (finished) -> Void in
self.pipWindow?.isHidden = true
self.pipWindow = nil
})
}
func textInputbarDidMove(_ note: Notification) {
guard let pipWindow = self.pipWindow else {
return
}
guard let userInfo = (note as NSNotification).userInfo else {
return
}
guard let value = userInfo["origin"] as? NSValue else {
return
}
var frame = pipWindow.frame
frame.origin.y = value.cgPointValue.y - 60.0
pipWindow.frame = frame
}
}
extension MessageViewController {
// MARK: - Overriden Methods
override func ignoreTextInputbarAdjustment() -> Bool {
return super.ignoreTextInputbarAdjustment()
}
override func forceTextInputbarAdjustment(for responder: UIResponder!) -> Bool {
if #available(iOS 8.0, *) {
guard let _ = responder as? UIAlertController else {
// On iOS 9, returning YES helps keeping the input view visible when the keyboard if presented from another app when using multi-tasking on iPad.
return UIDevice.current.userInterfaceIdiom == .pad
}
return true
}
else {
return UIDevice.current.userInterfaceIdiom == .pad
}
}
// Notifies the view controller that the keyboard changed status.
override func didChangeKeyboardStatus(_ status: SLKKeyboardStatus) {
switch status {
case .willShow:
print("Will Show")
case .didShow:
print("Did Show")
case .willHide:
print("Will Hide")
case .didHide:
print("Did Hide")
}
}
// Notifies the view controller that the text will update.
override func textWillUpdate() {
super.textWillUpdate()
}
// Notifies the view controller that the text did update.
override func textDidUpdate(_ animated: Bool) {
super.textDidUpdate(animated)
}
// Notifies the view controller when the left button's action has been triggered, manually.
override func didPressLeftButton(_ sender: Any!) {
super.didPressLeftButton(sender)
self.dismissKeyboard(true)
self.performSegue(withIdentifier: "Push", sender: nil)
}
// Notifies the view controller when the right button's action has been triggered, manually or by using the keyboard return key.
override func didPressRightButton(_ sender: Any!) {
// This little trick validates any pending auto-correction or auto-spelling just after hitting the 'Send' button
self.textView.refreshFirstResponder()
let message = Message()
message.username = LoremIpsum.name()
message.text = self.textView.text
let indexPath = IndexPath(row: 0, section: 0)
let rowAnimation: UITableViewRowAnimation = self.isInverted ? .bottom : .top
let scrollPosition: UITableViewScrollPosition = self.isInverted ? .bottom : .top
self.tableView.beginUpdates()
self.messages.insert(message, at: 0)
self.tableView.insertRows(at: [indexPath], with: rowAnimation)
self.tableView.endUpdates()
self.tableView.scrollToRow(at: indexPath, at: scrollPosition, animated: true)
// Fixes the cell from blinking (because of the transform, when using translucent cells)
// See https://github.com/slackhq/SlackTextViewController/issues/94#issuecomment-69929927
self.tableView.reloadRows(at: [indexPath], with: .automatic)
super.didPressRightButton(sender)
}
override func didPressArrowKey(_ keyCommand: UIKeyCommand?) {
guard let keyCommand = keyCommand else { return }
if keyCommand.input == UIKeyInputUpArrow && self.textView.text.characters.count == 0 {
self.editLastMessage(nil)
}
else {
super.didPressArrowKey(keyCommand)
}
}
override func keyForTextCaching() -> String? {
return Bundle.main.bundleIdentifier
}
// Notifies the view controller when the user has pasted a media (image, video, etc) inside of the text view.
override func didPasteMediaContent(_ userInfo: [AnyHashable: Any]) {
super.didPasteMediaContent(userInfo)
let mediaType = (userInfo[SLKTextViewPastedItemMediaType] as? NSNumber)?.intValue
let contentType = userInfo[SLKTextViewPastedItemContentType]
let data = userInfo[SLKTextViewPastedItemData]
print("didPasteMediaContent : \(contentType) (type = \(mediaType) | data : \(data))")
}
// Notifies the view controller when a user did shake the device to undo the typed text
override func willRequestUndo() {
super.willRequestUndo()
}
// Notifies the view controller when tapped on the right "Accept" button for commiting the edited text
override func didCommitTextEditing(_ sender: Any) {
self.editingMessage.text = self.textView.text
self.tableView.reloadData()
super.didCommitTextEditing(sender)
}
// Notifies the view controller when tapped on the left "Cancel" button
override func didCancelTextEditing(_ sender: Any) {
super.didCancelTextEditing(sender)
}
override func canPressRightButton() -> Bool {
return super.canPressRightButton()
}
override func canShowTypingIndicator() -> Bool {
if DEBUG_CUSTOM_TYPING_INDICATOR == true {
return true
}
else {
return super.canShowTypingIndicator()
}
}
override func shouldProcessTextForAutoCompletion() -> Bool {
return true
}
override func didChangeAutoCompletionPrefix(_ prefix: String, andWord word: String) {
var array:Array<String> = []
let wordPredicate = NSPredicate(format: "self BEGINSWITH[c] %@", word);
self.searchResult = nil
if prefix == "@" {
if word.characters.count > 0 {
array = self.users.filter { wordPredicate.evaluate(with: $0) };
}
else {
array = self.users
}
}
else if prefix == "#" {
if word.characters.count > 0 {
array = self.channels.filter { wordPredicate.evaluate(with: $0) };
}
else {
array = self.channels
}
}
else if (prefix == ":" || prefix == "+:") && word.characters.count > 0 {
array = self.emojis.filter { wordPredicate.evaluate(with: $0) };
}
else if prefix == "/" && self.foundPrefixRange.location == 0 {
if word.characters.count > 0 {
array = self.commands.filter { wordPredicate.evaluate(with: $0) };
}
else {
array = self.commands
}
}
var show = false
if array.count > 0 {
let sortedArray = array.sorted { $0.localizedCaseInsensitiveCompare($1) == ComparisonResult.orderedAscending }
self.searchResult = sortedArray
show = sortedArray.count > 0
}
self.showAutoCompletionView(show)
}
override func heightForAutoCompletionView() -> CGFloat {
guard let searchResult = self.searchResult else {
return 0
}
let cellHeight = self.autoCompletionView.delegate?.tableView!(self.autoCompletionView, heightForRowAt: IndexPath(row: 0, section: 0))
guard let height = cellHeight else {
return 0
}
return height * CGFloat(searchResult.count)
}
}
extension MessageViewController {
// MARK: - UITableViewDataSource Methods
override func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if tableView == self.tableView {
return self.messages.count
}
else {
if let searchResult = self.searchResult {
return searchResult.count
}
}
return 0
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if tableView == self.tableView {
return self.messageCellForRowAtIndexPath(indexPath)
}
else {
return self.autoCompletionCellForRowAtIndexPath(indexPath)
}
}
func messageCellForRowAtIndexPath(_ indexPath: IndexPath) -> MessageTableViewCell {
let cell = self.tableView.dequeueReusableCell(withIdentifier: MessengerCellIdentifier) as! MessageTableViewCell
if cell.gestureRecognizers?.count == nil {
let longPress = UILongPressGestureRecognizer(target: self, action: #selector(MessageViewController.didLongPressCell(_:)))
cell.addGestureRecognizer(longPress)
}
let message = self.messages[(indexPath as NSIndexPath).row]
cell.titleLabel.text = message.username
cell.bodyLabel.text = message.text
cell.indexPath = indexPath
cell.usedForMessage = true
// Cells must inherit the table view's transform
// This is very important, since the main table view may be inverted
cell.transform = self.tableView.transform
return cell
}
func autoCompletionCellForRowAtIndexPath(_ indexPath: IndexPath) -> MessageTableViewCell {
let cell = self.autoCompletionView.dequeueReusableCell(withIdentifier: AutoCompletionCellIdentifier) as! MessageTableViewCell
cell.indexPath = indexPath
cell.selectionStyle = .default
guard let searchResult = self.searchResult else {
return cell
}
guard let prefix = self.foundPrefix else {
return cell
}
var text = searchResult[(indexPath as NSIndexPath).row]
if prefix == "#" {
text = "# " + text
}
else if prefix == ":" || prefix == "+:" {
text = ":\(text):"
}
cell.titleLabel.text = text
return cell
}
override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if tableView == self.tableView {
let message = self.messages[(indexPath as NSIndexPath).row]
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.lineBreakMode = .byWordWrapping
paragraphStyle.alignment = .left
let pointSize = MessageTableViewCell.defaultFontSize()
let attributes = [
NSFontAttributeName : UIFont.systemFont(ofSize: pointSize),
NSParagraphStyleAttributeName : paragraphStyle
]
var width = tableView.frame.width-kMessageTableViewCellAvatarHeight
width -= 25.0
let titleBounds = (message.username as NSString).boundingRect(with: CGSize(width: width, height: CGFloat.greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: attributes, context: nil)
let bodyBounds = (message.text as NSString).boundingRect(with: CGSize(width: width, height: CGFloat.greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: attributes, context: nil)
if message.text.characters.count == 0 {
return 0
}
var height = titleBounds.height
height += bodyBounds.height
height += 40
if height < kMessageTableViewCellMinimumHeight {
height = kMessageTableViewCellMinimumHeight
}
return height
}
else {
return kMessageTableViewCellMinimumHeight
}
}
// MARK: - UITableViewDelegate Methods
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if tableView == self.autoCompletionView {
guard let searchResult = self.searchResult else {
return
}
var item = searchResult[(indexPath as NSIndexPath).row]
if self.foundPrefix == "@" && self.foundPrefixRange.location == 0 {
item += ":"
}
else if self.foundPrefix == ":" || self.foundPrefix == "+:" {
item += ":"
}
item += " "
self.acceptAutoCompletion(with: item, keepPrefix: true)
}
}
}
extension MessageViewController {
// MARK: - UIScrollViewDelegate Methods
// Since SLKTextViewController uses UIScrollViewDelegate to update a few things, it is important that if you override this method, to call super.
override func scrollViewDidScroll(_ scrollView: UIScrollView) {
super.scrollViewDidScroll(scrollView)
}
}
extension MessageViewController {
// MARK: - UITextViewDelegate Methods
override func textViewShouldBeginEditing(_ textView: UITextView) -> Bool {
return true
}
override func textViewShouldEndEditing(_ textView: UITextView) -> Bool {
// Since SLKTextViewController uses UIScrollViewDelegate to update a few things, it is important that if you override this method, to call super.
return true
}
override func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
return super.textView(textView, shouldChangeTextIn: range, replacementText: text)
}
override func textView(_ textView: SLKTextView, shouldOfferFormattingForSymbol symbol: String) -> Bool {
if symbol == ">" {
let selection = textView.selectedRange
// The Quote formatting only applies new paragraphs
if selection.location == 0 && selection.length > 0 {
return true
}
// or older paragraphs too
let prevString = (textView.text as NSString).substring(with: NSMakeRange(selection.location-1, 1))
if CharacterSet.newlines.contains(UnicodeScalar((prevString as NSString).character(at: 0))!) {
return true
}
return false
}
return super.textView(textView, shouldOfferFormattingForSymbol: symbol)
}
override func textView(_ textView: SLKTextView, shouldInsertSuffixForFormattingWithSymbol symbol: String, prefixRange: NSRange) -> Bool {
if symbol == ">" {
return false
}
return super.textView(textView, shouldInsertSuffixForFormattingWithSymbol: symbol, prefixRange: prefixRange)
}
}
================================================
FILE: Examples/Messenger-iPad-Sheet/AppDelegate.h
================================================
//
// AppDelegate.h
// Messenger-Programatic-iPad-Sheet
//
// Created by Bob Spryn on 1/23/15.
// Copyright (c) 2015 Slack Technologies, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
================================================
FILE: Examples/Messenger-iPad-Sheet/AppDelegate.m
================================================
//
// AppDelegate.m
// Messenger-Programatic-iPad-Sheet
//
// Created by Bob Spryn on 1/23/15.
// Copyright (c) 2015 Slack Technologies, Inc. All rights reserved.
//
#import "AppDelegate.h"
#import "SLKTextViewController.h"
#import "MessageViewController.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
MessageViewController *messageVC = [MessageViewController new];
UINavigationController *navVC = [[UINavigationController alloc] initWithRootViewController:messageVC];
navVC.modalPresentationStyle = UIModalPresentationFormSheet;
navVC.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
self.window.rootViewController = [UIViewController new];
[self.window makeKeyAndVisible];
[self.window.rootViewController presentViewController:navVC animated:YES completion:^{
[messageVC presentKeyboard:YES];
}];
return YES;
}
@end
================================================
FILE: Examples/Messenger-iPad-Sheet/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Messenger</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
================================================
FILE: Examples/Messenger-iPad-Sheet/main.m
================================================
//
// main.m
// Messenger-Programatic-iPad-Sheet
//
// Created by Bob Spryn on 1/23/15.
// Copyright (c) 2015 Slack Technologies, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
================================================
FILE: Examples/Messenger.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
35A4C7C11DE3FD17F022DC0C /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DDFA9095EABC480682E6396C /* libPods.a */; };
49FEFA70DA01AB47666A8D63 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DDFA9095EABC480682E6396C /* libPods.a */; };
4A8EFBBFAC0F49199AAABF46 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DDFA9095EABC480682E6396C /* libPods.a */; };
4F3256191AA77386008C1DD9 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3256161AA77386008C1DD9 /* AppDelegate.m */; };
4F32561B1AA77386008C1DD9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3256181AA77386008C1DD9 /* main.m */; };
4F32561C1AA77427008C1DD9 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F86BF6C19F011D0007A3D4A /* AppDelegate.m */; };
4F32561D1AA77430008C1DD9 /* MessageTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F7C6BA41A6E208E006E3FAB /* MessageTextView.m */; };
4F32561E1AA77431008C1DD9 /* MessageTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F7C6BA41A6E208E006E3FAB /* MessageTextView.m */; };
4F3EDB4D199ED00F004C15D6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F3EDB4C199ED00F004C15D6 /* Foundation.framework */; };
4F3EDB4F199ED00F004C15D6 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F3EDB4E199ED00F004C15D6 /* CoreGraphics.framework */; };
4F3EDB51199ED00F004C15D6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F3EDB50199ED00F004C15D6 /* UIKit.framework */; };
4F3EDB59199ED00F004C15D6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3EDB58199ED00F004C15D6 /* main.m */; };
4F3EDB5D199ED00F004C15D6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F3EDB5C199ED00F004C15D6 /* AppDelegate.m */; };
4F86BF6A19F011D0007A3D4A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F86BF6919F011D0007A3D4A /* main.m */; };
4F86BF7319F011D0007A3D4A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4F86BF7119F011D0007A3D4A /* Main.storyboard */; };
4F86BF7819F011D0007A3D4A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F86BF7619F011D0007A3D4A /* LaunchScreen.xib */; };
4F86BF9319F01234007A3D4A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4F86BF8E19F01234007A3D4A /* Images.xcassets */; };
4F86BF9419F01234007A3D4A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4F86BF8E19F01234007A3D4A /* Images.xcassets */; };
4F86BF9519F01234007A3D4A /* MessageTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F86BF9019F01234007A3D4A /* MessageTableViewCell.m */; };
4F86BF9619F01234007A3D4A /* MessageTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F86BF9019F01234007A3D4A /* MessageTableViewCell.m */; };
4F86BF9719F01234007A3D4A /* MessageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F86BF9219F01234007A3D4A /* MessageViewController.m */; };
4F86BF9819F01234007A3D4A /* MessageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F86BF9219F01234007A3D4A /* MessageViewController.m */; };
4F86BFC819F050AF007A3D4A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F86BFC719F050AF007A3D4A /* AppDelegate.swift */; };
4F86BFCA19F050AF007A3D4A /* (null) in Sources */ = {isa = PBXBuildFile; };
4F86BFCD19F050AF007A3D4A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4F86BFCB19F050AF007A3D4A /* Main.storyboard */; };
4F86BFD219F050AF007A3D4A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F86BFD019F050AF007A3D4A /* LaunchScreen.xib */; };
4F86BFE519F050DD007A3D4A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4F86BF8E19F01234007A3D4A /* Images.xcassets */; };
4F8ADA771A68C37400023752 /* Message.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8ADA761A68C37400023752 /* Message.m */; };
4F8ADA781A68C37400023752 /* Message.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8ADA761A68C37400023752 /* Message.m */; };
4F8ADA791A68C37400023752 /* Message.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8ADA761A68C37400023752 /* Message.m */; };
4F9DFA7F1AD4EDB900841D98 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F9DFA7D1AD4EDB100841D98 /* ViewController.m */; };
4FF04E591B3F7A04004C3BED /* TypingIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FF04E581B3F7A04004C3BED /* TypingIndicatorView.m */; };
71BE10281A72F3E50083EE32 /* MessageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F86BF9219F01234007A3D4A /* MessageViewController.m */; };
71BE10291A72F3E50083EE32 /* MessageTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F86BF9019F01234007A3D4A /* MessageTableViewCell.m */; };
71BE102B1A72F3E50083EE32 /* Message.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F8ADA761A68C37400023752 /* Message.m */; };
71BE102C1A72F4180083EE32 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F3EDB4E199ED00F004C15D6 /* CoreGraphics.framework */; };
71BE102D1A72F41E0083EE32 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F3EDB50199ED00F004C15D6 /* UIKit.framework */; };
71BE102E1A72F4250083EE32 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F3EDB4C199ED00F004C15D6 /* Foundation.framework */; };
71BE102F1A72F42F0083EE32 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4F86BF8E19F01234007A3D4A /* Images.xcassets */; };
71BE10301A76C4890083EE32 /* MessageTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F7C6BA41A6E208E006E3FAB /* MessageTextView.m */; };
8C6D809F3C95C912F87F0D17 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DDFA9095EABC480682E6396C /* libPods.a */; };
9F4466C31C9A1B6B0001609A /* MessageTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F86BF9019F01234007A3D4A /* MessageTableViewCell.m */; };
9F4466C51C9A1B6B0001609A /* MessageTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F7C6BA41A6E208E006E3FAB /* MessageTextView.m */; };
9F4466C71C9A1B6B0001609A /* TypingIndicatorView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FF04E581B3F7A04004C3BED /* TypingIndicatorView.m */; };
F556AFAE1BA7B41F009898BD /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F556AFAD1BA7B41F009898BD /* QuartzCore.framework */; };
F5CD59211C9FE0EC00DD9A4E /* MessageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5A1CC971C542EB600908ECB /* MessageViewController.swift */; };
F5DE01401B9679C4005E9082 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4F86BF7619F011D0007A3D4A /* LaunchScreen.xib */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
4F1AD51E19E727750027043E /* ___FILEBASENAME___.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "___FILEBASENAME___.h"; sourceTree = "<group>"; };
4F1AD51F19E727750027043E /* ___FILEBASENAME___.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "___FILEBASENAME___.m"; sourceTree = "<group>"; };
4F1AD52119E727750027043E /* ___FILEBASENAME___.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "___FILEBASENAME___.h"; sourceTree = "<group>"; };
4F1AD52219E727750027043E /* ___FILEBASENAME___.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "___FILEBASENAME___.m"; sourceTree = "<group>"; };
4F3256151AA77386008C1DD9 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
4F3256161AA77386008C1DD9 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
4F3256171AA77386008C1DD9 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4F3256181AA77386008C1DD9 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
4F3EDB49199ED00F004C15D6 /* Messenger.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Messenger.app; sourceTree = BUILT_PRODUCTS_DIR; };
4F3EDB4C199ED00F004C15D6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
4F3EDB4E199ED00F004C15D6 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
4F3EDB50199ED00F004C15D6 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
4F3EDB54199ED00F004C15D6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4F3EDB58199ED00F004C15D6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
4F3EDB5B199ED00F004C15D6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
4F3EDB5C199ED00F004C15D6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
4F7C6BA31A6E208E006E3FAB /* MessageTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageTextView.h; sourceTree = "<group>"; };
4F7C6BA41A6E208E006E3FAB /* MessageTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageTextView.m; sourceTree = "<group>"; };
4F86BF6519F011D0007A3D4A /* Messenger-Storyboard.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Messenger-Storyboard.app"; sourceTree = BUILT_PRODUCTS_DIR; };
4F86BF6819F011D0007A3D4A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4F86BF6919F011D0007A3D4A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
4F86BF6B19F011D0007A3D4A /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
4F86BF6C19F011D0007A3D4A /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
4F86BF7219F011D0007A3D4A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
4F86BF7719F011D0007A3D4A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
4F86BF8E19F01234007A3D4A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
4F86BF8F19F01234007A3D4A /* MessageTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageTableViewCell.h; sourceTree = "<group>"; };
4F86BF9019F01234007A3D4A /* MessageTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageTableViewCell.m; sourceTree = "<group>"; };
4F86BF9119F01234007A3D4A /* MessageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageViewController.h; sourceTree = "<group>"; };
4F86BF9219F01234007A3D4A /* MessageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageViewController.m; sourceTree = "<group>"; };
4F86BFC319F050AF007A3D4A /* Messenger-Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Messenger-Swift.app"; sourceTree = BUILT_PRODUCTS_DIR; };
4F86BFC619F050AF007A3D4A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4F86BFC719F050AF007A3D4A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
4F86BFCC19F050AF007A3D4A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
4F86BFD119F050AF007A3D4A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
4F86BFE719F05519007A3D4A /* Bridge-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Bridge-Header.h"; sourceTree = "<group>"; };
4F8ADA751A68C37400023752 /* Message.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Message.h; sourceTree = "<group>"; };
4F8ADA761A68C37400023752 /* Message.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Message.m; sourceTree = "<group>"; };
4F9DFA7C1AD4EDB100841D98 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
4F9DFA7D1AD4EDB100841D98 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
4FF04E571B3F7A04004C3BED /* TypingIndicatorView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypingIndicatorView.h; sourceTree = "<group>"; };
4FF04E581B3F7A04004C3BED /* TypingIndicatorView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TypingIndicatorView.m; sourceTree = "<group>"; };
622BF1F6C9CF013275EF6275 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
71BE10021A72F3130083EE32 /* Messenger-iPad-Sheet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Messenger-iPad-Sheet.app"; sourceTree = BUILT_PRODUCTS_DIR; };
BA45477DD68F2909374B51A4 /* libPods-Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
C905E5DB18A83F74BD092CDD /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
DDFA9095EABC480682E6396C /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
E76FE7634642D0C745F673A5 /* libPods-Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
F556AFAD1BA7B41F009898BD /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
F5A1CC971C542EB600908ECB /* MessageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageViewController.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
4F3EDB46199ED00F004C15D6 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
F556AFAE1BA7B41F009898BD /* QuartzCore.framework in Frameworks */,
4F3EDB4F199ED00F004C15D6 /* CoreGraphics.framework in Frameworks */,
4F3EDB51199ED00F004C15D6 /* UIKit.framework in Frameworks */,
4F3EDB4D199ED00F004C15D6 /* Foundation.framework in Frameworks */,
4A8EFBBFAC0F49199AAABF46 /* libPods.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
4F86BF6219F011D0007A3D4A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8C6D809F3C95C912F87F0D17 /* libPods.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
4F86BFC019F050AF007A3D4A /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
35A4C7C11DE3FD17F022DC0C /* libPods.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
71BE0FFF1A72F3130083EE32 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
71BE102E1A72F4250083EE32 /* Foundation.framework in Frameworks */,
71BE102D1A72F41E0083EE32 /* UIKit.framework in Frameworks */,
71BE102C1A72F4180083EE32 /* CoreGraphics.framework in Frameworks */,
49FEFA70DA01AB47666A8D63 /* libPods.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
4F1AD51C19E727640027043E /* Templates */ = {
isa = PBXGroup;
children = (
4F1AD51D19E727750027043E /* UICollectionView */,
4F1AD52019E727750027043E /* UITableView */,
);
name = Templates;
sourceTree = "<group>";
};
4F1AD51D19E727750027043E /* UICollectionView */ = {
isa = PBXGroup;
children = (
4F1AD51E19E727750027043E /* ___FILEBASENAME___.h */,
4F1AD51F19E727750027043E /* ___FILEBASENAME___.m */,
);
name = UICollectionView;
path = "../../File Templates/SlackTextView Controller.xctemplate/UICollectionView";
sourceTree = "<group>";
};
4F1AD52019E727750027043E /* UITableView */ = {
isa = PBXGroup;
children = (
4F1AD52119E727750027043E /* ___FILEBASENAME___.h */,
4F1AD52219E727750027043E /* ___FILEBASENAME___.m */,
);
name = UITableView;
path = "../../File Templates/SlackTextView Controller.xctemplate/UITableView";
sourceTree = "<group>";
};
4F3256141AA77386008C1DD9 /* iPad Sheet Example */ = {
isa = PBXGroup;
children = (
4F3256151AA77386008C1DD9 /* AppDelegate.h */,
4F3256161AA77386008C1DD9 /* AppDelegate.m */,
4F3256171AA77386008C1DD9 /* Info.plist */,
4F3256181AA77386008C1DD9 /* main.m */,
);
name = "iPad Sheet Example";
path = "Messenger-iPad-Sheet";
sourceTree = "<group>";
};
4F3EDB40199ED00F004C15D6 = {
isa = PBXGroup;
children = (
4F86BF8B19F011E9007A3D4A /* Examples */,
4F1AD51C19E727640027043E /* Templates */,
4F3EDB4B199ED00F004C15D6 /* Frameworks */,
4F3EDB4A199ED00F004C15D6 /* Products */,
68B0EE14916D384C7E703B9B /* Pods */,
);
sourceTree = "<group>";
};
4F3EDB4A199ED00F004C15D6 /* Products */ = {
isa = PBXGroup;
children = (
4F3EDB49199ED00F004C15D6 /* Messenger.app */,
4F86BF6519F011D0007A3D4A /* Messenger-Storyboard.app */,
4F86BFC319F050AF007A3D4A /* Messenger-Swift.app */,
71BE10021A72F3130083EE32 /* Messenger-iPad-Sheet.app */,
);
name = Products;
sourceTree = "<group>";
};
4F3EDB4B199ED00F004C15D6 /* Frameworks */ = {
isa = PBXGroup;
children = (
F556AFAD1BA7B41F009898BD /* QuartzCore.framework */,
4F3EDB4C199ED00F004C15D6 /* Foundation.framework */,
4F3EDB4E199ED00F004C15D6 /* CoreGraphics.framework */,
4F3EDB50199ED00F004C15D6 /* UIKit.framework */,
DDFA9095EABC480682E6396C /* libPods.a */,
BA45477DD68F2909374B51A4 /* libPods-Tests.a */,
E76FE7634642D0C745F673A5 /* libPods-Tests.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
4F3EDB52199ED00F004C15D6 /* Programatic Example */ = {
isa = PBXGroup;
children = (
4F3EDB5B199ED00F004C15D6 /* AppDelegate.h */,
4F3EDB5C199ED00F004C15D6 /* AppDelegate.m */,
4F3EDB53199ED00F004C15D6 /* Supporting Files */,
);
name = "Programatic Example";
path = "Messenger-Programatic";
sourceTree = "<group>";
};
4F3EDB53199ED00F004C15D6 /* Supporting Files */ = {
isa = PBXGroup;
children = (
4F3EDB54199ED00F004C15D6 /* Info.plist */,
4F3EDB58199ED00F004C15D6 /* main.m */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
4F86BF6619F011D0007A3D4A /* Storyboard Example */ = {
isa = PBXGroup;
children = (
4F86BF6B19F011D0007A3D4A /* AppDelegate.h */,
4F86BF6C19F011D0007A3D4A /* AppDelegate.m */,
4F9DFA7C1AD4EDB100841D98 /* ViewController.h */,
4F9DFA7D1AD4EDB100841D98 /* ViewController.m */,
4F86BF7119F011D0007A3D4A /* Main.storyboard */,
4F86BF7619F011D0007A3D4A /* LaunchScreen.xib */,
4F86BF6719F011D0007A3D4A /* Supporting Files */,
);
name = "Storyboard Example";
path = "Messenger-Storyboard";
sourceTree = "<group>";
};
4F86BF6719F011D0007A3D4A /* Supporting Files */ = {
isa = PBXGroup;
children = (
4F86BF6819F011D0007A3D4A /* Info.plist */,
4F86BF6919F011D0007A3D4A /* main.m */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
4F86BF8B19F011E9007A3D4A /* Examples */ = {
isa = PBXGroup;
children = (
4F86BF8D19F01234007A3D4A /* Shared */,
4F3EDB52199ED00F004C15D6 /* Programatic Example */,
4F86BF6619F011D0007A3D4A /* Storyboard Example */,
4F3256141AA77386008C1DD9 /* iPad Sheet Example */,
4F86BFC419F050AF007A3D4A /* Swift Example */,
);
name = Examples;
sourceTree = "<group>";
};
4F86BF8D19F01234007A3D4A /* Shared */ = {
isa = PBXGroup;
children = (
4F86BF9119F01234007A3D4A /* MessageViewController.h */,
4F86BF9219F01234007A3D4A /* MessageViewController.m */,
4F86BF8F19F01234007A3D4A /* MessageTableViewCell.h */,
4F86BF9019F01234007A3D4A /* MessageTableViewCell.m */,
4F7C6BA31A6E208E006E3FAB /* MessageTextView.h */,
4F7C6BA41A6E208E006E3FAB /* MessageTextView.m */,
4FF04E571B3F7A04004C3BED /* TypingIndicatorView.h */,
4FF04E581B3F7A04004C3BED /* TypingIndicatorView.m */,
4F8ADA751A68C37400023752 /* Message.h */,
4F8ADA761A68C37400023752 /* Message.m */,
4F86BF8E19F01234007A3D4A /* Images.xcassets */,
4F86BFE719F05519007A3D4A /* Bridge-Header.h */,
);
name = Shared;
path = "Messenger-Shared";
sourceTree = "<group>";
};
4F86BFC419F050AF007A3D4A /* Swift Example */ = {
isa = PBXGroup;
children = (
4F86BFC719F050AF007A3D4A /* AppDelegate.swift */,
F5A1CC971C542EB600908ECB /* MessageViewController.swift */,
4F86BFCB19F050AF007A3D4A /* Main.storyboard */,
4F86BFD019F050AF007A3D4A /* LaunchScreen.xib */,
4F86BFC519F050AF007A3D4A /* Supporting Files */,
);
name = "Swift Example";
path = "Messenger-Swift";
sourceTree = "<group>";
};
4F86BFC519F050AF007A3D4A /* Supporting Files */ = {
isa = PBXGroup;
children = (
4F86BFC619F050AF007A3D4A /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
68B0EE14916D384C7E703B9B /* Pods */ = {
isa = PBXGroup;
children = (
622BF1F6C9CF013275EF6275 /* Pods.debug.xcconfig */,
C905E5DB18A83F74BD092CDD /* Pods.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
4F3EDB48199ED00F004C15D6 /* Messenger-Programatic */ = {
isa = PBXNativeTarget;
buildConfigurationList = 4F3EDB7E199ED00F004C15D6 /* Build configuration list for PBXNativeTarget "Messenger-Programatic" */;
buildPhases = (
CDD847F204B5437180FB97BB /* Check Pods Manifest.lock */,
4F3EDB45199ED00F004C15D6 /* Sources */,
4F3EDB46199ED00F004C15D6 /* Frameworks */,
4F3EDB47199ED00F004C15D6 /* Resources */,
598FDC5936E74A05A38CC639 /* Copy Pods Resources */,
D8BE09D94DEBD010C0FEBAD1 /* Embed Pods Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = "Messenger-Programatic";
productName = ChatRoom;
productReference = 4F3EDB49199ED00F004C15D6 /* Messenger.app */;
productType = "com.apple.product-type.application";
};
4F86BF6419F011D0007A3D4A /* Messenger-Storyboard */ = {
isa = PBXNativeTarget;
buildConfigurationList = 4F86BF8919F011D0007A3D4A /* Build configuration list for PBXNativeTarget "Messenger-Storyboard" */;
buildPhases = (
A3DCCD9EDC51111004739174 /* Check Pods Manifest.lock */,
4F86BF6119F011D0007A3D4A /* Sources */,
4F86BF6219F011D0007A3D4A /* Frameworks */,
4F86BF6319F011D0007A3D4A /* Resources */,
AC349F540F6112E2363205C8 /* Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Messenger-Storyboard";
productName = "Messenger-Storyboard";
productReference = 4F86BF6519F011D0007A3D4A /* Messenger-Storyboard.app */;
productType = "com.apple.product-type.application";
};
4F86BFC219F050AF007A3D4A /* Messenger-Swift */ = {
isa = PBXNativeTarget;
buildConfigurationList = 4F86BFE319F050AF007A3D4A /* Build configuration list for PBXNativeTarget "Messenger-Swift" */;
buildPhases = (
5EA63F26E6C2C54F5E2EC192 /* Check Pods Manifest.lock */,
4F86BFBF19F050AF007A3D4A /* Sources */,
4F86BFC019F050AF007A3D4A /* Frameworks */,
4F86BFC119F050AF007A3D4A /* Resources */,
EC6E1A5473DEB830A89350DB /* Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Messenger-Swift";
productName = "Messenger-Swift";
productReference = 4F86BFC319F050AF007A3D4A /* Messenger-Swift.app */;
productType = "com.apple.product-type.application";
};
71BE10011A72F3130083EE32 /* Messenger-iPad-Sheet */ = {
isa = PBXNativeTarget;
buildConfigurationList = 71BE10221A72F3130083EE32 /* Build configuration list for PBXNativeTarget "Messenger-iPad-Sheet" */;
buildPhases = (
8D98662D95A755657E54323F /* Check Pods Manifest.lock */,
71BE0FFE1A72F3130083EE32 /* Sources */,
71BE0FFF1A72F3130083EE32 /* Frameworks */,
71BE10001A72F3130083EE32 /* Resources */,
57A4299BBA1384EEA0F08157 /* Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Messenger-iPad-Sheet";
productName = "Messenger-Programatic-iPad-Sheet";
productReference = 71BE10021A72F3130083EE32 /* Messenger-iPad-Sheet.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
4F3EDB41199ED00F004C15D6 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Slack Technologies, Inc.";
TargetAttributes = {
4F3EDB48199ED00F004C15D6 = {
DevelopmentTeam = S6MX3RA9ZM;
};
4F86BF6419F011D0007A3D4A = {
CreatedOnToolsVersion = 6.0.1;
DevelopmentTeam = S6MX3RA9ZM;
};
4F86BFC219F050AF007A3D4A = {
CreatedOnToolsVersion = 6.0.1;
DevelopmentTeam = S6MX3RA9ZM;
LastSwiftMigration = 0800;
};
71BE10011A72F3130083EE32 = {
CreatedOnToolsVersion = 6.1.1;
};
};
};
buildConfigurationList = 4F3EDB44199ED00F004C15D6 /* Build configuration list for PBXProject "Messenger" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 4F3EDB40199ED00F004C15D6;
productRefGroup = 4F3EDB4A199ED00F004C15D6 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
4F3EDB48199ED00F004C15D6 /* Messenger-Programatic */,
4F86BF6419F011D0007A3D4A /* Messenger-Storyboard */,
4F86BFC219F050AF007A3D4A /* Messenger-Swift */,
71BE10011A72F3130083EE32 /* Messenger-iPad-Sheet */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
4F3EDB47199ED00F004C15D6 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F5DE01401B9679C4005E9082 /* LaunchScreen.xib in Resources */,
4F86BF9319F01234007A3D4A /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
4F86BF6319F011D0007A3D4A /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4F86BF7319F011D0007A3D4A /* Main.storyboard in Resources */,
4F86BF9419F01234007A3D4A /* Images.xcassets in Resources */,
4F86BF7819F011D0007A3D4A /* LaunchScreen.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
4F86BFC119F050AF007A3D4A /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4F86BFE519F050DD007A3D4A /* Images.xcassets in Resources */,
4F86BFCD19F050AF007A3D4A /* Main.storyboard in Resources */,
4F86BFD219F050AF007A3D4A /* LaunchScreen.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
71BE10001A72F3130083EE32 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
71BE102F1A72F42F0083EE32 /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
57A4299BBA1384EEA0F08157 /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
showEnvVarsInLog = 0;
};
598FDC5936E74A05A38CC639 /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
showEnvVarsInLog = 0;
};
5EA63F26E6C2C54F5E2EC192 /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
8D98662D95A755657E54323F /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
A3DCCD9EDC51111004739174 /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
AC349F540F6112E2363205C8 /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
showEnvVarsInLog = 0;
};
CDD847F204B5437180FB97BB /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
D8BE09D94DEBD010C0FEBAD1 /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
EC6E1A5473DEB830A89350DB /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
4F3EDB45199ED00F004C15D6 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4F86BF9719F01234007A3D4A /* MessageViewController.m in Sources */,
4F3EDB5D199ED00F004C15D6 /* AppDelegate.m in Sources */,
4F8ADA771A68C37400023752 /* Message.m in Sources */,
4F86BF9519F01234007A3D4A /* MessageTableViewCell.m in Sources */,
4FF04E591B3F7A04004C3BED /* TypingIndicatorView.m in Sources */,
4F3EDB59199ED00F004C15D6 /* main.m in Sources */,
4F32561E1AA77431008C1DD9 /* MessageTextView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
4F86BF6119F011D0007A3D4A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4F9DFA7F1AD4EDB900841D98 /* ViewController.m in Sources */,
71BE10301A76C4890083EE32 /* MessageTextView.m in Sources */,
4F86BF9819F01234007A3D4A /* MessageViewController.m in Sources */,
4F86BF9619F01234007A3D4A /* MessageTableViewCell.m in Sources */,
4F8ADA781A68C37400023752 /* Message.m in Sources */,
4F86BF6A19F011D0007A3D4A /* main.m in Sources */,
4F32561C1AA77427008C1DD9 /* AppDelegate.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
4F86BFBF19F050AF007A3D4A /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9F4466C31C9A1B6B0001609A /* MessageTableViewCell.m in Sources */,
F5CD59211C9FE0EC00DD9A4E /* MessageViewController.swift in Sources */,
9F4466C51C9A1B6B0001609A /* MessageTextView.m in Sources */,
9F4466C71C9A1B6B0001609A /* TypingIndicatorView.m in Sources */,
4F86BFCA19F050AF007A3D4A /* (null) in Sources */,
4F8ADA791A68C37400023752 /* Message.m in Sources */,
4F86BFC819F050AF007A3D4A /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
71BE0FFE1A72F3130083EE32 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
71BE10281A72F3E50083EE32 /* MessageViewController.m in Sources */,
71BE10291A72F3E50083EE32 /* MessageTableViewCell.m in Sources */,
71BE102B1A72F3E50083EE32 /* Message.m in Sources */,
4F32561B1AA77386008C1DD9 /* main.m in Sources */,
4F3256191AA77386008C1DD9 /* AppDelegate.m in Sources */,
4F32561D1AA77430008C1DD9 /* MessageTextView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
4F86BF7119F011D0007A3D4A /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
4F86BF7219F011D0007A3D4A /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
4F86BF7619F011D0007A3D4A /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
4F86BF7719F011D0007A3D4A /* Base */,
);
name = LaunchScreen.xib;
sourceTree = "<group>";
};
4F86BFCB19F050AF007A3D4A /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
4F86BFCC19F050AF007A3D4A /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
4F86BFD019F050AF007A3D4A /* LaunchScreen.xib */ = {
isa = PBXVariantGroup;
children = (
4F86BFD119F050AF007A3D4A /* Base */,
);
name = LaunchScreen.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
4F3EDB7C199ED00F004C15D6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
4F3EDB7D199ED00F004C15D6 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
4F3EDB7F199ED00F004C15D6 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 622BF1F6C9CF013275EF6275 /* Pods.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ENABLE_MODULES = YES;
CLANG_STATIC_ANALYZER_MODE = deep;
CODE_SIGN_IDENTITY = "iPhone Developer";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = "Messenger-Programatic/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.slack.Messenger;
PRODUCT_NAME = Messenger;
PROVISIONING_PROFILE = "";
RUN_CLANG_STATIC_ANALYZER = YES;
SWIFT_OBJC_BRIDGING_HEADER = "Messenger-Swift/Messenger-Programatic-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
4F3EDB80199ED00F004C15D6 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C905E5DB18A83F74BD092CDD /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ENABLE_MODULES = YES;
CLANG_STATIC_ANALYZER_MODE = deep;
CODE_SIGN_IDENTITY = "iPhone Developer";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = "Messenger-Programatic/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.slack.Messenger;
PRODUCT_NAME = Messenger;
PROVISIONING_PROFILE = "";
RUN_CLANG_STATIC_ANALYZER = YES;
SWIFT_OBJC_BRIDGING_HEADER = "Messenger-Swift/Messenger-Programatic-Bridging-Header.h";
WRAPPER_EXTENSION = app;
};
name = Release;
};
4F86BF8519F011D0007A3D4A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 622BF1F6C9CF013275EF6275 /* Pods.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_STATIC_ANALYZER_MODE = deep;
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = "Messenger-Storyboard/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.slack.Messenger;
PRODUCT_NAME = "$(TARGET_NAME)";
RUN_CLANG_STATIC_ANALYZER = YES;
};
name = Debug;
};
4F86BF8619F011D0007A3D4A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C905E5DB18A83F74BD092CDD /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_STATIC_ANALYZER_MODE = deep;
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
ENABLE_STRICT_OBJC_MSGSEND = YES;
INFOPLIST_FILE = "Messenger-Storyboard/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.slack.Messenger;
PRODUCT_NAME = "$(TARGET_NAME)";
RUN_CLANG_STATIC_ANALYZER = YES;
};
name = Release;
};
4F86BFDF19F050AF007A3D4A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 622BF1F6C9CF013275EF6275 /* Pods.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_STATIC_ANALYZER_MODE = deep;
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = "Messenger-Swift/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.slack.Messenger;
PRODUCT_NAME = "$(TARGET_NAME)";
RUN_CLANG_STATIC_ANALYZER = YES;
SWIFT_OBJC_BRIDGING_HEADER = "Messenger-Shared/Bridge-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
4F86BFE019F050AF007A3D4A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C905E5DB18A83F74BD092CDD /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_STATIC_ANALYZER_MODE = deep;
CLANG_WARN_UNREACHABLE_CODE = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
ENABLE_STRICT_OBJC_MSGSEND = YES;
INFOPLIST_FILE = "Messenger-Swift/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.slack.Messenger;
PRODUCT_NAME = "$(TARGET_NAME)";
RUN_CLANG_STATIC_ANALYZER = YES;
SWIFT_OBJC_BRIDGING_HEADER = "Messenger-Shared/Bridge-Header.h";
SWIFT_VERSION = 3.0;
};
name = Release;
};
71BE10231A72F3130083EE32 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 622BF1F6C9CF013275EF6275 /* Pods.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_WARN_UNREACHABLE_CODE = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = "$(SRCROOT)/Messenger-iPad-Sheet/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.slack.Messenger;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 2;
};
name = Debug;
};
71BE10241A72F3130083EE32 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C905E5DB18A83F74BD092CDD /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_WARN_UNREACHABLE_CODE = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
INFOPLIST_FILE = "$(SRCROOT)/Messenger-iPad-Sheet/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.slack.Messenger;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 2;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
4F3EDB44199ED00F004C15D6 /* Build configuration list for PBXProject "Messenger" */ = {
isa = XCConfigurationList;
buildConfigurations = (
4F3EDB7C199ED00F004C15D6 /* Debug */,
4F3EDB7D199ED00F004C15D6 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
4F3EDB7E199ED00F004C15D6 /* Build configuration list for PBXNativeTarget "Messenger-Programatic" */ = {
isa = XCConfigurationList;
buildConfigurations = (
4F3EDB7F199ED00F004C15D6 /* Debug */,
4F3EDB80199ED00F004C15D6 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
4F86BF8919F011D0007A3D4A /* Build configuration list for PBXNativeTarget "Messenger-Storyboard" */ = {
isa = XCConfigurationList;
buildConfigurations = (
4F86BF8519F011D0007A3D4A /* Debug */,
4F86BF8619F011D0007A3D4A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
4F86BFE319F050AF007A3D4A /* Build configuration list for PBXNativeTarget "Messenger-Swift" */ = {
isa = XCConfigurationList;
buildConfigurations = (
4F86BFDF19F050AF007A3D4A /* Debug */,
4F86BFE019F050AF007A3D4A /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
71BE10221A72F3130083EE32 /* Build configuration list for PBXNativeTarget "Messenger-iPad-Sheet" */ = {
isa = XCConfigurationList;
buildConfigurations = (
71BE10231A72F3130083EE32 /* Debug */,
71BE10241A72F3130083EE32 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 4F3EDB41199ED00F004C15D6 /* Project object */;
}
================================================
FILE: Examples/Messenger.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Messenger.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: Examples/Messenger.xcodeproj/project.xcworkspace/xcshareddata/Messenger.xccheckout
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>199D9F17-B5FE-4731-869F-F59274123773</string>
<key>IDESourceControlProjectName</key>
<string>Messenger</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>8E9694F087F70D8D068B66654B1CC8608B5F6B2D</key>
<string>https://github.com/ThumbWorks/SlackTextViewController.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>Examples/Messenger/Messenger.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>8E9694F087F70D8D068B66654B1CC8608B5F6B2D</key>
<string>../../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/ThumbWorks/SlackTextViewController.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>8E9694F087F70D8D068B66654B1CC8608B5F6B2D</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>8E9694F087F70D8D068B66654B1CC8608B5F6B2D</string>
<key>IDESourceControlWCCName</key>
<string>TWSlackTextViewController</string>
</dict>
</array>
</dict>
</plist>
================================================
FILE: Examples/Messenger.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Messenger.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">
</FileRef>
<Group
location = "container:"
name = "Meta">
<FileRef
location = "group:../CHANGELOG.md">
</FileRef>
<FileRef
location = "group:../.github/CODE_OF_CONDUCT.md">
</FileRef>
<FileRef
location = "group:../.github/ISSUE_TEMPLATE.md">
</FileRef>
<FileRef
location = "group:../.github/PULL_REQUEST_TEMPLATE.md">
</FileRef>
<FileRef
location = "group:../Gemfile">
</FileRef>
<FileRef
location = "group:../LICENSE">
</FileRef>
<FileRef
location = "group:../README.md">
</FileRef>
<FileRef
location = "group:../SlackTextViewController.podspec">
</FileRef>
</Group>
</Workspace>
================================================
FILE: Examples/Podfile
================================================
source 'https://github.com/CocoaPods/Specs.git'
workspace 'Messenger.xcworkspace'
platform :ios, '7.0'
def shared_pods
pod 'SlackTextViewController', :path => '../SlackTextViewController.podspec'
pod 'LoremIpsum', '~> 1.0'
end
target 'Messenger-Programatic' do
shared_pods
end
target 'Messenger-Storyboard' do
shared_pods
end
target 'Messenger-Swift' do
shared_pods
end
target 'Messenger-iPad-Sheet' do
shared_pods
end
================================================
FILE: Examples/Pods/Local Podspecs/SlackTextViewController.podspec.json
================================================
{
"name": "SlackTextViewController",
"version": "1.9.1",
"summary": "A drop-in UIViewController subclass with a custom growing text input and other useful messaging features.",
"description": "Meant to be a replacement for UITableViewController & UICollectionViewController. This library is used in Slack's iOS app. It was built to fit our needs, but is flexible enough to be reused by others wanting to build great messaging apps for iOS.",
"homepage": "https://slack.com/",
"screenshots": "https://github.com/slackhq/SlackTextViewController/raw/master/Screenshots/slacktextviewcontroller_demo.gif",
"license": {
"type": "MIT",
"file": "LICENSE"
},
"authors": {
"Slack Technologies, Inc.": "ios-team@slack-corp.com"
},
"source": {
"git": "https://github.com/slackhq/SlackTextViewController.git",
"tag": "v1.9.1"
},
"platforms": {
"ios": "7.0"
},
"requires_arc": true,
"header_mappings_dir": "Source",
"source_files": "Source/**/*.{h,m}"
}
================================================
FILE: Examples/Pods/LoremIpsum/License.markdown
================================================
Copyright (c) 2013 Lukas Kubanek.
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.
================================================
FILE: Examples/Pods/LoremIpsum/LoremIpsum/LoremIpsum.h
================================================
/*
* __ ____
* / / ____ ________ ____ ___ / _/___ _______ ______ ___
* / / / __ \/ ___/ _ \/ __ `__ \ / // __ \/ ___/ / / / __ `__ \
* / /___/ /_/ / / / __/ / / / / / _/ // /_/ (__ ) /_/ / / / / / /
* /_____/\____/_/ \___/_/ /_/ /_/ /___/ .___/____/\__,_/_/ /_/ /_/
* /_/
*
* LoremIpsum.h
* http://github.com/lukaskubanek/LoremIpsum
* 2013-2014 (c) Lukas Kubanek (http://lukaskubanek.com)
*/
#import <Foundation/Foundation.h>
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#elif TARGET_OS_MAC
#import <Cocoa/Cocoa.h>
#endif
typedef NS_ENUM(NSInteger, LIPlaceholderImageService)
{
LIPlaceholderImageServiceLoremPixel,
LIPlaceholderImageServiceHhhhold,
LIPlaceholderImageServiceDummyImage,
LIPlaceholderImageServicePlaceKitten,
LIPlaceholderImageServiceDefault = LIPlaceholderImageServiceLoremPixel
};
@interface LoremIpsum : NSObject
///-------------------------------
/// @name Texts
///-------------------------------
/**
* Generates a random single word.
*/
+ (NSString *)word;
/**
* Generates random words separated by a space character.
*
* @param numberOfWords The number of generated words.
*/
+ (NSString *)wordsWithNumber:(NSInteger)numberOfWords;
/**
* Generates a random sentence.
*/
+ (NSString *)sentence;
/**
* Generates random concatenated sentences.
*
* @param numberOfSentences The number of generated sentences.
*/
+ (NSString *)sentencesWithNumber:(NSInteger)numberOfSentences;
/**
* Generates a random paragraph with multiple sentences.
*/
+ (NSString *)paragraph;
/**
* Generates random paragraphs joined by a new line character.
*
* @param numberOfParagraphs The number of generated paragraphs.
*/
+ (NSString *)paragraphsWithNumber:(NSInteger)numberOfParagraphs;
/**
* Generates a random title.
*/
+ (NSString *)title;
///-------------------------------
/// @name Misc Data
///-------------------------------
/**
* Generates a random name consisting of a first and a last name.
*/
+ (NSString *)name;
/**
* Generates a random first name.
*/
+ (NSString *)firstName;
/**
* Generates a random last name.
*/
+ (NSString *)lastName;
/**
* Generates a random email address.
*/
+ (NSString *)email;
/**
* Generates a random URL address with the HTTP prefix.
*/
+ (NSURL *)URL;
/**
* Generates a sample tweet with 140 characters.
*/
+ (NSString *)tweet;
/**
* Generates a random date and time within the last 4 years.
*/
+ (NSDate *)date;
///-------------------------------
/// @name Images
///-------------------------------
#if TARGET_OS_IPHONE
/**
* Returns an URL for a placeholder image with the given size.
*
* @param size The desired size of the image.
*/
+ (NSURL *)URLForPlaceholderImageWithSize:(CGSize)size;
/**
* Returns an URL for a placeholder image from the given image service and with the given size.
*
* @param service The image service.
* @param size The desired size of the image.
*/
+ (NSURL *)URLForPlaceholderImageFromService:(LIPlaceholderImageService)service
withSize:(CGSize)size;
/**
* Returns a placeholder image with the given size.
*
* @param size The desired size of the image.
*/
+ (UIImage *)placeholderImageWithSize:(CGSize)size;
/**
* Returns a placeholder image from the given image service and with the given size.
*
* @param service The image service.
* @param size The desired size of the image.
*/
+ (UIImage *)placeholderImageFromService:(LIPlaceholderImageService)service
withSize:(CGSize)size;
/**
* Asynchronously loads a placeholder image with the given size and executes the completion block.
*
* @param size The desired size of the image.
* @param completion The completion block which is executed asynchronously after the loading the image.
*/
+ (void)asyncPlaceholderImageWithSize:(CGSize)size
completion:(void (^)(UIImage *image))completion;
/**
* Asynchronously loads a placeholder image from the given image service with the given size
* and executes the completion block.
*
* @param service The image service.
* @param size The desired size of the image.
* @param completion The completion block which is executed asynchronously after the loading the image.
*/
+ (void)asyncPlaceholderImageFromService:(LIPlaceholderImageService)service
withSize:(CGSize)size
completion:(void (^)(UIImage *image))completion;
#elif TARGET_OS_MAC
/**
* Returns an URL for a placeholder image with the given size.
*
* @param size The desired size of the image.
*/
+ (NSURL *)URLForPlaceholderImageWithSize:(NSSize)size;
/**
* Returns an URL for a placeholder image from the given image service and with the given size.
*
* @param service The image service.
* @param size The desired size of the image.
*/
+ (NSURL *)URLForPlaceholderImageFromService:(LIPlaceholderImageService)service
withSize:(NSSize)size;
/**
* Returns a placeholder image with the given size.
*
* @param size The desired size of the image.
*/
+ (NSImage *)placeholderImageWithSize:(NSSize)size;
/**
* Returns a placeholder image from the given image service and with the given size.
*
* @param service The image service.
* @param size The desired size of the image.
*/
+ (NSImage *)placeholderImageFromService:(LIPlaceholderImageService)service
withSize:(NSSize)size;
/**
* Asynchronously loads a placeholder image with the given size and executes the completion block.
*
* @param size The desired size of the image.
* @param completion The completion block which is executed asynchronously after the loading the image.
*/
+ (void)asyncPlaceholderImageWithSize:(NSSize)size
completion:(void (^)(NSImage *image))completion;
/**
* Asynchronously loads a placeholder image from the given image service with the given size
* and executes the completion block.
*
* @param service The image service.
* @param size The desired size of the image.
* @param completion The completion block which is executed asynchronously after the loading the image.
*/
+ (void)asyncPlaceholderImageFromService:(LIPlaceholderImageService)service
withSize:(NSSize)size
completion:(void (^)(NSImage *image))completion;
#endif
@end
================================================
FILE: Examples/Pods/LoremIpsum/LoremIpsum/LoremIpsum.m
================================================
/*
* __ ____
* / / ____ ________ ____ ___ / _/___ _______ ______ ___
* / / / __ \/ ___/ _ \/ __ `__ \ / // __ \/ ___/ / / / __ `__ \
* / /___/ /_/ / / / __/ / / / / / _/ // /_/ (__ ) /_/ / / / / / /
* /_____/\____/_/ \___/_/ /_/ /_/ /___/ .___/____/\__,_/_/ /_/ /_/
* /_/
*
* LoremIpsum.m
* http://github.com/lukaskubanek/LoremIpsum
* 2013-2014 (c) Lukas Kubanek (http://lukaskubanek.com)
*/
#import "LoremIpsum.h"
#if TARGET_OS_IPHONE
typedef UIImage LIImage;
typedef CGSize LISize;
#elif TARGET_OS_MAC
typedef NSImage LIImage;
typedef NSSize LISize;
#endif
NSUInteger const LINumberOfLastYears = 4;
NSUInteger const LIMinNumberOfWordsInSentence = 4;
NSUInteger const LIMaxNumberOfWordsInSentence = 16;
NSUInteger const LIMinNumberOfSentencesInParagraph = 3;
NSUInteger const LIMaxNumberOfSentencesInParagraph = 9;
NSUInteger const LIMinNumberOfWordsInTitle = 2;
NSUInteger const LIMaxNumberOfWordsInTitle = 7;
NSUInteger LIRandomUnsignedInteger(NSUInteger lowerBound, NSUInteger upperBound) {
return arc4random() % (upperBound - lowerBound) + lowerBound;
}
@implementation NSArray (LoremIpsum)
- (id)li_randomObject
{
return [self objectAtIndex:LIRandomUnsignedInteger(0, [self count])];
}
@end
@implementation NSString (LoremIpsum)
- (NSString *)li_stringByCapitalizingFirstLetter
{
NSString *capitalizedFirstLetter = [[self substringToIndex:1] capitalizedString];
return [self stringByReplacingCharactersInRange:NSMakeRange(0, 1)
withString:capitalizedFirstLetter];
}
@end
@implementation LoremIpsum
#pragma mark - Content Database
+ (NSArray *)words
{
static NSArray *words = nil;
if (!words) {
words = [@"alias consequatur aut perferendis sit voluptatem accusantium doloremque aperiam eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo aspernatur aut odit aut fugit sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt neque dolorem ipsum quia dolor sit amet consectetur adipisci velit sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem ut enim ad minima veniam quis nostrum exercitationem ullam corporis nemo enim ipsam voluptatem quia voluptas sit suscipit laboriosam nisi ut aliquid ex ea commodi consequatur quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae et iusto odio dignissimos ducimus qui blanditiis praesentium laudantium totam rem voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident sed ut perspiciatis unde omnis iste natus error similique sunt in culpa qui officia deserunt mollitia animi id est laborum et dolorum fuga et harum quidem rerum facilis est et expedita distinctio nam libero tempore cum soluta nobis est eligendi optio cumque nihil impedit quo porro quisquam est qui minus id quod maxime placeat facere possimus omnis voluptas assumenda est omnis dolor repellendus temporibus autem quibusdam et aut consequatur vel illum qui dolorem eum fugiat quo voluptas nulla pariatur at vero eos et accusamus officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae itaque earum rerum hic tenetur a sapiente delectus ut aut reiciendis voluptatibus maiores doloribus asperiores repellat" componentsSeparatedByString:@" "];
}
return words;
}
+ (NSArray *)firstNames
{
static NSArray *firstNames = nil;
if (!firstNames) {
firstNames = [@"Judith Angelo Margarita Kerry Elaine Lorenzo Justice Doris Raul Liliana Kerry Elise Ciaran Johnny Moses Davion Penny Mohammed Harvey Sheryl Hudson Brendan Brooklynn Denis Sadie Trisha Jacquelyn Virgil Cindy Alexa Marianne Giselle Casey Alondra Angela Katherine Skyler Kyleigh Carly Abel Adrianna Luis Dominick Eoin Noel Ciara Roberto Skylar Brock Earl Dwayne Jackie Hamish Sienna Nolan Daren Jean Shirley Connor Geraldine Niall Kristi Monty Yvonne Tammie Zachariah Fatima Ruby Nadia Anahi Calum Peggy Alfredo Marybeth Bonnie Gordon Cara John Staci Samuel Carmen Rylee Yehudi Colm Beth Dulce Darius inley Javon Jason Perla Wayne Laila Kaleigh Maggie Don Quinn Collin Aniya Zoe Isabel Clint Leland Esmeralda Emma Madeline Byron Courtney Vanessa Terry Antoinette George Constance Preston Rolando Caleb Kenneth Lynette Carley Francesca Johnnie Jordyn Arturo Camila Skye Guy Ana Kaylin Nia Colton Bart Brendon Alvin Daryl Dirk Mya Pete Joann Uriel Alonzo Agnes Chris Alyson Paola Dora Elias Allen Jackie Eric Bonita Kelvin Emiliano Ashton Kyra Kailey Sonja Alberto Ty Summer Brayden Lori Kelly Tomas Joey Billie Katie Stephanie Danielle Alexis Jamal Kieran Lucinda Eliza Allyson Melinda Alma Piper Deana Harriet Bryce Eli Jadyn Rogelio Orlaith Janet Randal Toby Carla Lorie Caitlyn Annika Isabelle inn Ewan Maisie Michelle Grady Ida Reid Emely Tricia Beau Reese Vance Dalton Lexi Rafael Makenzie Mitzi Clinton Xena Angelina Kendrick Leslie Teddy Jerald Noelle Neil Marsha Gayle Omar Abigail Alexandra Phil Andre Billy Brenden Bianca Jared Gretchen Patrick Antonio Josephine Kyla Manuel Freya Kellie Tonia Jamie Sydney Andres Ruben Harrison Hector Clyde Wendell Kaden Ian Tracy Cathleen Shawn" componentsSeparatedByString:@" "];
}
return firstNames;
}
+ (NSArray *)lastNames
{
static NSArray *lastNames = nil;
if (!lastNames) {
lastNames = [@"Chung Chen Melton Hill Puckett Song Hamilton Bender Wagner McLaughlin McNamara Raynor Moon Woodard Desai Wallace Lawrence Griffin Dougherty Powers May Steele Teague Vick Gallagher Solomon Walsh Monroe Connolly Hawkins Middleton Goldstein Watts Johnston Weeks Wilkerson Barton Walton Hall Ross Chung Bender Woods Mangum Joseph Rosenthal Bowden Barton Underwood Jones Baker Merritt Cross Cooper Holmes Sharpe Morgan Hoyle Allen Rich Rich Grant Proctor Diaz Graham Watkins Hinton Marsh Hewitt Branch Walton O'Brien Case Watts Christensen Parks Hardin Lucas Eason Davidson Whitehead Rose Sparks Moore Pearson Rodgers Graves Scarborough Sutton Sinclair Bowman Olsen Love McLean Christian Lamb James Chandler Stout Cowan Golden Bowling Beasley Clapp Abrams Tilley Morse Boykin Sumner Cassidy Davidson Heath Blanchard McAllister McKenzie Byrne Schroeder Griffin Gross Perkins Robertson Palmer Brady Rowe Zhang Hodge Li Bowling Justice Glass Willis Hester Floyd Graves Fischer Norman Chan Hunt Byrd Lane Kaplan Heller May Jennings Hanna Locklear Holloway Jones Glover Vick O'Donnell Goldman McKenna Starr Stone McClure Watson Monroe Abbott Singer Hall Farrell Lucas Norman Atkins Monroe Robertson Sykes Reid Chandler Finch Hobbs Adkins Kinney Whitaker Alexander Conner Waters Becker Rollins Love Adkins Black Fox Hatcher Wu Lloyd Joyce Welch Matthews Chappell MacDonald Kane Butler Pickett Bowman Barton Kennedy Branch Thornton McNeill Weinstein Middleton Moss Lucas Rich Carlton Brady Schultz Nichols Harvey Stevenson Houston Dunn West O'Brien Barr Snyder Cain Heath Boswell Olsen Pittman Weiner Petersen Davis Coleman Terrell Norman Burch Weiner Parrott Henry Gray Chang McLean Eason Weeks Siegel Puckett Heath Hoyle Garrett Neal Baker Goldman Shaffer Choi Carver" componentsSeparatedByString:@" "];
}
return lastNames;
}
+ (NSArray *)emailDomains
{
static NSArray *emailDomains = nil;
if (!emailDomains) {
emailDomains = [@"gmail.com yahoo.com hotmail.com email.com live.com me.com mac.com aol.com fastmail.com mail.com" componentsSeparatedByString:@" "];
}
return emailDomains;
}
+ (NSArray *)domains
{
static NSArray *domains = nil;
if (!domains) {
domains = [@"twitter.com google.com youtube.com wordpress.org adobe.com blogspot.com godaddy.com wikipedia.org wordpress.com yahoo.com linkedin.com amazon.com flickr.com w3.org apple.com myspace.com tumblr.com digg.com microsoft.com vimeo.com pinterest.com qq.com stumbleupon.com youtu.be addthis.com miibeian.gov.cn delicious.com baidu.com feedburner.com bit.ly" componentsSeparatedByString:@" "];
}
return domains;
}
#pragma mark - Texts
+ (NSString *)word
{
return [self wordsWithNumber:1];
}
+ (NSString *)wordsWithNumber:(NSInteger)numberOfWords
{
NSAssert(numberOfWords > 0, @"The number of words has to be greater than zero.");
NSMutableArray *words = [NSMutableArray arrayWithCapacity:(NSUInteger)numberOfWords];
for (NSInteger i = 0; i < numberOfWords; i++) {
[words addObject:[[self words] li_randomObject]];
}
return [words componentsJoinedByString:@" "];
}
+ (NSString *)sentence
{
return [self sentencesWithNumber:1];
}
+ (NSString *)sentencesWithNumber:(NSInteger)numberOfSentences
{
NSAssert(numberOfSentences > 0, @"The number of sentences has to be greater than zero.");
NSMutableArray *sentences = [NSMutableArray arrayWithCapacity:(NSUInteger)numberOfSentences];
for (NSInteger i = 0; i < numberOfSentences; i++) {
NSInteger numberOfWords = LIRandomUnsignedInteger(LIMinNumberOfWordsInSentence, LIMaxNumberOfWordsInSentence);
NSString *sentence = [[self wordsWithNumber:numberOfWords] li_stringByCapitalizingFirstLetter];
[sentences addObject:sentence];
}
return [[sentences componentsJoinedByString:@". "] stringByAppendingString:@"."];
}
+ (NSString *)paragraph
{
return [self paragraphsWithNumber:1];
}
+ (NSString *)paragraphsWithNumber:(NSInteger)numberOfParagraphs
{
NSAssert(numberOfParagraphs > 0, @"The number of paragraphs has to be greater than zero.");
NSMutableArray *paragraphs = [NSMuta
gitextract_cu9877x5/
├── .github/
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── ISSUE_TEMPLATE.md
│ └── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .travis.yml
├── .xctool-args
├── CHANGELOG.md
├── Examples/
│ ├── Messenger-Programatic/
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Info.plist
│ │ └── main.m
│ ├── Messenger-Shared/
│ │ ├── Bridge-Header.h
│ │ ├── Images.xcassets/
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ ├── Icons/
│ │ │ │ ├── Contents.json
│ │ │ │ ├── icn_append.imageset/
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── icn_arrow_down.imageset/
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── icn_arrow_up.imageset/
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── icn_editing.imageset/
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── icn_pic.imageset/
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── icn_typing.imageset/
│ │ │ │ │ └── Contents.json
│ │ │ │ └── icn_upload.imageset/
│ │ │ │ └── Contents.json
│ │ │ └── LaunchImage.launchimage/
│ │ │ └── Contents.json
│ │ ├── Message.h
│ │ ├── Message.m
│ │ ├── MessageTableViewCell.h
│ │ ├── MessageTableViewCell.m
│ │ ├── MessageTextView.h
│ │ ├── MessageTextView.m
│ │ ├── MessageViewController.h
│ │ ├── MessageViewController.m
│ │ ├── TypingIndicatorView.h
│ │ └── TypingIndicatorView.m
│ ├── Messenger-Storyboard/
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Base.lproj/
│ │ │ ├── LaunchScreen.xib
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ ├── ViewController.h
│ │ ├── ViewController.m
│ │ └── main.m
│ ├── Messenger-Swift/
│ │ ├── AppDelegate.swift
│ │ ├── Base.lproj/
│ │ │ ├── LaunchScreen.xib
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── MessageViewController.swift
│ ├── Messenger-iPad-Sheet/
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Info.plist
│ │ └── main.m
│ ├── Messenger.xcodeproj/
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace/
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata/
│ │ └── Messenger.xccheckout
│ ├── Messenger.xcworkspace/
│ │ └── contents.xcworkspacedata
│ ├── Podfile
│ └── Pods/
│ ├── Local Podspecs/
│ │ └── SlackTextViewController.podspec.json
│ ├── LoremIpsum/
│ │ ├── License.markdown
│ │ ├── LoremIpsum/
│ │ │ ├── LoremIpsum.h
│ │ │ └── LoremIpsum.m
│ │ └── Readme.markdown
│ ├── Pods.xcodeproj/
│ │ └── project.pbxproj
│ └── Target Support Files/
│ ├── LoremIpsum/
│ │ ├── LoremIpsum-dummy.m
│ │ ├── LoremIpsum-prefix.pch
│ │ └── LoremIpsum.xcconfig
│ ├── Pods/
│ │ ├── Pods-acknowledgements.markdown
│ │ ├── Pods-acknowledgements.plist
│ │ ├── Pods-dummy.m
│ │ ├── Pods-frameworks.sh
│ │ ├── Pods-resources.sh
│ │ ├── Pods.debug.xcconfig
│ │ └── Pods.release.xcconfig
│ └── SlackTextViewController/
│ ├── SlackTextViewController-dummy.m
│ ├── SlackTextViewController-prefix.pch
│ └── SlackTextViewController.xcconfig
├── File Templates/
│ ├── SlackTextView Controller.xctemplate/
│ │ ├── TemplateInfo.plist
│ │ ├── UICollectionView/
│ │ │ ├── ___FILEBASENAME___.h
│ │ │ └── ___FILEBASENAME___.m
│ │ └── UITableView/
│ │ ├── ___FILEBASENAME___.h
│ │ └── ___FILEBASENAME___.m
│ └── install.sh
├── Gemfile
├── LICENSE
├── README.md
├── SlackTextViewController/
│ ├── SlackTextViewController/
│ │ ├── Info.plist
│ │ └── SlackTextViewController.h
│ ├── SlackTextViewController.xcodeproj/
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace/
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata/
│ │ ├── xcbaselines/
│ │ │ └── F5B4E78D1C4DA053005CBBE0.xcbaseline/
│ │ │ ├── F8445E9E-5B76-4616-90F9-7D94D0E1142F.plist
│ │ │ └── Info.plist
│ │ └── xcschemes/
│ │ ├── SlackTextViewController.xcscheme
│ │ └── SlackTextViewControllerTests.xcscheme
│ └── SlackTextViewControllerTests/
│ ├── FrameworkTests.m
│ └── Info.plist
├── SlackTextViewController.podspec
└── Source/
├── SLKInputAccessoryView.h
├── SLKInputAccessoryView.m
├── SLKTextInput+Implementation.m
├── SLKTextInput.h
├── SLKTextInputbar.h
├── SLKTextInputbar.m
├── SLKTextView+SLKAdditions.h
├── SLKTextView+SLKAdditions.m
├── SLKTextView.h
├── SLKTextView.m
├── SLKTextViewController.h
├── SLKTextViewController.m
├── SLKTypingIndicatorProtocol.h
├── SLKTypingIndicatorView.h
├── SLKTypingIndicatorView.m
├── SLKUIConstants.h
├── UIResponder+SLKAdditions.h
├── UIResponder+SLKAdditions.m
├── UIScrollView+SLKAdditions.h
├── UIScrollView+SLKAdditions.m
├── UIView+SLKAdditions.h
└── UIView+SLKAdditions.m
SYMBOL INDEX (7 symbols across 4 files)
FILE: Examples/Pods/LoremIpsum/LoremIpsum/LoremIpsum.h
type LIPlaceholderImageServiceLoremPixel (line 22) | typedef NS_ENUM(NSInteger, LIPlaceholderImageService)
FILE: Source/SLKTextInputbar.h
type SLKCounterStyleNone (line 14) | typedef NS_ENUM(NSUInteger, SLKCounterStyle) {
type SLKCounterPositionTop (line 21) | typedef NS_ENUM(NSUInteger, SLKCounterPosition) {
FILE: Source/SLKTextViewController.h
type SLKKeyboardStatusDidHide (line 40) | typedef NS_ENUM(NSUInteger, SLKKeyboardStatus) {
FILE: Source/SLKUIConstants.h
function __unused (line 29) | __unused static CGFloat SLKPointSizeDifferenceForCategory(NSString *cate...
function __unused (line 46) | __unused static CGRect SLKKeyWindowBounds()
function __unused (line 51) | __unused static CGRect SLKRectInvert(CGRect rect)
Condensed preview — 117 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (600K chars).
[
{
"path": ".github/CODE_OF_CONDUCT.md",
"chars": 2587,
"preview": "# Slack open source code of conduct\n\n\n## Introduction\nDiversity and inclusion make our community strong. We encourage pa"
},
{
"path": ".github/CONTRIBUTING.md",
"chars": 2392,
"preview": "# Contributing at Slack\n\n\n\n## Before Contributing\n\nBefore contributing, pl"
},
{
"path": ".github/ISSUE_TEMPLATE.md",
"chars": 848,
"preview": "* [ ] I've read and understood the [Contributing guidelines](https://github.com/slackhq/SlackTextViewController/blob/mas"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 1122,
"preview": "* [ ] I've read and understood the [Contributing guidelines](https://github.com/slackhq/SlackTextViewController/blob/mas"
},
{
"path": ".gitignore",
"chars": 335,
"preview": "# Xcode\n.DS_Store\n*/build/*\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspecti"
},
{
"path": ".travis.yml",
"chars": 450,
"preview": "osx_image: xcode7\nlanguage: objective-c\n\ncache:\n\t- bundler\n\t- cocoapods\n\nbefore_install:\n\t- bundle install\n\t- cd SlackTe"
},
{
"path": ".xctool-args",
"chars": 213,
"preview": "[\n \"-workspace\", \"SlackTextViewController/SlackTextViewController.xcworkspace\",\n \"-scheme\", \"SnapshotTests\",\n \"-sdk\","
},
{
"path": "CHANGELOG.md",
"chars": 12509,
"preview": "# Change Log\n\n## [Version 1.9.7](https://github.com/slackhq/SlackTextViewController/releases/tag/v1.9.7)\n\n#### Features:"
},
{
"path": "Examples/Messenger-Programatic/AppDelegate.h",
"chars": 317,
"preview": "//\n// AppDelegate.h\n// Messenger-Programatic\n//\n// Created by Ignacio Romero Zurbuchen on 8/15/14.\n// Copyright (c) "
},
{
"path": "Examples/Messenger-Programatic/AppDelegate.m",
"chars": 757,
"preview": "//\n// AppDelegate.m\n// Messenger-Programatic\n//\n// Created by Ignacio Romero Zurbuchen on 8/15/14.\n// Copyright (c) "
},
{
"path": "Examples/Messenger-Programatic/Info.plist",
"chars": 1722,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Examples/Messenger-Programatic/main.m",
"chars": 375,
"preview": "//\n// main.m\n// Messenger-Programatic\n//\n// Created by Ignacio Romero Zurbuchen on 8/15/14.\n// Copyright (c) 2014 Sl"
},
{
"path": "Examples/Messenger-Shared/Bridge-Header.h",
"chars": 286,
"preview": "//\n// Use this file to import your target's public headers that you would like to expose to Swift.\n//\n\n#import <SLKText"
},
{
"path": "Examples/Messenger-Shared/Images.xcassets/AppIcon.appiconset/Contents.json",
"chars": 2038,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"20x20\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\""
},
{
"path": "Examples/Messenger-Shared/Images.xcassets/Contents.json",
"chars": 62,
"preview": "{\n \"info\" : {\n \"version\" : 1,\n \"author\" : \"xcode\"\n }\n}"
},
{
"path": "Examples/Messenger-Shared/Images.xcassets/Icons/Contents.json",
"chars": 62,
"preview": "{\n \"info\" : {\n \"version\" : 1,\n \"author\" : \"xcode\"\n }\n}"
},
{
"path": "Examples/Messenger-Shared/Images.xcassets/Icons/icn_append.imageset/Contents.json",
"chars": 228,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"icn_append.pdf\"\n }\n ],\n \"info\" : {\n \"ver"
},
{
"path": "Examples/Messenger-Shared/Images.xcassets/Icons/icn_arrow_down.imageset/Contents.json",
"chars": 311,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"icn_arrow_down.pdf\",\n \"scale\" : \"1x\"\n },"
},
{
"path": "Examples/Messenger-Shared/Images.xcassets/Icons/icn_arrow_up.imageset/Contents.json",
"chars": 309,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"icn_arrow_up.pdf\",\n \"scale\" : \"1x\"\n },\n "
},
{
"path": "Examples/Messenger-Shared/Images.xcassets/Icons/icn_editing.imageset/Contents.json",
"chars": 229,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"icn_editing.pdf\"\n }\n ],\n \"info\" : {\n \"ve"
},
{
"path": "Examples/Messenger-Shared/Images.xcassets/Icons/icn_pic.imageset/Contents.json",
"chars": 225,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"icn_pic.pdf\"\n }\n ],\n \"info\" : {\n \"versio"
},
{
"path": "Examples/Messenger-Shared/Images.xcassets/Icons/icn_typing.imageset/Contents.json",
"chars": 228,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"icn_typing.pdf\"\n }\n ],\n \"info\" : {\n \"ver"
},
{
"path": "Examples/Messenger-Shared/Images.xcassets/Icons/icn_upload.imageset/Contents.json",
"chars": 228,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"icn_upload.pdf\"\n }\n ],\n \"info\" : {\n \"ver"
},
{
"path": "Examples/Messenger-Shared/Images.xcassets/LaunchImage.launchimage/Contents.json",
"chars": 1895,
"preview": "{\n \"images\" : [\n {\n \"extent\" : \"full-screen\",\n \"idiom\" : \"iphone\",\n \"subtype\" : \"736h\",\n \"filena"
},
{
"path": "Examples/Messenger-Shared/Message.h",
"chars": 344,
"preview": "//\n// Message.h\n// Messenger\n//\n// Created by Ignacio Romero Z. on 1/16/15.\n// Copyright (c) 2015 Slack Technologies"
},
{
"path": "Examples/Messenger-Shared/Message.m",
"chars": 203,
"preview": "//\n// Message.m\n// Messenger\n//\n// Created by Ignacio Romero Z. on 1/16/15.\n// Copyright (c) 2015 Slack Technologies"
},
{
"path": "Examples/Messenger-Shared/MessageTableViewCell.h",
"chars": 789,
"preview": "//\n// MessageTableViewCell.h\n// Messenger\n//\n// Created by Ignacio Romero Zurbuchen on 9/1/14.\n// Copyright (c) 2014"
},
{
"path": "Examples/Messenger-Shared/MessageTableViewCell.m",
"chars": 4462,
"preview": "//\n// MessageTableViewCell.m\n// Messenger\n//\n// Created by Ignacio Romero Zurbuchen on 9/1/14.\n// Copyright (c) 2014"
},
{
"path": "Examples/Messenger-Shared/MessageTextView.h",
"chars": 232,
"preview": "//\n// MessageTextView.h\n// Messenger\n//\n// Created by Ignacio Romero Z. on 1/20/15.\n// Copyright (c) 2015 Slack Tech"
},
{
"path": "Examples/Messenger-Shared/MessageTextView.m",
"chars": 783,
"preview": "//\n// MessageTextView.m\n// Messenger\n//\n// Created by Ignacio Romero Z. on 1/20/15.\n// Copyright (c) 2015 Slack Tech"
},
{
"path": "Examples/Messenger-Shared/MessageViewController.h",
"chars": 271,
"preview": "//\n// MessageViewController.h\n// Messenger\n//\n// Created by Ignacio Romero Zurbuchen on 8/15/14.\n// Copyright (c) 20"
},
{
"path": "Examples/Messenger-Shared/MessageViewController.m",
"chars": 27112,
"preview": "//\n// MessageViewController.m\n// Messenger\n//\n// Created by Ignacio Romero Zurbuchen on 8/15/14.\n// Copyright (c) 20"
},
{
"path": "Examples/Messenger-Shared/TypingIndicatorView.h",
"chars": 518,
"preview": "//\n// TypingIndicatorView.h\n// Messenger\n//\n// Created by Ignacio Romero Z. on 6/27/15.\n// Copyright (c) 2015 Slack "
},
{
"path": "Examples/Messenger-Shared/TypingIndicatorView.m",
"chars": 4834,
"preview": "//\n// TypingIndicatorView.m\n// Messenger\n//\n// Created by Ignacio Romero Z. on 6/27/15.\n// Copyright (c) 2015 Slack "
},
{
"path": "Examples/Messenger-Storyboard/AppDelegate.h",
"chars": 317,
"preview": "//\n// AppDelegate.h\n// Messenger-Storyboard\n//\n// Created by Ignacio Romero Zurbuchen on 10/16/14.\n// Copyright (c) "
},
{
"path": "Examples/Messenger-Storyboard/AppDelegate.m",
"chars": 425,
"preview": "//\n// AppDelegate.m\n// Messenger-Storyboard\n//\n// Created by Ignacio Romero Zurbuchen on 10/16/14.\n// Copyright (c) "
},
{
"path": "Examples/Messenger-Storyboard/Base.lproj/LaunchScreen.xib",
"chars": 1244,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "Examples/Messenger-Storyboard/Base.lproj/Main.storyboard",
"chars": 7112,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "Examples/Messenger-Storyboard/Info.plist",
"chars": 1718,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Examples/Messenger-Storyboard/ViewController.h",
"chars": 272,
"preview": "//\n// ViewController.h\n// Messenger\n//\n// Created by Ignacio Romero Z. on 4/8/15.\n// Copyright (c) 2015 Slack Techno"
},
{
"path": "Examples/Messenger-Storyboard/ViewController.m",
"chars": 334,
"preview": "//\n// ViewController.m\n// Messenger\n//\n// Created by Ignacio Romero Z. on 4/8/15.\n// Copyright (c) 2015 Slack Techno"
},
{
"path": "Examples/Messenger-Storyboard/main.m",
"chars": 367,
"preview": "//\n// main.m\n// Messenger-Storyboard\n//\n// Created by Ignacio Romero Z. on 10/16/14.\n// Copyright (c) 2014 Slack Tec"
},
{
"path": "Examples/Messenger-Swift/AppDelegate.swift",
"chars": 508,
"preview": "//\n// AppDelegate.swift\n// Messenger\n//\n// Created by Ignacio Romero Zurbuchen on 10/16/14.\n// Copyright (c) 2014 Sl"
},
{
"path": "Examples/Messenger-Swift/Base.lproj/LaunchScreen.xib",
"chars": 1244,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "Examples/Messenger-Swift/Base.lproj/Main.storyboard",
"chars": 4174,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "Examples/Messenger-Swift/Info.plist",
"chars": 1655,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Examples/Messenger-Swift/MessageViewController.swift",
"chars": 27110,
"preview": "//\n// MessageViewController.swift\n// Messenger\n//\n// Created by Ignacio Romero Zurbuchen on 10/16/14.\n// Copyright ("
},
{
"path": "Examples/Messenger-iPad-Sheet/AppDelegate.h",
"chars": 313,
"preview": "//\n// AppDelegate.h\n// Messenger-Programatic-iPad-Sheet\n//\n// Created by Bob Spryn on 1/23/15.\n// Copyright (c) 2015"
},
{
"path": "Examples/Messenger-iPad-Sheet/AppDelegate.m",
"chars": 1135,
"preview": "//\n// AppDelegate.m\n// Messenger-Programatic-iPad-Sheet\n//\n// Created by Bob Spryn on 1/23/15.\n// Copyright (c) 2015"
},
{
"path": "Examples/Messenger-iPad-Sheet/Info.plist",
"chars": 1599,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Examples/Messenger-iPad-Sheet/main.m",
"chars": 370,
"preview": "//\n// main.m\n// Messenger-Programatic-iPad-Sheet\n//\n// Created by Bob Spryn on 1/23/15.\n// Copyright (c) 2015 Slack "
},
{
"path": "Examples/Messenger.xcodeproj/project.pbxproj",
"chars": 50029,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "Examples/Messenger.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 154,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:Messenger.xcode"
},
{
"path": "Examples/Messenger.xcodeproj/project.xcworkspace/xcshareddata/Messenger.xccheckout",
"chars": 1559,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Examples/Messenger.xcworkspace/contents.xcworkspacedata",
"chars": 969,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"group:Messenger.xcod"
},
{
"path": "Examples/Podfile",
"chars": 451,
"preview": "source 'https://github.com/CocoaPods/Specs.git'\n\nworkspace 'Messenger.xcworkspace'\nplatform :ios, '7.0'\n\ndef shared_pods"
},
{
"path": "Examples/Pods/Local Podspecs/SlackTextViewController.podspec.json",
"chars": 998,
"preview": "{\n \"name\": \"SlackTextViewController\",\n \"version\": \"1.9.1\",\n \"summary\": \"A drop-in UIViewController subclass with a cu"
},
{
"path": "Examples/Pods/LoremIpsum/License.markdown",
"chars": 1057,
"preview": "Copyright (c) 2013 Lukas Kubanek.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this "
},
{
"path": "Examples/Pods/LoremIpsum/LoremIpsum/LoremIpsum.h",
"chars": 6579,
"preview": "/*\n * __ ____\n * / / ____ ________ ____ ___ / _/___ _______ ____"
},
{
"path": "Examples/Pods/LoremIpsum/LoremIpsum/LoremIpsum.m",
"chars": 15769,
"preview": "/*\n * __ ____\n * / / ____ ________ ____ ___ / _/___ _______ ____"
},
{
"path": "Examples/Pods/LoremIpsum/Readme.markdown",
"chars": 4804,
"preview": "# Lorem Ipsum\n\n*Lorem Ipsum* is a simple lorem ipsum generator for iOS and OS X apps. It supports generating text in dif"
},
{
"path": "Examples/Pods/Pods.xcodeproj/project.pbxproj",
"chars": 37330,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "Examples/Pods/Target Support Files/LoremIpsum/LoremIpsum-dummy.m",
"chars": 124,
"preview": "#import <Foundation/Foundation.h>\n@interface PodsDummy_LoremIpsum : NSObject\n@end\n@implementation PodsDummy_LoremIpsum\n@"
},
{
"path": "Examples/Pods/Target Support Files/LoremIpsum/LoremIpsum-prefix.pch",
"chars": 48,
"preview": "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#endif\n\n"
},
{
"path": "Examples/Pods/Target Support Files/LoremIpsum/LoremIpsum.xcconfig",
"chars": 317,
"preview": "GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = \"${PODS_ROOT}/Headers/Private\" \"${PODS_ROO"
},
{
"path": "Examples/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown",
"chars": 2298,
"preview": "# Acknowledgements\nThis application makes use of the following third party libraries:\n\n## LoremIpsum\n\nCopyright (c) 2013"
},
{
"path": "Examples/Pods/Target Support Files/Pods/Pods-acknowledgements.plist",
"chars": 3280,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "Examples/Pods/Target Support Files/Pods/Pods-dummy.m",
"chars": 112,
"preview": "#import <Foundation/Foundation.h>\n@interface PodsDummy_Pods : NSObject\n@end\n@implementation PodsDummy_Pods\n@end\n"
},
{
"path": "Examples/Pods/Target Support Files/Pods/Pods-frameworks.sh",
"chars": 3331,
"preview": "#!/bin/sh\nset -e\n\necho \"mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\nmkdir -p \"${CONFIGURATION_BUILD_D"
},
{
"path": "Examples/Pods/Target Support Files/Pods/Pods-resources.sh",
"chars": 4622,
"preview": "#!/bin/sh\nset -e\n\nmkdir -p \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\n\nRESOURCES_TO_COPY=${PODS_R"
},
{
"path": "Examples/Pods/Target Support Files/Pods/Pods.debug.xcconfig",
"chars": 501,
"preview": "GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = $(inherited) \"${PODS_ROOT}/Headers/Public\""
},
{
"path": "Examples/Pods/Target Support Files/Pods/Pods.release.xcconfig",
"chars": 501,
"preview": "GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = $(inherited) \"${PODS_ROOT}/Headers/Public\""
},
{
"path": "Examples/Pods/Target Support Files/SlackTextViewController/SlackTextViewController-dummy.m",
"chars": 150,
"preview": "#import <Foundation/Foundation.h>\n@interface PodsDummy_SlackTextViewController : NSObject\n@end\n@implementation PodsDummy"
},
{
"path": "Examples/Pods/Target Support Files/SlackTextViewController/SlackTextViewController-prefix.pch",
"chars": 48,
"preview": "#ifdef __OBJC__\n#import <UIKit/UIKit.h>\n#endif\n\n"
},
{
"path": "Examples/Pods/Target Support Files/SlackTextViewController/SlackTextViewController.xcconfig",
"chars": 330,
"preview": "GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1\nHEADER_SEARCH_PATHS = \"${PODS_ROOT}/Headers/Private\" \"${PODS_ROO"
},
{
"path": "File Templates/SlackTextView Controller.xctemplate/TemplateInfo.plist",
"chars": 2024,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "File Templates/SlackTextView Controller.xctemplate/UICollectionView/___FILEBASENAME___.h",
"chars": 225,
"preview": "//\n// ___FILENAME___\n// ___PROJECTNAME___\n//\n// Created by ___FULLUSERNAME___ on ___DATE___.\n//___COPYRIGHT___\n//\n\n#i"
},
{
"path": "File Templates/SlackTextView Controller.xctemplate/UICollectionView/___FILEBASENAME___.m",
"chars": 6896,
"preview": "//\n// ___FILENAME___\n// ___PROJECTNAME___\n//\n// Created by ___FULLUSERNAME___ on ___DATE___.\n//___COPYRIGHT___\n//\n\n#i"
},
{
"path": "File Templates/SlackTextView Controller.xctemplate/UITableView/___FILEBASENAME___.h",
"chars": 225,
"preview": "//\n// ___FILENAME___\n// ___PROJECTNAME___\n//\n// Created by ___FULLUSERNAME___ on ___DATE___.\n//___COPYRIGHT___\n//\n\n#i"
},
{
"path": "File Templates/SlackTextView Controller.xctemplate/UITableView/___FILEBASENAME___.m",
"chars": 5157,
"preview": "//\n// ___FILENAME___\n// ___PROJECTNAME___\n//\n// Created by ___FULLUSERNAME___ on ___DATE___.\n//___COPYRIGHT___\n//\n\n#i"
},
{
"path": "File Templates/install.sh",
"chars": 673,
"preview": "#!/usr/bin/env bash\n\n# Default the folder name\nfolderName=\"Slack Templates\"\n\n# Determine the source directory.\nsourceDir"
},
{
"path": "Gemfile",
"chars": 190,
"preview": "source 'http://rubygems.org'\n\ngem 'cocoapods', \"~> 0.39\"\ngem 'cocoapods-coverage', '~> 0.2'\n\ngem 'coveralls', require: f"
},
{
"path": "LICENSE",
"chars": 1062,
"preview": "Copyright (c) Slack Technologies, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of "
},
{
"path": "README.md",
"chars": 21434,
"preview": "# Deprecation\n\nWe are no longer providing support for `SlackTextViewController`. This project satisfied all of our iOS m"
},
{
"path": "SlackTextViewController/SlackTextViewController/Info.plist",
"chars": 806,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "SlackTextViewController/SlackTextViewController/SlackTextViewController.h",
"chars": 965,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "SlackTextViewController/SlackTextViewController.xcodeproj/project.pbxproj",
"chars": 26491,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "SlackTextViewController/SlackTextViewController.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 168,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:SlackTextViewCo"
},
{
"path": "SlackTextViewController/SlackTextViewController.xcodeproj/xcshareddata/xcbaselines/F5B4E78D1C4DA053005CBBE0.xcbaseline/F8445E9E-5B76-4616-90F9-7D94D0E1142F.plist",
"chars": 577,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "SlackTextViewController/SlackTextViewController.xcodeproj/xcshareddata/xcbaselines/F5B4E78D1C4DA053005CBBE0.xcbaseline/Info.plist",
"chars": 1107,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "SlackTextViewController/SlackTextViewController.xcodeproj/xcshareddata/xcschemes/SlackTextViewController.xcscheme",
"chars": 4114,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0900\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "SlackTextViewController/SlackTextViewController.xcodeproj/xcshareddata/xcschemes/SlackTextViewControllerTests.xcscheme",
"chars": 3985,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0900\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "SlackTextViewController/SlackTextViewControllerTests/FrameworkTests.m",
"chars": 1521,
"preview": "//\n// SlackTextViewControllerTests.m\n// SlackTextViewControllerTests\n//\n// Created by Ignacio Romero Z. on 3/20/15.\n/"
},
{
"path": "SlackTextViewController/SlackTextViewControllerTests/Info.plist",
"chars": 733,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "SlackTextViewController.podspec",
"chars": 1134,
"preview": "@version = \"1.9.6\"\n\nPod::Spec.new do |s|\n s.name \t\t= \"SlackTextViewController\"\n s.version \t\t= @version\n "
},
{
"path": "Source/SLKInputAccessoryView.h",
"chars": 365,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/SLKInputAccessoryView.m",
"chars": 445,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/SLKTextInput+Implementation.m",
"chars": 5011,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/SLKTextInput.h",
"chars": 1521,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/SLKTextInputbar.h",
"chars": 5504,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/SLKTextInputbar.m",
"chars": 27236,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/SLKTextView+SLKAdditions.h",
"chars": 3795,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/SLKTextView+SLKAdditions.m",
"chars": 6275,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/SLKTextView.h",
"chars": 7868,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/SLKTextView.m",
"chars": 36024,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/SLKTextViewController.h",
"chars": 26544,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/SLKTextViewController.m",
"chars": 84643,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/SLKTypingIndicatorProtocol.h",
"chars": 957,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/SLKTypingIndicatorView.h",
"chars": 2326,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/SLKTypingIndicatorView.m",
"chars": 9152,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/SLKUIConstants.h",
"chars": 3368,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/UIResponder+SLKAdditions.h",
"chars": 455,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/UIResponder+SLKAdditions.m",
"chars": 708,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/UIScrollView+SLKAdditions.h",
"chars": 1165,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/UIScrollView+SLKAdditions.m",
"chars": 1521,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/UIView+SLKAdditions.h",
"chars": 2480,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
},
{
"path": "Source/UIView+SLKAdditions.m",
"chars": 2740,
"preview": "//\n// SlackTextViewController\n// https://github.com/slackhq/SlackTextViewController\n//\n// Copyright 2014-2016 Slack T"
}
]
About this extraction
This page contains the full source code of the slackhq/SlackTextViewController GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 117 files (550.9 KB), approximately 148.7k tokens, and a symbol index with 7 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.