├── .cocoadocs.yml
├── .codecov.yml
├── .github
├── CONDUCT.md
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE.md
└── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .travis.yml
├── Assets
├── JSQmessages.png
├── jsq_message_chat_icon.png
├── jsq_messages_banner.png
├── jsq_messages_banner.psd
├── jsq_messages_icon.psd
├── jsq_messages_splash.psd
└── jsq_messages_splash_ipad.psd
├── CHANGELOG.md
├── Documentation
├── apps_using_this_library.md
├── contributor_onboarding.md
├── faq.md
├── getting_started.md
└── migration.md
├── JSQMessages.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── xcshareddata
│ └── xcschemes
│ └── JSQMessages.xcscheme
├── JSQMessages.xcworkspace
└── contents.xcworkspacedata
├── JSQMessagesDemo
├── AppDelegate.h
├── AppDelegate.m
├── Base.lproj
│ ├── Localizable.strings
│ └── Main.storyboard
├── DemoMessagesViewController.h
├── DemoMessagesViewController.m
├── DemoModelData.h
├── DemoModelData.m
├── DemoSettingsViewController.h
├── DemoSettingsViewController.m
├── Images.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-120-1.png
│ │ ├── Icon-120.png
│ │ ├── Icon-180.png
│ │ ├── Icon-76.png
│ │ ├── Icon-76@2x.png
│ │ ├── Icon-87.png
│ │ ├── Icon-Small.png
│ │ ├── Icon-Small@2x-1.png
│ │ ├── Icon-Small@2x.png
│ │ ├── Icon-Spotlight-iOS7.png
│ │ ├── Icon-Spotlight-iOS7@2x-1.png
│ │ ├── Icon-Spotlight-iOS7@2x.png
│ │ └── icon167.png
│ ├── Contents.json
│ ├── DemoAvatars
│ │ ├── demo_avatar_cook.imageset
│ │ │ ├── Contents.json
│ │ │ ├── demo_avatar_cook.png
│ │ │ ├── demo_avatar_cook@2x.png
│ │ │ └── demo_avatar_cook@3x.png
│ │ ├── demo_avatar_jobs.imageset
│ │ │ ├── Contents.json
│ │ │ ├── demo_avatar_jobs.png
│ │ │ ├── demo_avatar_jobs@2x.png
│ │ │ └── demo_avatar_jobs@3x.png
│ │ └── demo_avatar_woz.imageset
│ │ │ ├── Contents.json
│ │ │ ├── demo_avatar_woz.png
│ │ │ ├── demo_avatar_woz@2x.png
│ │ │ └── demo_avatar_woz@3x.png
│ ├── LaunchImage.launchimage
│ │ ├── Contents.json
│ │ ├── jsq_messages_splash_47inch.png
│ │ ├── jsq_messages_splash_55inch.png
│ │ ├── jsq_messages_splash_55inch_landscape.png
│ │ ├── jsq_messages_splash_ipad.png
│ │ ├── jsq_messages_splash_ipad@2x.png
│ │ ├── jsq_messages_splash_ipad@2x~landscape.png
│ │ ├── jsq_messages_splash_ipad~landscape.png
│ │ ├── slpash_iphone4inch.png
│ │ └── splash_iphone35inch.png
│ └── goldengate.imageset
│ │ ├── Contents.json
│ │ ├── goldengate.png
│ │ ├── goldengate@2x.png
│ │ └── goldengate@3x.png
├── Info.plist
├── NSUserDefaults+DemoSettings.h
├── NSUserDefaults+DemoSettings.m
├── TableViewController.h
├── TableViewController.m
├── he.lproj
│ ├── Localizable.strings
│ └── Main.strings
├── jsq_messages_sample.m4a
└── main.m
├── JSQMessagesTests
├── CategoryTests
│ ├── JSQMessagesNSBundleTests.m
│ ├── JSQMessagesNSStringTests.m
│ ├── JSQMessagesUIColorTests.m
│ ├── JSQMessagesUIImageTests.m
│ └── JSQMessagesUIViewTests.m
├── ControllerTests
│ └── JSQMessagesViewControllerTests.m
├── FactoryTests
│ ├── JSQMessagesAvatarImageFactoryTests.m
│ ├── JSQMessagesBubbleImageFactoryTests.m
│ ├── JSQMessagesMediaViewBubbleImageMaskerTests.m
│ ├── JSQMessagesTimestampFormatterTests.m
│ └── JSQMessagesToolbarButtonFactoryTests.m
├── Info.plist
├── LayoutTests
│ ├── JSQMessagesCollectionViewFlowLayoutTests.m
│ └── JSQMessagesCollectionViewLayoutAttributesTests.m
├── ModelTests
│ ├── JSQAudioMediaItemTests.m
│ ├── JSQLocationMediaItemTests.m
│ ├── JSQMessageMediaTests.m
│ ├── JSQMessageTextTests.m
│ ├── JSQMessagesAvatarImageTests.m
│ ├── JSQMessagesBubbleImageTests.m
│ ├── JSQPhotoMediaItemTests.m
│ └── JSQVideoMediaItemTests.m
└── ViewTests
│ ├── JSQMessagesCollectionViewCellTests.m
│ ├── JSQMessagesCollectionViewTests.m
│ ├── JSQMessagesComposerTextViewTests.m
│ ├── JSQMessagesInputToolbarTests.m
│ ├── JSQMessagesLabelTests.m
│ ├── JSQMessagesLoadEarlierHeaderViewTests.m
│ ├── JSQMessagesToolbarContentViewTests.m
│ └── JSQMessagesTypingIndicatorFooterViewTests.m
├── JSQMessagesViewController.podspec
├── JSQMessagesViewController
├── Assets
│ └── JSQMessagesAssets.bundle
│ │ ├── Base.lproj
│ │ └── JSQMessages.strings
│ │ ├── Images
│ │ ├── bubble_min.png
│ │ ├── bubble_min@2x.png
│ │ ├── bubble_min@3x.png
│ │ ├── bubble_min_tailless.png
│ │ ├── bubble_min_tailless@2x.png
│ │ ├── bubble_min_tailless@3x.png
│ │ ├── bubble_regular.png
│ │ ├── bubble_regular@2x.png
│ │ ├── bubble_regular@3x.png
│ │ ├── bubble_stroked.png
│ │ ├── bubble_stroked@2x.png
│ │ ├── bubble_stroked@3x.png
│ │ ├── bubble_stroked_tailless.png
│ │ ├── bubble_stroked_tailless@2x.png
│ │ ├── bubble_stroked_tailless@3x.png
│ │ ├── bubble_tailless.png
│ │ ├── bubble_tailless@2x.png
│ │ ├── bubble_tailless@3x.png
│ │ ├── clip.png
│ │ ├── clip@2x.png
│ │ ├── clip@3x.png
│ │ ├── pause.png
│ │ ├── pause@2x.png
│ │ ├── pause@3x.png
│ │ ├── play.png
│ │ ├── play@2x.png
│ │ ├── play@3x.png
│ │ ├── share.png
│ │ ├── share@2x.png
│ │ ├── share@3x.png
│ │ ├── typing.png
│ │ ├── typing@2x.png
│ │ └── typing@3x.png
│ │ ├── Sounds
│ │ ├── message_received.aiff
│ │ └── message_sent.aiff
│ │ ├── ar.lproj
│ │ └── JSQMessages.strings
│ │ ├── bs.lproj
│ │ └── JSQMessages.strings
│ │ ├── cs.lproj
│ │ └── JSQMessages.strings
│ │ ├── da.lproj
│ │ └── JSQMessages.strings
│ │ ├── de.lproj
│ │ └── JSQMessages.strings
│ │ ├── en.lproj
│ │ └── JSQMessages.strings
│ │ ├── es.lproj
│ │ └── JSQMessages.strings
│ │ ├── fa.lproj
│ │ └── JSQMessages.strings
│ │ ├── fi.lproj
│ │ └── JSQMessages.strings
│ │ ├── fr.lproj
│ │ └── JSQMessages.strings
│ │ ├── he.lproj
│ │ └── JSQMessages.strings
│ │ ├── hr.lproj
│ │ └── JSQMessages.strings
│ │ ├── id.lproj
│ │ └── JSQMessages.strings
│ │ ├── it.lproj
│ │ └── JSQMessages.strings
│ │ ├── ja.lproj
│ │ └── JSQMessages.strings
│ │ ├── ko.lproj
│ │ └── JSQMessages.strings
│ │ ├── ms.lproj
│ │ └── JSQMessages.strings
│ │ ├── nb.lproj
│ │ └── JSQMessages.strings
│ │ ├── nl.lproj
│ │ └── JSQMessages.strings
│ │ ├── pl.lproj
│ │ └── JSQMessages.strings
│ │ ├── pt.lproj
│ │ └── JSQMessages.strings
│ │ ├── ro.lproj
│ │ └── JSQMessages.strings
│ │ ├── ru.lproj
│ │ └── JSQMessages.strings
│ │ ├── sv.lproj
│ │ └── JSQMessages.strings
│ │ ├── th.lproj
│ │ └── JSQMessages.strings
│ │ ├── tr.lproj
│ │ └── JSQMessages.strings
│ │ ├── vi.lproj
│ │ └── JSQMessages.strings
│ │ ├── zh-Hans.lproj
│ │ └── JSQMessages.strings
│ │ └── zh-Hant.lproj
│ │ └── JSQMessages.strings
├── Categories
│ ├── NSBundle+JSQMessages.h
│ ├── NSBundle+JSQMessages.m
│ ├── NSString+JSQMessages.h
│ ├── NSString+JSQMessages.m
│ ├── UIColor+JSQMessages.h
│ ├── UIColor+JSQMessages.m
│ ├── UIImage+JSQMessages.h
│ ├── UIImage+JSQMessages.m
│ ├── UIView+JSQMessages.h
│ └── UIView+JSQMessages.m
├── Controllers
│ ├── JSQMessagesViewController.h
│ ├── JSQMessagesViewController.m
│ └── JSQMessagesViewController.xib
├── Factories
│ ├── JSQMessagesAvatarImageFactory.h
│ ├── JSQMessagesAvatarImageFactory.m
│ ├── JSQMessagesBubbleImageFactory.h
│ ├── JSQMessagesBubbleImageFactory.m
│ ├── JSQMessagesMediaViewBubbleImageMasker.h
│ ├── JSQMessagesMediaViewBubbleImageMasker.m
│ ├── JSQMessagesTimestampFormatter.h
│ ├── JSQMessagesTimestampFormatter.m
│ ├── JSQMessagesToolbarButtonFactory.h
│ ├── JSQMessagesToolbarButtonFactory.m
│ ├── JSQMessagesVideoThumbnailFactory.h
│ └── JSQMessagesVideoThumbnailFactory.m
├── JSQMessages.h
├── Layout
│ ├── JSQAudioMediaViewAttributes.h
│ ├── JSQAudioMediaViewAttributes.m
│ ├── JSQMessagesBubbleSizeCalculating.h
│ ├── JSQMessagesBubblesSizeCalculator.h
│ ├── JSQMessagesBubblesSizeCalculator.m
│ ├── JSQMessagesCollectionViewFlowLayout.h
│ ├── JSQMessagesCollectionViewFlowLayout.m
│ ├── JSQMessagesCollectionViewFlowLayoutInvalidationContext.h
│ ├── JSQMessagesCollectionViewFlowLayoutInvalidationContext.m
│ ├── JSQMessagesCollectionViewLayoutAttributes.h
│ └── JSQMessagesCollectionViewLayoutAttributes.m
├── Model
│ ├── JSQAudioMediaItem.h
│ ├── JSQAudioMediaItem.m
│ ├── JSQLocationMediaItem.h
│ ├── JSQLocationMediaItem.m
│ ├── JSQMediaItem.h
│ ├── JSQMediaItem.m
│ ├── JSQMessage.h
│ ├── JSQMessage.m
│ ├── JSQMessageAvatarImageDataSource.h
│ ├── JSQMessageBubbleImageDataSource.h
│ ├── JSQMessageData.h
│ ├── JSQMessageMediaData.h
│ ├── JSQMessagesAvatarImage.h
│ ├── JSQMessagesAvatarImage.m
│ ├── JSQMessagesBubbleImage.h
│ ├── JSQMessagesBubbleImage.m
│ ├── JSQMessagesCollectionViewDataSource.h
│ ├── JSQMessagesCollectionViewDelegateFlowLayout.h
│ ├── JSQMessagesViewAccessoryButtonDelegate.h
│ ├── JSQPhotoMediaItem.h
│ ├── JSQPhotoMediaItem.m
│ ├── JSQVideoMediaItem.h
│ └── JSQVideoMediaItem.m
└── Views
│ ├── JSQMessagesCellTextView.h
│ ├── JSQMessagesCellTextView.m
│ ├── JSQMessagesCollectionView.h
│ ├── JSQMessagesCollectionView.m
│ ├── JSQMessagesCollectionViewCell.h
│ ├── JSQMessagesCollectionViewCell.m
│ ├── JSQMessagesCollectionViewCellIncoming.h
│ ├── JSQMessagesCollectionViewCellIncoming.m
│ ├── JSQMessagesCollectionViewCellIncoming.xib
│ ├── JSQMessagesCollectionViewCellOutgoing.h
│ ├── JSQMessagesCollectionViewCellOutgoing.m
│ ├── JSQMessagesCollectionViewCellOutgoing.xib
│ ├── JSQMessagesComposerTextView.h
│ ├── JSQMessagesComposerTextView.m
│ ├── JSQMessagesInputToolbar.h
│ ├── JSQMessagesInputToolbar.m
│ ├── JSQMessagesLabel.h
│ ├── JSQMessagesLabel.m
│ ├── JSQMessagesLoadEarlierHeaderView.h
│ ├── JSQMessagesLoadEarlierHeaderView.m
│ ├── JSQMessagesLoadEarlierHeaderView.xib
│ ├── JSQMessagesMediaPlaceholderView.h
│ ├── JSQMessagesMediaPlaceholderView.m
│ ├── JSQMessagesToolbarContentView.h
│ ├── JSQMessagesToolbarContentView.m
│ ├── JSQMessagesToolbarContentView.xib
│ ├── JSQMessagesTypingIndicatorFooterView.h
│ ├── JSQMessagesTypingIndicatorFooterView.m
│ ├── JSQMessagesTypingIndicatorFooterView.xib
│ ├── JSQMessagesTypingView.h
│ └── JSQMessagesTypingView.m
├── LICENSE
├── README.md
├── Screenshots
├── screenshot0.png
├── screenshot1.png
├── screenshot2.png
└── screenshot3.png
└── SwiftExample
├── Podfile
├── Podfile.lock
├── Pods
├── Local Podspecs
│ └── JSQMessagesViewController.podspec.json
├── Manifest.lock
├── Pods.xcodeproj
│ └── project.pbxproj
└── Target Support Files
│ ├── JSQMessagesViewController
│ ├── Info.plist
│ ├── JSQMessagesViewController-dummy.m
│ ├── JSQMessagesViewController-prefix.pch
│ ├── JSQMessagesViewController-umbrella.h
│ ├── JSQMessagesViewController.modulemap
│ └── JSQMessagesViewController.xcconfig
│ ├── Pods-SwiftExample
│ ├── Info.plist
│ ├── Pods-SwiftExample-acknowledgements.markdown
│ ├── Pods-SwiftExample-acknowledgements.plist
│ ├── Pods-SwiftExample-dummy.m
│ ├── Pods-SwiftExample-frameworks.sh
│ ├── Pods-SwiftExample-resources.sh
│ ├── Pods-SwiftExample-umbrella.h
│ ├── Pods-SwiftExample.debug.xcconfig
│ ├── Pods-SwiftExample.modulemap
│ └── Pods-SwiftExample.release.xcconfig
│ └── Pods-SwiftExampleTests
│ ├── Info.plist
│ ├── Pods-SwiftExampleTests-acknowledgements.markdown
│ ├── Pods-SwiftExampleTests-acknowledgements.plist
│ ├── Pods-SwiftExampleTests-dummy.m
│ ├── Pods-SwiftExampleTests-frameworks.sh
│ ├── Pods-SwiftExampleTests-resources.sh
│ ├── Pods-SwiftExampleTests-umbrella.h
│ ├── Pods-SwiftExampleTests.debug.xcconfig
│ ├── Pods-SwiftExampleTests.modulemap
│ └── Pods-SwiftExampleTests.release.xcconfig
├── SwiftExample.xcodeproj
├── project.pbxproj
└── project.xcworkspace
│ └── contents.xcworkspacedata
├── SwiftExample.xcworkspace
└── contents.xcworkspacedata
├── SwiftExample
├── AppDelegate.swift
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ ├── Icon-167.png
│ │ ├── Icon-29.png
│ │ ├── Icon-29@2x-1.png
│ │ ├── Icon-29@2x.png
│ │ ├── Icon-29@3x.png
│ │ ├── Icon-40.png
│ │ ├── Icon-40@2x.png
│ │ ├── Icon-40@3x.png
│ │ ├── Icon-60@2x.png
│ │ ├── Icon-60@3x.png
│ │ ├── Icon-76.png
│ │ ├── Icon-76@2x.png
│ │ └── icon40@3x.png
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── ChatViewController.swift
├── Conversation.swift
├── DemoConversation.swift
├── Info.plist
├── InitalTableViewController.swift
└── SettingsTableViewController.swift
└── SwiftExampleTests
├── ChatViewControllerTests.swift
├── Info.plist
└── SettingsTests.swift
/.cocoadocs.yml:
--------------------------------------------------------------------------------
1 | highlight-color: "#43D15B"
2 | highlight-dark-color: "#319942"
3 | darker-color: "#8A998C"
4 | darker-dark-color: "#454D46"
5 | background-color: "#D7E5CF"
6 | alt-link-color: "#00A81C"
7 | warning-color: "#0FB82B"
--------------------------------------------------------------------------------
/.codecov.yml:
--------------------------------------------------------------------------------
1 | codecov:
2 | branch: develop
3 |
4 | coverage:
5 | precision: 2
6 | round: nearest
7 | range: "60...100"
8 | ignore:
9 | - JSQMessagesDemo/*
10 | - Pods/*
11 | - JSQMessagesTests/*
12 |
13 | status:
14 | project:
15 | default:
16 | target: auto
17 | threshold: 2.0
18 | branches:
19 | - master
20 | - develop
21 | patch:
22 | default:
23 | target: auto
24 | branches:
25 | - master
26 | - develop
27 |
28 | comment:
29 | layout: header, diff, changes, sunburst, uncovered
30 | behavior: default
31 | branches:
32 | - master
33 | - develop
34 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | > This library is ⚠️ [deprecated](https://www.jessesquires.com/blog/officially-deprecating-jsqmessagesviewcontroller/) ⚠️ and is **only** accepting pull requests for critical bug fixes. Consider using [MessageKit](https://github.com/MessageKit/MessageKit) for new projects.
2 |
3 |
4 | ## New issue checklist
5 |
6 |
7 | - [ ] I understand that this library is ⚠️ [deprecated](https://www.jessesquires.com/blog/officially-deprecating-jsqmessagesviewcontroller/) ⚠️ and is **only** accepting pull requests for critical bug fixes.
8 | - [ ] I have read the [`README`](https://github.com/jessesquires/JSQMessagesViewController/blob/develop/README.md), [documentation](http://cocoadocs.org/docsets/JSQMessagesViewController/), and [FAQ](https://github.com/jessesquires/JSQMessagesViewController/blob/develop/Documentation/faq.md).
9 | - [ ] [Contributing guidelines](https://github.com/jessesquires/JSQMessagesViewController/blob/develop/.github/CONTRIBUTING.md) confirmation: ____
10 | - [ ] I have searched [existing issues](https://github.com/jessesquires/JSQMessagesViewController/issues?q=is%3Aissue+sort%3Acreated-desc) and **this is not a duplicate**.
11 |
12 | ## General information
13 |
14 | - `JSQMessagesViewController` version:
15 | - iOS version:
16 | - Devices/Simulators:
17 | - Reproducible in the demo project? (Yes/No):
18 | - Any related issues:
19 |
20 | ## What happened?
21 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | > This library is ⚠️ [deprecated](https://www.jessesquires.com/blog/officially-deprecating-jsqmessagesviewcontroller/) ⚠️ and is **only** accepting pull requests for critical bug fixes. Consider using [MessageKit](https://github.com/MessageKit/MessageKit) for new projects.
2 |
3 | ## Pull request checklist
4 |
5 | - [ ] I understand that this library is ⚠️ [deprecated](https://www.jessesquires.com/blog/officially-deprecating-jsqmessagesviewcontroller/) ⚠️ and is **only** accepting pull requests for critical bug fixes.
6 | - [ ] All tests pass.
7 | - [ ] Demo project builds and runs.
8 | - [ ] I have resolved merge conflicts.
9 | - [ ] I have followed the [coding style](https://github.com/jessesquires/HowToContribute#style-guidelines).
10 |
11 | [Contributing guidelines](https://github.com/jessesquires/JSQMessagesViewController/blob/develop/.github/CONTRIBUTING.md) confirmation: ____
12 |
13 | #### This fixes issue #
14 |
15 | ## What's in this pull request?
16 |
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
3 | # Xcode
4 | /build/*
5 | */build/*
6 | *.pbxuser
7 | !default.pbxuser
8 | *.mode1v3
9 | !default.mode1v3
10 | *.mode2v3
11 | !default.mode2v3
12 | *.perspectivev3
13 | !default.perspectivev3
14 | xcuserdata
15 | profile
16 | *.moved-aside
17 | DerivedData
18 | .idea/
19 | *.hmap
20 | *.xccheckout
21 |
--------------------------------------------------------------------------------
/Assets/JSQmessages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/Assets/JSQmessages.png
--------------------------------------------------------------------------------
/Assets/jsq_message_chat_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/Assets/jsq_message_chat_icon.png
--------------------------------------------------------------------------------
/Assets/jsq_messages_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/Assets/jsq_messages_banner.png
--------------------------------------------------------------------------------
/Assets/jsq_messages_banner.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/Assets/jsq_messages_banner.psd
--------------------------------------------------------------------------------
/Assets/jsq_messages_icon.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/Assets/jsq_messages_icon.psd
--------------------------------------------------------------------------------
/Assets/jsq_messages_splash.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/Assets/jsq_messages_splash.psd
--------------------------------------------------------------------------------
/Assets/jsq_messages_splash_ipad.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/Assets/jsq_messages_splash_ipad.psd
--------------------------------------------------------------------------------
/Documentation/migration.md:
--------------------------------------------------------------------------------
1 | # Migration Guide
2 |
3 | *Migrating between major versions of JSQMessagesViewController?*
4 |
5 | -----------------------------
6 |
7 | ## From `6.x` to `7.x`
8 |
9 | See the [7.0 release notes](https://github.com/jessesquires/JSQMessagesViewController/releases/tag/7.0.0) for details about API changes.
10 |
11 | ## From `5.x` to `6.x`
12 |
13 | See the [6.0 release notes](https://github.com/jessesquires/JSQMessagesViewController/releases/tag/6.0.0) for details about API changes.
14 |
15 | ## Previous versions
16 |
17 | Unfortunately, versions prior to `5.0` outdate this document, and guides are not available.
18 |
--------------------------------------------------------------------------------
/JSQMessages.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/JSQMessages.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/JSQMessagesDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 | #import
21 |
22 | @interface AppDelegate : UIResponder
23 |
24 | @property (strong, nonatomic) UIWindow *window;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/JSQMessagesDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import "AppDelegate.h"
20 |
21 | #import "NSUserDefaults+DemoSettings.h"
22 |
23 |
24 | @implementation AppDelegate
25 |
26 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
27 | {
28 | // Load our default settings
29 | [NSUserDefaults saveIncomingAvatarSetting:YES];
30 | [NSUserDefaults saveOutgoingAvatarSetting:YES];
31 |
32 | return YES;
33 | }
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/JSQMessagesDemo/Base.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | "Media messages" = "Media messages";
20 | "Cancel" = "Cancel";
21 | "Send photo" = "Send photo";
22 | "Send location" = "Send location";
23 | "Send video" = "Send video";
24 | "Send video thumbnail" = "Send video with thumbnail";
25 | "Custom Action" = "Custom Action";
26 | "OK" = "OK";
27 |
28 | "Welcome to JSQMessages: A messaging UI framework for iOS." = "Welcome to JSQMessages: A messaging UI framework for iOS.";
29 | "It is simple, elegant, and easy to use. There are super sweet default settings, but you can customize like crazy." = "It is simple, elegant, and easy to use. There are super sweet default settings, but you can customize like crazy.";
30 | "It even has data detectors. You can call me tonight. My cell number is 123-456-7890. My website is www.hexedbits.com." = "It even has data detectors. You can call me tonight. My cell number is 123-456-7890. My website is www.hexedbits.com.";
31 | "JSQMessagesViewController is nearly an exact replica of the iOS Messages App. And perhaps, better." = "JSQMessagesViewController is nearly an exact replica of the iOS Messages App. And perhaps, better.";
32 | "It is unit-tested, free, open-source, and documented." = "It is unit-tested, free, open-source, and documented.";
33 | "Now with media messages!" = "Now with media messages!";
--------------------------------------------------------------------------------
/JSQMessagesDemo/DemoMessagesViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 |
20 | // Import all the things
21 | #import "JSQMessages.h"
22 |
23 | #import "DemoModelData.h"
24 | #import "NSUserDefaults+DemoSettings.h"
25 |
26 |
27 | @class DemoMessagesViewController;
28 |
29 | @protocol JSQDemoViewControllerDelegate
30 |
31 | - (void)didDismissJSQDemoViewController:(DemoMessagesViewController *)vc;
32 |
33 | @end
34 |
35 |
36 |
37 |
38 | @interface DemoMessagesViewController : JSQMessagesViewController
39 |
40 | @property (weak, nonatomic) id delegateModal;
41 |
42 | @property (strong, nonatomic) DemoModelData *demoData;
43 |
44 | - (void)receiveMessagePressed:(UIBarButtonItem *)sender;
45 |
46 | - (void)closePressed:(UIBarButtonItem *)sender;
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/JSQMessagesDemo/DemoModelData.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 | #import
21 | #import
22 |
23 | #import "JSQMessages.h"
24 |
25 | /**
26 | * This is for demo/testing purposes only.
27 | * This object sets up some fake model data.
28 | * Do not actually do anything like this.
29 | */
30 |
31 | static NSString * const kJSQDemoAvatarDisplayNameSquires = @"Jesse Squires";
32 | static NSString * const kJSQDemoAvatarDisplayNameCook = @"Tim Cook";
33 | static NSString * const kJSQDemoAvatarDisplayNameJobs = @"Jobs";
34 | static NSString * const kJSQDemoAvatarDisplayNameWoz = @"Steve Wozniak";
35 |
36 | static NSString * const kJSQDemoAvatarIdSquires = @"053496-4509-289";
37 | static NSString * const kJSQDemoAvatarIdCook = @"468-768355-23123";
38 | static NSString * const kJSQDemoAvatarIdJobs = @"707-8956784-57";
39 | static NSString * const kJSQDemoAvatarIdWoz = @"309-41802-93823";
40 |
41 |
42 |
43 | @interface DemoModelData : NSObject
44 |
45 | @property (strong, nonatomic) NSMutableArray *messages;
46 |
47 | @property (strong, nonatomic) NSDictionary *avatars;
48 |
49 | @property (strong, nonatomic) JSQMessagesBubbleImage *outgoingBubbleImageData;
50 |
51 | @property (strong, nonatomic) JSQMessagesBubbleImage *incomingBubbleImageData;
52 |
53 | @property (strong, nonatomic) NSDictionary *users;
54 |
55 | - (void)addPhotoMediaMessage;
56 |
57 | - (void)addLocationMediaMessageCompletion:(JSQLocationMediaItemCompletionBlock)completion;
58 |
59 | - (void)addVideoMediaMessage;
60 |
61 | - (void)addVideoMediaMessageWithThumbnail;
62 |
63 | - (void)addAudioMediaMessage;
64 |
65 | @end
66 |
--------------------------------------------------------------------------------
/JSQMessagesDemo/DemoSettingsViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 | #import
21 |
22 | /**
23 | * This is for demo/testing purposes only.
24 | *
25 | * This is a terrible idea for a real app.
26 | */
27 |
28 | @interface DemoSettingsViewController : UITableViewController
29 |
30 | @property (weak, nonatomic) IBOutlet UISwitch *extraMessagesSwitch;
31 |
32 | @property (weak, nonatomic) IBOutlet UISwitch *longMessageSwitch;
33 |
34 | @property (weak, nonatomic) IBOutlet UISwitch *emptySwitch;
35 |
36 | @property (weak, nonatomic) IBOutlet UISwitch *incomingAvatarsSwitch;
37 |
38 | @property (weak, nonatomic) IBOutlet UISwitch *outgoingAvatarsSwitch;
39 |
40 | @property (weak, nonatomic) IBOutlet UISwitch *springySwitch;
41 |
42 | @property (weak, nonatomic) IBOutlet UISwitch *accessoryButtonSwitch;
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/JSQMessagesDemo/DemoSettingsViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import "DemoSettingsViewController.h"
20 |
21 | #import "NSUserDefaults+DemoSettings.h"
22 |
23 |
24 | /**
25 | * This is for demo/testing purposes only.
26 | *
27 | * This is a terrible idea for a real app.
28 | */
29 |
30 | @implementation DemoSettingsViewController
31 |
32 | - (void)viewDidLoad
33 | {
34 | [super viewDidLoad];
35 |
36 | self.extraMessagesSwitch.on = [NSUserDefaults extraMessagesSetting];
37 | self.longMessageSwitch.on = [NSUserDefaults longMessageSetting];
38 | self.emptySwitch.on = [NSUserDefaults emptyMessagesSetting];
39 | self.accessoryButtonSwitch.on = [NSUserDefaults accessoryButtonForMediaMessages];
40 |
41 | self.incomingAvatarsSwitch.on = [NSUserDefaults incomingAvatarSetting];
42 | self.outgoingAvatarsSwitch.on = [NSUserDefaults outgoingAvatarSetting];
43 |
44 | self.springySwitch.on = [NSUserDefaults springinessSetting];
45 | }
46 |
47 | - (IBAction)didTapSwitch:(UISwitch *)sender
48 | {
49 | if (sender == self.extraMessagesSwitch) {
50 | [NSUserDefaults saveExtraMessagesSetting:sender.on];
51 | }
52 | else if (sender == self.longMessageSwitch) {
53 | [NSUserDefaults saveLongMessageSetting:sender.on];
54 | }
55 | else if (sender == self.emptySwitch) {
56 | [NSUserDefaults saveEmptyMessagesSetting:sender.on];
57 | }
58 | else if (sender == self.accessoryButtonSwitch) {
59 | [NSUserDefaults saveAccessoryButtonForMediaMessages:sender.on];
60 | }
61 | else if (sender == self.incomingAvatarsSwitch) {
62 | [NSUserDefaults saveIncomingAvatarSetting:sender.on];
63 | }
64 | else if (sender == self.outgoingAvatarsSwitch) {
65 | [NSUserDefaults saveOutgoingAvatarSetting:sender.on];
66 | }
67 | else if (sender == self.springySwitch) {
68 | [NSUserDefaults saveSpringinessSetting:sender.on];
69 | }
70 |
71 | [[NSUserDefaults standardUserDefaults] synchronize];
72 | }
73 |
74 |
75 | @end
76 |
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-120-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-120-1.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-120.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-180.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-76.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-87.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-Small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-Small.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-Small@2x-1.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-iOS7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-iOS7.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-iOS7@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-iOS7@2x-1.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-iOS7@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/Icon-Spotlight-iOS7@2x.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/icon167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/AppIcon.appiconset/icon167.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_cook.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "demo_avatar_cook.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "demo_avatar_cook@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "demo_avatar_cook@3x.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_cook.imageset/demo_avatar_cook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_cook.imageset/demo_avatar_cook.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_cook.imageset/demo_avatar_cook@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_cook.imageset/demo_avatar_cook@2x.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_cook.imageset/demo_avatar_cook@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_cook.imageset/demo_avatar_cook@3x.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_jobs.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "demo_avatar_jobs.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "demo_avatar_jobs@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "demo_avatar_jobs@3x.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_jobs.imageset/demo_avatar_jobs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_jobs.imageset/demo_avatar_jobs.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_jobs.imageset/demo_avatar_jobs@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_jobs.imageset/demo_avatar_jobs@2x.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_jobs.imageset/demo_avatar_jobs@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_jobs.imageset/demo_avatar_jobs@3x.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_woz.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "demo_avatar_woz.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "demo_avatar_woz@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "demo_avatar_woz@3x.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_woz.imageset/demo_avatar_woz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_woz.imageset/demo_avatar_woz.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_woz.imageset/demo_avatar_woz@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_woz.imageset/demo_avatar_woz@2x.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_woz.imageset/demo_avatar_woz@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/DemoAvatars/demo_avatar_woz.imageset/demo_avatar_woz@3x.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "extent" : "full-screen",
5 | "idiom" : "iphone",
6 | "subtype" : "736h",
7 | "filename" : "jsq_messages_splash_55inch.png",
8 | "minimum-system-version" : "8.0",
9 | "orientation" : "portrait",
10 | "scale" : "3x"
11 | },
12 | {
13 | "extent" : "full-screen",
14 | "idiom" : "iphone",
15 | "subtype" : "736h",
16 | "filename" : "jsq_messages_splash_55inch_landscape.png",
17 | "minimum-system-version" : "8.0",
18 | "orientation" : "landscape",
19 | "scale" : "3x"
20 | },
21 | {
22 | "extent" : "full-screen",
23 | "idiom" : "iphone",
24 | "subtype" : "667h",
25 | "filename" : "jsq_messages_splash_47inch.png",
26 | "minimum-system-version" : "8.0",
27 | "orientation" : "portrait",
28 | "scale" : "2x"
29 | },
30 | {
31 | "orientation" : "portrait",
32 | "idiom" : "iphone",
33 | "extent" : "full-screen",
34 | "minimum-system-version" : "7.0",
35 | "filename" : "splash_iphone35inch.png",
36 | "scale" : "2x"
37 | },
38 | {
39 | "extent" : "full-screen",
40 | "idiom" : "iphone",
41 | "subtype" : "retina4",
42 | "filename" : "slpash_iphone4inch.png",
43 | "minimum-system-version" : "7.0",
44 | "orientation" : "portrait",
45 | "scale" : "2x"
46 | },
47 | {
48 | "orientation" : "portrait",
49 | "idiom" : "ipad",
50 | "extent" : "full-screen",
51 | "minimum-system-version" : "7.0",
52 | "filename" : "jsq_messages_splash_ipad.png",
53 | "scale" : "1x"
54 | },
55 | {
56 | "orientation" : "landscape",
57 | "idiom" : "ipad",
58 | "extent" : "full-screen",
59 | "minimum-system-version" : "7.0",
60 | "filename" : "jsq_messages_splash_ipad~landscape.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "orientation" : "portrait",
65 | "idiom" : "ipad",
66 | "extent" : "full-screen",
67 | "minimum-system-version" : "7.0",
68 | "filename" : "jsq_messages_splash_ipad@2x.png",
69 | "scale" : "2x"
70 | },
71 | {
72 | "orientation" : "landscape",
73 | "idiom" : "ipad",
74 | "extent" : "full-screen",
75 | "minimum-system-version" : "7.0",
76 | "filename" : "jsq_messages_splash_ipad@2x~landscape.png",
77 | "scale" : "2x"
78 | }
79 | ],
80 | "info" : {
81 | "version" : 1,
82 | "author" : "xcode"
83 | }
84 | }
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/jsq_messages_splash_47inch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/jsq_messages_splash_47inch.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/jsq_messages_splash_55inch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/jsq_messages_splash_55inch.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/jsq_messages_splash_55inch_landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/jsq_messages_splash_55inch_landscape.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/jsq_messages_splash_ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/jsq_messages_splash_ipad.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/jsq_messages_splash_ipad@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/jsq_messages_splash_ipad@2x.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/jsq_messages_splash_ipad@2x~landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/jsq_messages_splash_ipad@2x~landscape.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/jsq_messages_splash_ipad~landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/jsq_messages_splash_ipad~landscape.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/slpash_iphone4inch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/slpash_iphone4inch.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/splash_iphone35inch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/LaunchImage.launchimage/splash_iphone35inch.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/goldengate.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "goldengate.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "goldengate@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "goldengate@3x.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/goldengate.imageset/goldengate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/goldengate.imageset/goldengate.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/goldengate.imageset/goldengate@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/goldengate.imageset/goldengate@2x.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Images.xcassets/goldengate.imageset/goldengate@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/Images.xcassets/goldengate.imageset/goldengate@3x.png
--------------------------------------------------------------------------------
/JSQMessagesDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 7.3.4
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 7.3.4
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/JSQMessagesDemo/NSUserDefaults+DemoSettings.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 |
21 | @interface NSUserDefaults (DemoSettings)
22 |
23 | + (void)saveExtraMessagesSetting:(BOOL)value;
24 | + (BOOL)extraMessagesSetting;
25 |
26 | + (void)saveLongMessageSetting:(BOOL)value;
27 | + (BOOL)longMessageSetting;
28 |
29 | + (void)saveEmptyMessagesSetting:(BOOL)value;
30 | + (BOOL)emptyMessagesSetting;
31 |
32 | + (void)saveSpringinessSetting:(BOOL)value;
33 | + (BOOL)springinessSetting;
34 |
35 | + (void)saveOutgoingAvatarSetting:(BOOL)value;
36 | + (BOOL)outgoingAvatarSetting;
37 |
38 | + (void)saveIncomingAvatarSetting:(BOOL)value;
39 | + (BOOL)incomingAvatarSetting;
40 |
41 | + (void)saveAccessoryButtonForMediaMessages:(BOOL)value;
42 | + (BOOL)accessoryButtonForMediaMessages;
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/JSQMessagesDemo/TableViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 | #import
21 |
22 | #import "DemoMessagesViewController.h"
23 |
24 | @interface TableViewController : UITableViewController
25 |
26 | - (IBAction)unwindSegue:(UIStoryboardSegue *)sender;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/JSQMessagesDemo/he.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | "Media messages" = "הודעות מדיה";
20 | "Cancel" = "ביטול";
21 | "Send photo" = "שלח תמונה";
22 | "Send location" = "שלח מיקום";
23 | "Send video" = "שלח וידאו";
24 | "Custom Action" = "פעולה מותאמת אישית";
25 | "OK" = "אוקי";
26 |
27 | "Welcome to JSQMessages: A messaging UI framework for iOS." = "ברוכים הבאים ל JSQMessages ספריית UI צא׳ט עבור מכשירי iOS";
28 | "It is simple, elegant, and easy to use. There are super sweet default settings, but you can customize like crazy." = "זה פשוט, אלגנטי, וקל לשימוש. ישנן הגדרות ברירת מחדל מאוד סולידיות ,איך ניתן להגדיר אותן אישית כמו משוגע.";
29 | "It even has data detectors. You can call me tonight. My cell number is 123-456-7890. My website is www.hexedbits.com." = "יש לו אפילו זיהוי טקסט, אתה יכול להתקשר אלי. מספר הטלפון שלי הוא: 123-456-7890. ואתר האינטרנט שלי הוא: www.hexedbits.com";
30 | "JSQMessagesViewController is nearly an exact replica of the iOS Messages App. And perhaps, better." = "הספריה JSQMessagesViewController היא כמעט זהה לאפליקציית ההודעות של מכשיר ה iOS. ואולי טובה יותר.";
31 | "It is unit-tested, free, open-source, and documented." = "ישנן בדיקות יחידה, זה חינם, זה קוד-פתוח ויש אחלה דקומנטציה";
32 | "Now with media messages!" = "וישנה גם תמיכה בהודעות מדיה";
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/JSQMessagesDemo/he.lproj/Main.strings:
--------------------------------------------------------------------------------
1 |
2 | /* Class = "UILabel"; text = "Title"; ObjectID = "2qz-Z2-GmT"; */
3 | "2qz-Z2-GmT.text" = "כותרת";
4 |
5 | /* Class = "UILabel"; text = "Springy bubbles"; ObjectID = "3d2-fZ-dx9"; */
6 | "3d2-fZ-dx9.text" = "Springy bubbles";
7 |
8 | /* Class = "UILabel"; text = "Outgoing avatars"; ObjectID = "9Rr-S8-Uae"; */
9 | "9Rr-S8-Uae.text" = "אווטאר בהודעות יוצאות";
10 |
11 | /* Class = "UILabel"; text = "Accessory button for media messages"; ObjectID = "Cae-FY-b5Q"; */
12 | "Cae-FY-b5Q.text" = "Accessory button for media messages";
13 |
14 | /* Class = "UILabel"; text = "Empty view, no messages"; ObjectID = "DoU-SU-Nek"; */
15 | "DoU-SU-Nek.text" = "מסך רייק ללא הודעות";
16 |
17 | /* Class = "UILabel"; text = "Incoming avatars"; ObjectID = "RUq-Pa-3nx"; */
18 | "RUq-Pa-3nx.text" = "אווטאר בהודעות נכנסות";
19 |
20 | /* Class = "UILabel"; text = "Load really long message"; ObjectID = "YV3-GH-Yul"; */
21 | "YV3-GH-Yul.text" = "טען הודעה ארוכה מאוד";
22 |
23 | /* Class = "UILabel"; text = "Load extra messages"; ObjectID = "bSS-CD-nfD"; */
24 | "bSS-CD-nfD.text" = "טען הודעות נוספות";
25 |
26 | /* Class = "UINavigationItem"; title = "Settings"; ObjectID = "hrw-Dp-Tor"; */
27 | "hrw-Dp-Tor.title" = "הגדרות";
28 |
29 | /* Class = "UINavigationItem"; title = "Root View Controller"; ObjectID = "irr-Pn-9x5"; */
30 | "irr-Pn-9x5.title" = "Root View Controller";
31 |
32 | /* Class = "UITableViewSection"; headerTitle = "Avatars"; ObjectID = "ns0-OO-PGu"; */
33 | "ns0-OO-PGu.headerTitle" = "אווטאר";
34 |
35 | /* Class = "UITableViewSection"; footerTitle = "NOTE: This feature is experimental"; ObjectID = "o5m-OT-1Iw"; */
36 | "o5m-OT-1Iw.footerTitle" = "שים לב: פיצ'ר זו היינו ניסיוני";
37 |
38 | /* Class = "UITableViewSection"; headerTitle = "Dynamic Behaviors"; ObjectID = "o5m-OT-1Iw"; */
39 | "o5m-OT-1Iw.headerTitle" = "Dynamic Behaviors";
40 |
41 | /* Class = "UITableViewSection"; headerTitle = "Messages"; ObjectID = "ygb-Dp-o4r"; */
42 | "ygb-Dp-o4r.headerTitle" = "הודעות";
43 |
--------------------------------------------------------------------------------
/JSQMessagesDemo/jsq_messages_sample.m4a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesDemo/jsq_messages_sample.m4a
--------------------------------------------------------------------------------
/JSQMessagesDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 |
21 | #import "AppDelegate.h"
22 |
23 | int main(int argc, char * argv[])
24 | {
25 | @autoreleasepool {
26 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/JSQMessagesTests/CategoryTests/JSQMessagesNSBundleTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "NSBundle+JSQMessages.h"
14 |
15 |
16 | @interface JSQMessagesNSBundleTests : XCTestCase
17 | @end
18 |
19 |
20 | @implementation JSQMessagesNSBundleTests
21 |
22 | - (void)testMessagesBundle
23 | {
24 | XCTAssertNotNil([NSBundle jsq_messagesBundle]);
25 | }
26 |
27 | - (void)testAssetBundle
28 | {
29 | NSBundle *bundle = [NSBundle jsq_messagesAssetBundle];
30 | XCTAssertNotNil(bundle);
31 | XCTAssertEqualObjects(bundle.bundlePath.lastPathComponent, @"JSQMessagesAssets.bundle");
32 | }
33 |
34 | - (void)testLocalizedStringForKey
35 | {
36 | XCTAssertNotNil([NSBundle jsq_localizedStringForKey:@"send"]);
37 | XCTAssertNotEqualObjects([NSBundle jsq_localizedStringForKey:@"send"], @"send");
38 |
39 | XCTAssertNotNil([NSBundle jsq_localizedStringForKey:@"load_earlier_messages"]);
40 | XCTAssertNotEqualObjects([NSBundle jsq_localizedStringForKey:@"load_earlier_messages"], @"load_earlier_messages");
41 |
42 | XCTAssertNotNil([NSBundle jsq_localizedStringForKey:@"new_message"]);
43 | XCTAssertNotEqualObjects([NSBundle jsq_localizedStringForKey:@"new_message"], @"new_message");
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/JSQMessagesTests/CategoryTests/JSQMessagesNSStringTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "NSString+JSQMessages.h"
14 |
15 |
16 | @interface JSQMessagesNSStringTests : XCTestCase
17 | @end
18 |
19 |
20 | @implementation JSQMessagesNSStringTests
21 |
22 | - (void)testTrimingStringWhitespace
23 | {
24 | // GIVEN: a string of text
25 | NSString *loremIpsum = @"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
26 |
27 | // WHEN: the text is wrapped in white space
28 | NSString *string1 = [NSString stringWithFormat:@" %@ ", loremIpsum];
29 | NSString *string2 = [NSString stringWithFormat:@" %@", loremIpsum];
30 | NSString *string3 = [NSString stringWithFormat:@"%@ ", loremIpsum];
31 |
32 | // THEN: we can successfully trim extra white space
33 | XCTAssertEqualObjects(loremIpsum, [string1 jsq_stringByTrimingWhitespace], @"Strings should be equal after trimming whitespace");
34 |
35 | XCTAssertEqualObjects(loremIpsum, [string2 jsq_stringByTrimingWhitespace], @"Strings should be equal after trimming whitespace");
36 |
37 | XCTAssertEqualObjects(loremIpsum, [string3 jsq_stringByTrimingWhitespace], @"Strings should be equal after trimming whitespace");
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/JSQMessagesTests/CategoryTests/JSQMessagesUIColorTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "UIColor+JSQMessages.h"
14 |
15 |
16 | @interface JSQMessagesUIColorTests : XCTestCase
17 | @end
18 |
19 |
20 | @implementation JSQMessagesUIColorTests
21 |
22 | - (void)testDarkeningColors
23 | {
24 | // GIVEN: a color and darkening value
25 | CGFloat r = 0.89f, g = 0.34f, b = 0.67f, a = 1.0f;
26 | CGFloat darkeningValue = 0.12f;
27 | UIColor *color = [UIColor colorWithRed:r green:g blue:b alpha:a];
28 |
29 | // WHEN: we darken that color
30 | UIColor *darkColor = [color jsq_colorByDarkeningColorWithValue:darkeningValue];
31 |
32 | // THEN: each RGB value is changed accordingly
33 | CGFloat dr, dg, db, da;
34 | [darkColor getRed:&dr green:&dg blue:&db alpha:&da];
35 |
36 | XCTAssertEqual(dr, r - darkeningValue, @"Red values should be equal");
37 | XCTAssertEqual(dg, g - darkeningValue, @"Green values should be equal");
38 | XCTAssertEqual(db, b - darkeningValue, @"Blue values should be equal");
39 | XCTAssertEqual(da, a, @"Alpha values should be equal");
40 | }
41 |
42 | - (void)testDarkeningColorsFloorToZero
43 | {
44 | // GIVEN: a color and darkening value
45 | CGFloat r = 0.89f, g = 0.24f, b = 0.67f, a = 1.0f;
46 | CGFloat darkeningValue = 0.5f;
47 | UIColor *color = [UIColor colorWithRed:r green:g blue:b alpha:a];
48 |
49 | // WHEN: we dark that color, such that some RGB values will be negative
50 | UIColor *darkColor = [color jsq_colorByDarkeningColorWithValue:darkeningValue];
51 |
52 | // THEN: the RGB values are floored to zero instead of being negative
53 | CGFloat dr, dg, db, da;
54 | [darkColor getRed:&dr green:&dg blue:&db alpha:&da];
55 | XCTAssertEqual(dr, r - darkeningValue, @"Red values should be equal");
56 | XCTAssertEqual(dg, 0.0f, @"Green values should be floored to zero");
57 | XCTAssertEqual(db, b - darkeningValue, @"Blue values should be equal");
58 | XCTAssertEqual(da, a, @"Alpha values should be equal");
59 | }
60 |
61 | @end
62 |
--------------------------------------------------------------------------------
/JSQMessagesTests/CategoryTests/JSQMessagesUIImageTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "UIImage+JSQMessages.h"
14 |
15 |
16 | @interface JSQMessagesUIImageTests : XCTestCase
17 | @end
18 |
19 |
20 | @implementation JSQMessagesUIImageTests
21 |
22 | - (void)testImageMasking
23 | {
24 | // GIVEN: an image
25 | UIImage *img = [UIImage jsq_bubbleCompactImage];
26 | XCTAssertNotNil(img, @"Image should not be nil");
27 |
28 | // WHEN: we mask that image
29 | UIImage *imgMasked = [img jsq_imageMaskedWithColor:[UIColor whiteColor]];
30 | XCTAssertNotNil(imgMasked, @"Image should not be nil");
31 |
32 | // THEN: masking should succeed, and the new image should have the same properties
33 | XCTAssertTrue(CGSizeEqualToSize(img.size, imgMasked.size), @"Image sizes should be equal");
34 |
35 | XCTAssertEqual(img.scale, imgMasked.scale, @"Image scales should be equal");
36 | }
37 |
38 | - (void)testImageAssets
39 | {
40 | // GIVEN: our image assets
41 |
42 | // WHEN: we create a new UIImage object
43 |
44 | // THEN: the image is created successfully
45 |
46 | XCTAssertNotNil([UIImage jsq_bubbleRegularImage]);
47 |
48 | XCTAssertNotNil([UIImage jsq_bubbleRegularTaillessImage]);
49 |
50 | XCTAssertNotNil([UIImage jsq_bubbleRegularStrokedImage]);
51 |
52 | XCTAssertNotNil([UIImage jsq_bubbleRegularStrokedTaillessImage]);
53 |
54 | XCTAssertNotNil([UIImage jsq_bubbleCompactImage]);
55 |
56 | XCTAssertNotNil([UIImage jsq_bubbleCompactTaillessImage]);
57 |
58 | XCTAssertNotNil([UIImage jsq_defaultAccessoryImage]);
59 |
60 | XCTAssertNotNil([UIImage jsq_defaultTypingIndicatorImage]);
61 |
62 | XCTAssertNotNil([UIImage jsq_defaultPlayImage]);
63 |
64 | XCTAssertNotNil([UIImage jsq_shareActionImage]);
65 | }
66 |
67 | @end
68 |
--------------------------------------------------------------------------------
/JSQMessagesTests/CategoryTests/JSQMessagesUIViewTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "UIView+JSQMessages.h"
14 |
15 |
16 | @interface JSQMessagesUIViewTests : XCTestCase
17 | @end
18 |
19 |
20 | @implementation JSQMessagesUIViewTests
21 |
22 | - (void)testViewAutoLayoutPinEdges
23 | {
24 | // GIVEN: a superview and subview
25 | UIView *superview = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 50.0f, 50.0f)];
26 | [superview setTranslatesAutoresizingMaskIntoConstraints:NO];
27 |
28 | UIView *subview = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 25.0f, 25.0f)];
29 | [subview setTranslatesAutoresizingMaskIntoConstraints:NO];
30 |
31 | // WHEN: we add the subview to the superview
32 | [superview addSubview:subview];
33 |
34 | // WHEN: we pin the edges of the subview to the superview
35 | XCTAssertNoThrow([superview jsq_pinAllEdgesOfSubview:subview], @"Pinning edges of subview to superview should not throw");
36 | [superview setNeedsUpdateConstraints];
37 | [superview layoutIfNeeded];
38 |
39 | // THEN: add the layout constraints and laying out the views succeeds
40 |
41 | XCTAssertEqual([[superview constraints] count], 4U, @"Superview should have 4 constraints");
42 |
43 | XCTAssertEqual([[subview constraints] count], 0U, @"Subview should have 0 constraints");
44 |
45 | for (NSLayoutConstraint *eachConstraint in [superview constraints]) {
46 |
47 | XCTAssertEqualObjects(eachConstraint.firstItem, superview, @"Constraint first item should be equal to superview");
48 |
49 | XCTAssertEqualObjects(eachConstraint.secondItem, subview, @"Constraint second item should be equal to subview");
50 |
51 | XCTAssertEqual(eachConstraint.relation, NSLayoutRelationEqual, @"Constraint relation should be NSLayoutRelationEqual");
52 |
53 | XCTAssertEqual(eachConstraint.multiplier, 1.0f, @"Constraint multiplier should be 1.0");
54 |
55 | XCTAssertEqual(eachConstraint.constant, 0.0f, @"Constraint constant should be 0.0");
56 | }
57 | }
58 |
59 | @end
60 |
--------------------------------------------------------------------------------
/JSQMessagesTests/FactoryTests/JSQMessagesMediaViewBubbleImageMaskerTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQMessagesMediaViewBubbleImageMasker.h"
14 |
15 |
16 | @interface JSQMessagesMediaViewBubbleImageMaskerTests : XCTestCase
17 | @end
18 |
19 |
20 | @implementation JSQMessagesMediaViewBubbleImageMaskerTests
21 |
22 | - (void)testMediaViewBubbleImageMasker
23 | {
24 | // GIVEN: a new masker object
25 | JSQMessagesMediaViewBubbleImageMasker *masker = [[JSQMessagesMediaViewBubbleImageMasker alloc] init];
26 | XCTAssertNotNil(masker);
27 |
28 | // WHEN: we apply a mask to a view
29 | UIView *view1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
30 | UIView *view2 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
31 |
32 | // THEN: it succeeds without an error
33 | XCTAssertNoThrow([masker applyOutgoingBubbleImageMaskToMediaView:view1]);
34 | XCTAssertNoThrow([masker applyIncomingBubbleImageMaskToMediaView:view2]);
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/JSQMessagesTests/FactoryTests/JSQMessagesToolbarButtonFactoryTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQMessagesToolbarButtonFactory.h"
14 |
15 | #import "UIColor+JSQMessages.h"
16 |
17 |
18 | @interface JSQMessagesToolbarButtonFactoryTests : XCTestCase
19 |
20 | @property (strong, nonatomic) JSQMessagesToolbarButtonFactory *factory;
21 | @property (strong, nonatomic) UIFont *factoryFont;
22 |
23 | @end
24 |
25 |
26 | @implementation JSQMessagesToolbarButtonFactoryTests
27 |
28 | - (void)setUp {
29 | [super setUp];
30 | self.factoryFont = [UIFont systemFontOfSize:15.0];
31 | self.factory = [[JSQMessagesToolbarButtonFactory alloc] initWithFont:self.factoryFont];
32 | }
33 |
34 | - (void)tearDown {
35 | [super tearDown];
36 | self.factoryFont = nil;
37 | self.factory = nil;
38 | }
39 |
40 | - (void)testDefaultSendButtonItem
41 | {
42 | UIButton *button = [self.factory defaultSendButtonItem];
43 | XCTAssertNotNil(button, @"Button should not be nil");
44 | XCTAssertEqual(button.titleLabel.font, self.factoryFont, @"Button should use font provided by factory");
45 | }
46 |
47 | - (void)testDefaultAccessoryButtonItem
48 | {
49 | UIButton *button = [self.factory defaultAccessoryButtonItem];
50 | XCTAssertNotNil(button, @"Button should not be nil");
51 | XCTAssertEqual(button.titleLabel.font, self.factoryFont, @"Button should use font provided by factory");
52 | }
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/JSQMessagesTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/JSQMessagesTests/LayoutTests/JSQMessagesCollectionViewFlowLayoutTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQMessagesCollectionViewFlowLayout.h"
14 |
15 |
16 | @interface JSQMessagesCollectionViewFlowLayoutTests : XCTestCase
17 | @end
18 |
19 |
20 | @implementation JSQMessagesCollectionViewFlowLayoutTests
21 |
22 | - (void)setUp
23 | {
24 | [super setUp];
25 | }
26 |
27 | - (void)tearDown
28 | {
29 | [super tearDown];
30 | }
31 |
32 | - (void)testFlowLayoutInit
33 | {
34 | JSQMessagesCollectionViewFlowLayout *layout = [[JSQMessagesCollectionViewFlowLayout alloc] init];
35 | XCTAssertNotNil(layout, @"Layout should not be nil");
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/JSQMessagesTests/LayoutTests/JSQMessagesCollectionViewLayoutAttributesTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQMessagesCollectionViewLayoutAttributes.h"
14 |
15 |
16 | @interface JSQMessagesCollectionViewLayoutAttributesTests : XCTestCase
17 | @end
18 |
19 |
20 | @implementation JSQMessagesCollectionViewLayoutAttributesTests
21 |
22 | - (void)setUp
23 | {
24 | [super setUp];
25 | }
26 |
27 | - (void)tearDown
28 | {
29 | [super tearDown];
30 | }
31 |
32 | - (void)testLayoutAttributesInitAndIsEqual
33 | {
34 | NSIndexPath *indexPath = [NSIndexPath indexPathForItem:0 inSection:0];
35 | JSQMessagesCollectionViewLayoutAttributes *attrs = [JSQMessagesCollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:indexPath];
36 | attrs.messageBubbleFont = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
37 | attrs.messageBubbleContainerViewWidth = 40.0f;
38 | attrs.textViewTextContainerInsets = UIEdgeInsetsMake(10.0f, 8.0f, 10.0f, 8.0f);
39 | attrs.textViewFrameInsets = UIEdgeInsetsMake(0.0f, 0.0f, 0.0f, 6.0f);
40 | attrs.incomingAvatarViewSize = CGSizeMake(34.0f, 34.0f);
41 | attrs.outgoingAvatarViewSize = CGSizeZero;
42 | attrs.cellTopLabelHeight = 20.0f;
43 | attrs.messageBubbleTopLabelHeight = 10.0f;
44 | attrs.cellBottomLabelHeight = 15.0f;
45 | XCTAssertNotNil(attrs, @"Layout attributes should not be nil");
46 |
47 | JSQMessagesCollectionViewLayoutAttributes *copy = [attrs copy];
48 | XCTAssertEqualObjects(attrs, copy, @"Copied attributes should be equal");
49 | XCTAssertEqual([attrs hash], [copy hash], @"Copied attributes hashes should be equal");
50 | }
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/JSQMessagesTests/ModelTests/JSQAudioMediaItemTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQAudioMediaItem.h"
14 |
15 | @interface JSQAudioMediaItemTests : XCTestCase
16 |
17 | @end
18 |
19 | @implementation JSQAudioMediaItemTests
20 |
21 | - (void)setUp
22 | {
23 | [super setUp];
24 | }
25 |
26 | - (void)tearDown
27 | {
28 | [super tearDown];
29 | }
30 |
31 | - (void)testAudioItemInit
32 | {
33 | JSQAudioMediaItem *item = [[JSQAudioMediaItem alloc] initWithData:[NSData data]];
34 | XCTAssertNotNil(item);
35 | }
36 |
37 | - (void)testAudioItemIsEqual
38 | {
39 | NSString * sample = [[NSBundle mainBundle] pathForResource:@"jsq_messages_sample" ofType:@"m4a"];
40 | JSQAudioMediaItem *item = [[JSQAudioMediaItem alloc] initWithData:[NSData dataWithContentsOfFile:sample]];
41 |
42 | JSQAudioMediaItem *copy = [item copy];
43 |
44 | XCTAssertEqualObjects(item, copy, @"Copied items should be equal");
45 |
46 | XCTAssertEqual([item hash], [copy hash], @"Copied item hashes should be equal");
47 |
48 | XCTAssertEqualObjects(item, item, @"Item should be equal to itself");
49 | }
50 |
51 | - (void)testAudioItemArchiving
52 | {
53 | NSString * sample = [[NSBundle mainBundle] pathForResource:@"jsq_messages_sample" ofType:@"m4a"];
54 | JSQAudioMediaItem *item = [[JSQAudioMediaItem alloc] initWithData:[NSData dataWithContentsOfFile:sample]];
55 |
56 | NSData *data = [NSKeyedArchiver archivedDataWithRootObject:item];
57 |
58 | JSQAudioMediaItem *unarchivedItem = [NSKeyedUnarchiver unarchiveObjectWithData:data];
59 |
60 | XCTAssertEqualObjects(item, unarchivedItem);
61 | }
62 |
63 | - (void)testMediaDataProtocol
64 | {
65 | JSQAudioMediaItem *item = [[JSQAudioMediaItem alloc] init];
66 |
67 | XCTAssertTrue(!CGSizeEqualToSize([item mediaViewDisplaySize], CGSizeZero));
68 | XCTAssertNotNil([item mediaPlaceholderView]);
69 | XCTAssertNil([item mediaView], @"Media view should be nil if image is nil");
70 |
71 | NSString * sample = [[NSBundle mainBundle] pathForResource:@"jsq_messages_sample" ofType:@"m4a"];
72 | item.audioData = [NSData dataWithContentsOfFile:sample];
73 |
74 | XCTAssertNotNil([item mediaView], @"Media view should NOT be nil once item has media data");
75 | }
76 |
77 | @end
78 |
--------------------------------------------------------------------------------
/JSQMessagesTests/ModelTests/JSQLocationMediaItemTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQLocationMediaItem.h"
14 |
15 | #import
16 |
17 | @interface JSQLocationMediaItemTests : XCTestCase
18 |
19 | @property (strong, nonatomic) CLLocation *location;
20 |
21 | @end
22 |
23 |
24 | @implementation JSQLocationMediaItemTests
25 |
26 | - (void)setUp
27 | {
28 | [super setUp];
29 | self.location = [[CLLocation alloc] initWithLatitude:37.795313 longitude:-122.393757];
30 | }
31 |
32 | - (void)tearDown
33 | {
34 | self.location = nil;
35 | [super tearDown];
36 | }
37 |
38 | - (void)testLocationItemInit
39 | {
40 | JSQLocationMediaItem *item = [[JSQLocationMediaItem alloc] initWithLocation:self.location];
41 | XCTAssertNotNil(item);
42 | }
43 |
44 | - (void)testMediaDataProtocol
45 | {
46 | JSQLocationMediaItem *item = [[JSQLocationMediaItem alloc] init];
47 |
48 | XCTAssertTrue(!CGSizeEqualToSize([item mediaViewDisplaySize], CGSizeZero));
49 | XCTAssertNotNil([item mediaPlaceholderView]);
50 | XCTAssertNil([item mediaView], @"Media view should be nil if location is nil");
51 |
52 | XCTestExpectation *expectation = [self expectationWithDescription:[NSString stringWithFormat:@"%s", __PRETTY_FUNCTION__]];
53 |
54 | [item setLocation:self.location withCompletionHandler:^{
55 | [expectation fulfill];
56 | }];
57 |
58 | [self waitForExpectationsWithTimeout:15 handler:^(NSError *error) {
59 | XCTAssertNil(error, @"Expectation should not error");
60 | }];
61 |
62 | XCTAssertNotNil([item mediaView], @"Media view should NOT be nil once item has media data");
63 | }
64 |
65 | - (void)testCopyableItemInMediaProtocol {
66 | JSQLocationMediaItem *item = [[JSQLocationMediaItem alloc] initWithLocation:self.location];
67 | XCTAssertNotNil(item);
68 |
69 | XCTAssertEqualObjects((NSString *)kUTTypeURL, [item mediaDataType]);
70 |
71 | NSURL *locationURL = [[NSURL alloc] initWithString:@"http://maps.apple.com/?ll=37.795313,-122.393757&z=18&q=%20"];
72 | XCTAssertEqualObjects(locationURL, [item mediaData]);
73 | }
74 |
75 | @end
76 |
--------------------------------------------------------------------------------
/JSQMessagesTests/ModelTests/JSQMessagesAvatarImageTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQMessagesAvatarImage.h"
14 |
15 |
16 | @interface JSQMessagesAvatarImageTests : XCTestCase
17 |
18 | @end
19 |
20 |
21 | @implementation JSQMessagesAvatarImageTests
22 |
23 | - (void)testInitValid
24 | {
25 | UIImage *mockImage = [UIImage imageNamed:@"demo_avatar_jobs"];
26 | JSQMessagesAvatarImage *avatar = [JSQMessagesAvatarImage avatarImageWithPlaceholder:mockImage];
27 | XCTAssertNotNil(avatar, @"Valid init should succeed");
28 |
29 | JSQMessagesAvatarImage *avatar2 = [JSQMessagesAvatarImage avatarWithImage:mockImage];
30 | XCTAssertNotNil(avatar2, @"Valid init should succeed");
31 |
32 | XCTAssertEqualObjects(avatar2.avatarImage, avatar2.avatarHighlightedImage);
33 | XCTAssertEqualObjects(avatar2.avatarHighlightedImage, avatar2.avatarPlaceholderImage);
34 | }
35 |
36 | - (void)testCopy
37 | {
38 | UIImage *mockImage = [UIImage imageNamed:@"demo_avatar_jobs"];
39 | JSQMessagesAvatarImage *avatar = [[JSQMessagesAvatarImage alloc] initWithAvatarImage:mockImage
40 | highlightedImage:mockImage
41 | placeholderImage:mockImage];
42 |
43 | JSQMessagesAvatarImage *copy = [avatar copy];
44 | XCTAssertNotNil(copy, @"Copy should succeed");
45 |
46 | XCTAssertFalse(avatar == copy, @"Copy should return new, distinct instance");
47 |
48 | XCTAssertNotEqualObjects(avatar.avatarImage, copy.avatarImage, @"Images should not be equal");
49 | XCTAssertNotEqual(avatar.avatarImage, copy.avatarImage, @"Images should not be equal");
50 |
51 | XCTAssertNotEqualObjects(avatar.avatarHighlightedImage, copy.avatarHighlightedImage, @"Images should not be equal");
52 | XCTAssertNotEqual(avatar.avatarHighlightedImage, copy.avatarHighlightedImage, @"Images should not be equal");
53 |
54 | XCTAssertNotEqualObjects(avatar.avatarPlaceholderImage, copy.avatarPlaceholderImage, @"Images should not be equal");
55 | XCTAssertNotEqual(avatar.avatarPlaceholderImage, copy.avatarPlaceholderImage, @"Images should not be equal");
56 | }
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/JSQMessagesTests/ModelTests/JSQMessagesBubbleImageTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQMessagesBubbleImage.h"
14 |
15 | #import "UIImage+JSQMessages.h"
16 |
17 |
18 | @interface JSQMessagesBubbleImageTests : XCTestCase
19 |
20 | @end
21 |
22 |
23 | @implementation JSQMessagesBubbleImageTests
24 |
25 | - (void)testInitValid
26 | {
27 | UIImage *mockImage = [UIImage jsq_bubbleCompactImage];
28 | JSQMessagesBubbleImage *bubbleImage = [[JSQMessagesBubbleImage alloc] initWithMessageBubbleImage:mockImage highlightedImage:mockImage];
29 | XCTAssertNotNil(bubbleImage, @"Valid init should succeed");
30 | }
31 |
32 | - (void)testCopy
33 | {
34 | UIImage *mockImage = [UIImage jsq_bubbleCompactImage];
35 | JSQMessagesBubbleImage *bubbleImage = [[JSQMessagesBubbleImage alloc] initWithMessageBubbleImage:mockImage highlightedImage:mockImage];
36 |
37 | JSQMessagesBubbleImage *copy = [bubbleImage copy];
38 | XCTAssertNotNil(copy, @"Copy should succeed");
39 |
40 | XCTAssertFalse(bubbleImage == copy, @"Copy should return new, distinct instance");
41 |
42 | XCTAssertNotEqualObjects(bubbleImage.messageBubbleImage, copy.messageBubbleImage, @"Images should not be equal");
43 | XCTAssertNotEqual(bubbleImage.messageBubbleImage, copy.messageBubbleImage, @"Images should not be equal");
44 |
45 | XCTAssertNotEqualObjects(bubbleImage.messageBubbleHighlightedImage, copy.messageBubbleHighlightedImage, @"Images should not be equal");
46 | XCTAssertNotEqual(bubbleImage.messageBubbleHighlightedImage, copy.messageBubbleHighlightedImage, @"Images should not be equal");
47 | }
48 |
49 | @end
50 |
--------------------------------------------------------------------------------
/JSQMessagesTests/ModelTests/JSQVideoMediaItemTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQVideoMediaItem.h"
14 |
15 |
16 | @interface JSQVideoMediaItemTests : XCTestCase
17 |
18 | @end
19 |
20 |
21 | @implementation JSQVideoMediaItemTests
22 |
23 | - (void)setUp
24 | {
25 | [super setUp];
26 | }
27 |
28 | - (void)tearDown
29 | {
30 | [super tearDown];
31 | }
32 |
33 | - (void)testVideoMediaItemInit
34 | {
35 | JSQVideoMediaItem *item = [[JSQVideoMediaItem alloc] initWithFileURL:[NSURL URLWithString:@"file://"] isReadyToPlay:NO];
36 | XCTAssertNotNil(item);
37 | }
38 |
39 | - (void)testVideoItemIsEqual
40 | {
41 | JSQVideoMediaItem *item = [[JSQVideoMediaItem alloc] initWithFileURL:[NSURL URLWithString:@"file://"] isReadyToPlay:YES];
42 |
43 | JSQVideoMediaItem *copy = [item copy];
44 |
45 | XCTAssertEqualObjects(item, copy, @"Copied items should be equal");
46 |
47 | XCTAssertEqual([item hash], [copy hash], @"Copied item hashes should be equal");
48 |
49 | XCTAssertEqualObjects(item, item, @"Item should be equal to itself");
50 | }
51 |
52 | - (void)testVideoItemArchiving
53 | {
54 | JSQVideoMediaItem *item = [[JSQVideoMediaItem alloc] initWithFileURL:[NSURL URLWithString:@"file://"] isReadyToPlay:YES];
55 |
56 | NSData *data = [NSKeyedArchiver archivedDataWithRootObject:item];
57 |
58 | JSQVideoMediaItem *unarchivedItem = [NSKeyedUnarchiver unarchiveObjectWithData:data];
59 |
60 | XCTAssertEqualObjects(item, unarchivedItem);
61 | }
62 |
63 | - (void)testMediaDataProtocol
64 | {
65 | JSQVideoMediaItem *item = [[JSQVideoMediaItem alloc] init];
66 |
67 | XCTAssertTrue(!CGSizeEqualToSize([item mediaViewDisplaySize], CGSizeZero));
68 | XCTAssertNotNil([item mediaPlaceholderView]);
69 | XCTAssertNil([item mediaView], @"Media view should be nil if fileURL is nil, and readyToPlay is NO");
70 |
71 | item.fileURL = [NSURL URLWithString:@"file://"];
72 | item.isReadyToPlay = YES;
73 |
74 | XCTAssertNotNil([item mediaView], @"Media view should NOT be nil once item has media data");
75 | }
76 |
77 | @end
78 |
--------------------------------------------------------------------------------
/JSQMessagesTests/ViewTests/JSQMessagesCollectionViewCellTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQMessagesCollectionViewCellIncoming.h"
14 | #import "JSQMessagesCollectionViewCellOutgoing.h"
15 |
16 |
17 | @interface JSQMessagesCollectionViewCellTests : XCTestCase
18 | @end
19 |
20 |
21 | @implementation JSQMessagesCollectionViewCellTests
22 |
23 | - (void)setUp
24 | {
25 | [super setUp];
26 | }
27 |
28 | - (void)tearDown
29 | {
30 | [super tearDown];
31 | }
32 |
33 | - (void)testMessagesIncomingCollectionViewCellInit
34 | {
35 | UINib *incomingCell = [JSQMessagesCollectionViewCellIncoming nib];
36 | XCTAssertNotNil(incomingCell, @"Nib should not be nil");
37 |
38 | NSString *incomingCellId = [JSQMessagesCollectionViewCellIncoming cellReuseIdentifier];
39 | XCTAssertNotNil(incomingCellId, @"Cell identifier should not be nil");
40 | XCTAssertEqualObjects(incomingCellId, NSStringFromClass([JSQMessagesCollectionViewCellIncoming class]));
41 | }
42 |
43 | - (void)testMessagesOutgoingCollectionViewCellInit
44 | {
45 | UINib *outgoingCell = [JSQMessagesCollectionViewCellOutgoing nib];
46 | XCTAssertNotNil(outgoingCell, @"Nib should not be nil");
47 |
48 | NSString *outgoingCellId = [JSQMessagesCollectionViewCellOutgoing cellReuseIdentifier];
49 | XCTAssertNotNil(outgoingCellId, @"Cell identifier should not be nil");
50 | XCTAssertEqualObjects(outgoingCellId, NSStringFromClass([JSQMessagesCollectionViewCellOutgoing class]));
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/JSQMessagesTests/ViewTests/JSQMessagesCollectionViewTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQMessagesCollectionView.h"
14 | #import "JSQMessagesCollectionViewFlowLayout.h"
15 |
16 |
17 | @interface JSQMessagesCollectionViewTests : XCTestCase
18 | @end
19 |
20 |
21 | @implementation JSQMessagesCollectionViewTests
22 |
23 | - (void)setUp
24 | {
25 | [super setUp];
26 | }
27 |
28 | - (void)tearDown
29 | {
30 | [super tearDown];
31 | }
32 |
33 | - (void)testCollectionViewInit
34 | {
35 | JSQMessagesCollectionViewFlowLayout *layout = [[JSQMessagesCollectionViewFlowLayout alloc] init];
36 |
37 | JSQMessagesCollectionView *view = [[JSQMessagesCollectionView alloc] initWithFrame:[UIScreen mainScreen].bounds
38 | collectionViewLayout:layout];
39 |
40 | XCTAssertNotNil(view, @"Collection view should not be nil");
41 | XCTAssertEqualObjects(view.backgroundColor, [UIColor whiteColor], @"Property should be equal to default value");
42 | XCTAssertEqual(view.keyboardDismissMode, UIScrollViewKeyboardDismissModeInteractive, @"Property should be equal to default value");
43 | XCTAssertEqual(view.alwaysBounceVertical, YES, @"Property should be equal to default value");
44 | XCTAssertEqual(view.bounces, YES, @"Property should be equal to default value");
45 | }
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/JSQMessagesTests/ViewTests/JSQMessagesInputToolbarTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQMessagesViewController.h"
14 | #import "JSQMessagesInputToolbar.h"
15 | #import "DemoMessagesViewController.h"
16 |
17 |
18 | @interface JSQMessagesInputToolbarTests : XCTestCase
19 | @end
20 |
21 |
22 | @implementation JSQMessagesInputToolbarTests
23 |
24 | - (void)setUp
25 | {
26 | [super setUp];
27 | }
28 |
29 | - (void)tearDown
30 | {
31 | [super tearDown];
32 | }
33 |
34 | - (void)testInputToolbarInit
35 | {
36 | JSQMessagesViewController *vc = [JSQMessagesViewController messagesViewController];
37 | [vc loadView];
38 |
39 | JSQMessagesInputToolbar *toolbar = vc.inputToolbar;
40 | XCTAssertNotNil(toolbar, @"Toolbar should not be nil");
41 | XCTAssertNotNil(toolbar.contentView, @"Toolbar content view should not be nil");
42 | XCTAssertEqual(toolbar.sendButtonLocation, JSQMessagesInputSendButtonLocationRight, @"Property should be equal to default value");
43 | }
44 |
45 | // TODO: investigate this later
46 | - (void)disabled_testSetMaximumHeight
47 | {
48 | UIStoryboard *mainSB = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
49 | XCTAssertNotNil(mainSB, @"Storyboard should not be nil");
50 |
51 | DemoMessagesViewController *demoVC = [mainSB instantiateViewControllerWithIdentifier:@"DemoVC"];
52 | [demoVC beginAppearanceTransition:YES animated:NO];
53 | [demoVC endAppearanceTransition];
54 |
55 | XCTAssertEqual(demoVC.inputToolbar.maximumHeight, NSNotFound, @"maximumInputToolbarHeight should equal default value");
56 |
57 | demoVC.inputToolbar.maximumHeight = 54;
58 |
59 | CGRect newBounds = demoVC.inputToolbar.bounds;
60 | newBounds.size.height = 100;
61 | demoVC.inputToolbar.bounds = newBounds;
62 | XCTAssertEqual(CGRectGetHeight(demoVC.inputToolbar.bounds), 100);
63 |
64 | [demoVC.view setNeedsUpdateConstraints];
65 | [demoVC.view setNeedsLayout];
66 | [demoVC.view layoutIfNeeded];
67 |
68 | XCTAssertLessThanOrEqual(CGRectGetHeight(demoVC.inputToolbar.frame), 54, @"Toolbar height should be <= to maximumInputToolbarHeight");
69 | }
70 |
71 | @end
72 |
--------------------------------------------------------------------------------
/JSQMessagesTests/ViewTests/JSQMessagesLabelTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQMessagesLabel.h"
14 |
15 |
16 | @interface JSQMessagesLabelTests : XCTestCase
17 | @end
18 |
19 |
20 | @implementation JSQMessagesLabelTests
21 |
22 | - (void)setUp
23 | {
24 | [super setUp];
25 | }
26 |
27 | - (void)tearDown
28 | {
29 | [super tearDown];
30 | }
31 |
32 | - (void)testMessagesLabelInit
33 | {
34 | JSQMessagesLabel *label = [[JSQMessagesLabel alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 200.0f, 40.0f)];
35 | XCTAssertNotNil(label, @"Label should not be nil");
36 | XCTAssertTrue(UIEdgeInsetsEqualToEdgeInsets(label.textInsets, UIEdgeInsetsZero), @"Property should be equal to default value");
37 | }
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/JSQMessagesTests/ViewTests/JSQMessagesLoadEarlierHeaderViewTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQMessagesLoadEarlierHeaderView.h"
14 |
15 |
16 | @interface JSQMessagesLoadEarlierHeaderViewTests : XCTestCase
17 | @end
18 |
19 |
20 | @implementation JSQMessagesLoadEarlierHeaderViewTests
21 |
22 | - (void)setUp
23 | {
24 | [super setUp];
25 | }
26 |
27 | - (void)tearDown
28 | {
29 | [super tearDown];
30 | }
31 |
32 | - (void)testLoadEarlierHeaderViewInit
33 | {
34 | UINib *headerView = [JSQMessagesLoadEarlierHeaderView nib];
35 | XCTAssertNotNil(headerView, @"Nib should not be nil");
36 |
37 | NSString *headerId = [JSQMessagesLoadEarlierHeaderView headerReuseIdentifier];
38 | XCTAssertNotNil(headerId, @"Header view identifier should not be nil");
39 | }
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/JSQMessagesTests/ViewTests/JSQMessagesToolbarContentViewTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQMessagesToolbarContentView.h"
14 | #import "JSQMessagesComposerTextView.h"
15 |
16 | @interface JSQMessagesToolbarContentViewTests : XCTestCase
17 |
18 | @property (strong, nonatomic) JSQMessagesToolbarContentView *contentView;
19 |
20 | @end
21 |
22 |
23 | @implementation JSQMessagesToolbarContentViewTests
24 |
25 | - (void)setUp
26 | {
27 | [super setUp];
28 |
29 | UINib *contentViewNib = [JSQMessagesToolbarContentView nib];
30 | XCTAssertNotNil(contentViewNib, @"Nib should not be nil");
31 |
32 | NSArray *view = [contentViewNib instantiateWithOwner:nil options:nil];
33 | self.contentView = [view firstObject];
34 | XCTAssertNotNil(self.contentView, @"Content view should not be nil");
35 | }
36 |
37 | - (void)tearDown
38 | {
39 | self.contentView = nil;
40 | [super tearDown];
41 | }
42 |
43 | - (void)testToolbarContentViewInit
44 | {
45 | XCTAssertTrue(CGRectEqualToRect(self.contentView.frame, CGRectMake(0.0f, 0.0f, 320.0f, 44.0f)), @"Frame should be equal to default value");
46 |
47 | XCTAssertNotNil(self.contentView.textView, @"Text view should not be nil");
48 | XCTAssertTrue([self.contentView.textView isKindOfClass:[JSQMessagesComposerTextView class]], @"Text view should be a %@", [JSQMessagesComposerTextView class]);
49 | XCTAssertNil(self.contentView.leftBarButtonItem, @"Property should be equal to default value");
50 | XCTAssertNil(self.contentView.rightBarButtonItem, @"Property should be equal to default value");
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/JSQMessagesTests/ViewTests/JSQMessagesTypingIndicatorFooterViewTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // MIT License
7 | // Copyright (c) 2014 Jesse Squires
8 | // http://opensource.org/licenses/MIT
9 | //
10 |
11 | #import
12 |
13 | #import "JSQMessagesTypingIndicatorFooterView.h"
14 |
15 |
16 | @interface JSQMessagesTypingIndicatorFooterViewTests : XCTestCase
17 | @end
18 |
19 |
20 | @implementation JSQMessagesTypingIndicatorFooterViewTests
21 |
22 | - (void)setUp
23 | {
24 | [super setUp];
25 | }
26 |
27 | - (void)tearDown
28 | {
29 | [super tearDown];
30 | }
31 |
32 | - (void)testTypingIndicatorFooterViewInit
33 | {
34 | UINib *footerView = [JSQMessagesTypingIndicatorFooterView nib];
35 | XCTAssertNotNil(footerView, @"Nib should not be nil");
36 |
37 | NSString *footerId = [JSQMessagesTypingIndicatorFooterView footerReuseIdentifier];
38 | XCTAssertNotNil(footerId, @"Footer view identifier should not be nil");
39 | }
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/JSQMessagesViewController.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'JSQMessagesViewController'
3 | s.version = '7.3.5'
4 | s.summary = 'An elegant messages UI library for iOS.'
5 | s.license = 'MIT'
6 | s.platform = :ios, '7.0'
7 |
8 | s.author = 'Jesse Squires'
9 |
10 | s.source = { :git => 'https://github.com/jessesquires/JSQMessagesViewController.git', :tag => s.version }
11 | s.source_files = 'JSQMessagesViewController/**/*.{h,m}'
12 |
13 | s.resources = ['JSQMessagesViewController/Assets/JSQMessagesAssets.bundle', 'JSQMessagesViewController/**/*.{xib}']
14 |
15 | s.frameworks = 'QuartzCore', 'CoreGraphics', 'CoreLocation', 'MapKit', 'MobileCoreServices', 'AVFoundation'
16 | s.requires_arc = true
17 |
18 | s.deprecated = true
19 | end
20 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Base.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Load Earlier Messages";
26 |
27 | "send" = "Send";
28 |
29 | "new_message" = "New Message";
30 |
31 | "text_message_accessibility_label" = "%@: %@";
32 |
33 | "media_message_accessibility_label" = "%@: media message";
34 |
35 | "accessory_button_accessibility_label" = "Share media";
36 |
37 | "new_message_received_accessibility_announcement" = "New message received";
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_min.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_min.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_min@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_min@2x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_min@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_min@3x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_min_tailless.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_min_tailless.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_min_tailless@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_min_tailless@2x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_min_tailless@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_min_tailless@3x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_regular.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_regular.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_regular@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_regular@2x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_regular@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_regular@3x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_stroked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_stroked.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_stroked@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_stroked@2x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_stroked@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_stroked@3x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_stroked_tailless.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_stroked_tailless.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_stroked_tailless@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_stroked_tailless@2x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_stroked_tailless@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_stroked_tailless@3x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_tailless.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_tailless.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_tailless@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_tailless@2x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_tailless@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/bubble_tailless@3x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/clip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/clip.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/clip@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/clip@2x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/clip@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/clip@3x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/pause.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/pause@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/pause@2x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/pause@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/pause@3x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/play.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/play@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/play@2x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/play@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/play@3x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/share.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/share.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/share@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/share@2x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/share@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/share@3x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/typing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/typing.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/typing@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/typing@2x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/typing@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Images/typing@3x.png
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Sounds/message_received.aiff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Sounds/message_received.aiff
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Sounds/message_sent.aiff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/Sounds/message_sent.aiff
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/ar.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "تحميل الرسائل السابقة";
26 |
27 | "send" = "أرسال";
28 |
29 | "new_message" = "رسالة جديدة";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/bs.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Učitaj ranije poruke";
26 |
27 | "send" = "Šalji";
28 |
29 | "new_message" = "Nova poruka";
30 |
31 | "text_message_accessibility_label" = "%@: %@";
32 |
33 | "media_message_accessibility_label" = "%@: medijska poruka";
34 |
35 | "accessory_button_accessibility_label" = "Podijeli medij";
36 |
37 | "new_message_received_accessibility_announcement" = "Primljena nova poruka";
38 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/cs.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Načíst starší zprávy";
26 |
27 | "send" = "Odeslat";
28 |
29 | "new_message" = "Nová zpráva";
30 |
31 | "text_message_accessibility_label" = "%@: %@";
32 |
33 | "media_message_accessibility_label" = "%@: multimediální zpráva";
34 |
35 | "accessory_button_accessibility_label" = "Sdílet";
36 |
37 | "new_message_received_accessibility_announcement" = "Přijata nová zpráva";
38 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/da.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Indlæs tidligere beskeder";
26 |
27 | "send" = "Send";
28 |
29 | "new_message" = "Ny besked";
30 |
31 | "text_message_accessibility_label" = "%@: %@";
32 |
33 | "media_message_accessibility_label" = "%@: mediebesked";
34 |
35 | "accessory_button_accessibility_label" = "Del medie";
36 |
37 | "new_message_received_accessibility_announcement" = "Ny besked modtaget";
38 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/de.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Ältere Nachrichten laden";
26 |
27 | "send" = "Senden";
28 |
29 | "new_message" = "Neue Nachricht";
30 |
31 | "text_message_accessibility_label" = "%@: %@";
32 |
33 | "media_message_accessibility_label" = "%@: media Nachricht";
34 |
35 | "accessory_button_accessibility_label" = "Aktien media";
36 |
37 | "new_message_received_accessibility_announcement" = "Neue Nachricht empfangen";
38 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/en.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Load Earlier Messages";
26 |
27 | "send" = "Send";
28 |
29 | "new_message" = "New Message";
30 |
31 | "text_message_accessibility_label" = "%@: %@";
32 |
33 | "media_message_accessibility_label" = "%@: media message";
34 |
35 | "accessory_button_accessibility_label" = "Share media";
36 |
37 | "new_message_received_accessibility_announcement" = "New message received";
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/es.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Cargar mensajes anteriores";
26 |
27 | "send" = "Enviar";
28 |
29 | "new_message" = "Nuevo mensaje";
30 |
31 | "text_message_accessibility_label" = "%@: %@";
32 |
33 | "media_message_accessibility_label" = "%@: imagen";
34 |
35 | "accessory_button_accessibility_label" = "Intercambio de archivos";
36 |
37 | "new_message_received_accessibility_announcement" = "mensaje recibido";
38 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/fa.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | /*
2 | Localization provided by MasihTak under MIT license
3 | The Mac OS X and iOS localization experts.
4 | https://masihtak.com
5 | */
6 |
7 | "accessory_button_accessibility_label" = "اشتراک رسانه";
8 |
9 | "load_earlier_messages" = "بارگذاری پیام های قبلی";
10 |
11 | "media_message_accessibility_label" = "%@: پیام رسانه ای";
12 |
13 | "new_message" = "پیام جدید";
14 |
15 | "new_message_received_accessibility_announcement" = "پیام جدید دریافت شد";
16 |
17 | "send" = "ارسال";
18 |
19 | "text_message_accessibility_label" = "%@: %@";
20 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/fi.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Lataa aiempia viestejä";
26 |
27 | "send" = "Lähetä";
28 |
29 | "new_message" = "Uusi viesti";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/fr.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Messages précedents";
26 |
27 | "send" = "Envoyer";
28 |
29 | "new_message" = "Nouveau message";
30 |
31 | "text_message_accessibility_label" = "%@: %@";
32 |
33 | "media_message_accessibility_label" = "%@: image";
34 |
35 | "accessory_button_accessibility_label" = "Partager fichier";
36 |
37 | "new_message_received_accessibility_announcement" = "Nouveau message reçu";
38 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/he.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "טען הודעות קודמות";
26 |
27 | "send" = "שלח";
28 |
29 | "new_message" = "הודעה חדשה";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/hr.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Učitaj ranije poruke";
26 |
27 | "send" = "Šalji";
28 |
29 | "new_message" = "Nova poruka";
30 |
31 | "text_message_accessibility_label" = "%@: %@";
32 |
33 | "media_message_accessibility_label" = "%@: medijska poruka";
34 |
35 | "accessory_button_accessibility_label" = "Podijeli medij";
36 |
37 | "new_message_received_accessibility_announcement" = "Primljena nova poruka";
38 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/id.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Muat Pesan Sebelumnya";
26 |
27 | "send" = "Kirim";
28 |
29 | "new_message" = "Pesan Baru";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/it.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Carica messaggi precedenti";
26 |
27 | "send" = "Invia";
28 |
29 | "new_message" = "Nuovo Messaggio";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/ja.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "古いメッセージを読み込む";
26 |
27 | "send" = "送信";
28 |
29 | "new_message" = "新しいメッセージ";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/ko.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "이전 메시지 불러오기";
26 |
27 | "send" = "전송";
28 |
29 | "new_message" = "새로운 메시지";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/ms.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Muat Turun Mesej Lama";
26 |
27 | "send" = "Hantar";
28 |
29 | "new_message" = "Mesej Baru";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/nb.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Last tidligere beskjeder";
26 |
27 | "send" = "Send";
28 |
29 | "new_message" = "Ny melding";
30 |
31 | "text_message_accessibility_label" = "%@: %@";
32 |
33 | "media_message_accessibility_label" = "%@: mediamelding";
34 |
35 | "accessory_button_accessibility_label" = "Del media";
36 |
37 | "new_message_received_accessibility_announcement" = "Ny melding mottatt";
38 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/nl.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Laad eerdere berichten";
26 |
27 | "send" = "Stuur";
28 |
29 | "new_message" = "Nieuw bericht";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/pl.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Otwórz wcześniejsze wiadomości";
26 |
27 | "send" = "Wyślij";
28 |
29 | "new_message" = "Nowa wiadomość";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/pt.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Carregar mensagens anteriores";
26 |
27 | "send" = "Enviar";
28 |
29 | "new_message" = "Nova Mensagem";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/ro.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Încărcați mesajele anterioare";
26 |
27 | "send" = "Trimiteți";
28 |
29 | "new_message" = "Mesaj nou";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/ru.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Предыдущие сообщения";
26 |
27 | "send" = "Отпр";
28 |
29 | "new_message" = "Сообщение";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/sv.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Visa tidigare meddelanden";
26 |
27 | "send" = "Skicka";
28 |
29 | "new_message" = "Nytt meddelande";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/th.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "โหลดข้อความก่อนหน้า";
26 |
27 | "send" = "ส่ง";
28 |
29 | "new_message" = "ข้อความใหม่";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/tr.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Eski mesajları yükle";
26 |
27 | "send" = "Gönder";
28 |
29 | "new_message" = "Yeni Mesaj";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/vi.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "Tải thêm tin nhắn";
26 |
27 | "send" = "Gửi";
28 |
29 | "new_message" = "Tin nhắn mới";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/zh-Hans.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "载入较早的信息";
26 |
27 | "send" = "发送";
28 |
29 | "new_message" = "新信息";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Assets/JSQMessagesAssets.bundle/zh-Hant.lproj/JSQMessages.strings:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | // ********************************
20 | // Special thanks to the localization contributors!
21 | //
22 | // https://github.com/jessesquires/JSQMessagesViewController/issues/237
23 | // ********************************
24 |
25 | "load_earlier_messages" = "載入之前的訊息";
26 |
27 | "send" = "傳送";
28 |
29 | "new_message" = "新信息";
30 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Categories/NSBundle+JSQMessages.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 |
21 | NS_ASSUME_NONNULL_BEGIN
22 |
23 | @interface NSBundle (JSQMessages)
24 |
25 | /**
26 | * @return The bundle for JSQMessagesViewController.
27 | */
28 | + (NSBundle *)jsq_messagesBundle;
29 |
30 | /**
31 | * @return The bundle for assets in JSQMessagesViewController.
32 | */
33 | + (NSBundle *)jsq_messagesAssetBundle;
34 |
35 | /**
36 | * Returns a localized version of the string designated by the specified key and residing in the JSQMessages table.
37 | *
38 | * @param key The key for a string in the JSQMessages table.
39 | *
40 | * @return A localized version of the string designated by key in the JSQMessages table.
41 | */
42 | + (nullable NSString *)jsq_localizedStringForKey:(NSString *)key;
43 |
44 | @end
45 |
46 | NS_ASSUME_NONNULL_END
47 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Categories/NSBundle+JSQMessages.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import "NSBundle+JSQMessages.h"
20 |
21 | #import "JSQMessagesViewController.h"
22 |
23 | @implementation NSBundle (JSQMessages)
24 |
25 | + (NSBundle *)jsq_messagesBundle
26 | {
27 | return [NSBundle bundleForClass:[JSQMessagesViewController class]];
28 | }
29 |
30 | + (NSBundle *)jsq_messagesAssetBundle
31 | {
32 | NSString *bundleResourcePath = [NSBundle jsq_messagesBundle].resourcePath;
33 | NSString *assetPath = [bundleResourcePath stringByAppendingPathComponent:@"JSQMessagesAssets.bundle"];
34 | return [NSBundle bundleWithPath:assetPath];
35 | }
36 |
37 | + (NSString *)jsq_localizedStringForKey:(NSString *)key
38 | {
39 | return NSLocalizedStringFromTableInBundle(key, @"JSQMessages", [NSBundle jsq_messagesAssetBundle], nil);
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Categories/NSString+JSQMessages.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 |
21 | NS_ASSUME_NONNULL_BEGIN
22 |
23 | @interface NSString (JSQMessages)
24 |
25 | /**
26 | * @return A copy of the receiver with all leading and trailing whitespace removed.
27 | */
28 | - (NSString *)jsq_stringByTrimingWhitespace;
29 |
30 | @end
31 |
32 | NS_ASSUME_NONNULL_END
33 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Categories/NSString+JSQMessages.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import "NSString+JSQMessages.h"
20 |
21 | @implementation NSString (JSQMessages)
22 |
23 | - (NSString *)jsq_stringByTrimingWhitespace
24 | {
25 | return [self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
26 | }
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Categories/UIColor+JSQMessages.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 |
21 | NS_ASSUME_NONNULL_BEGIN
22 |
23 | @interface UIColor (JSQMessages)
24 |
25 | #pragma mark - Message bubble colors
26 |
27 | /**
28 | * @return A color object containing HSB values similar to the iOS 7 messages app green bubble color.
29 | */
30 | + (UIColor *)jsq_messageBubbleGreenColor;
31 |
32 | /**
33 | * @return A color object containing HSB values similar to the iOS 7 messages app blue bubble color.
34 | */
35 | + (UIColor *)jsq_messageBubbleBlueColor;
36 |
37 | /**
38 | * @return A color object containing HSB values similar to the iOS 7 red color.
39 | */
40 | + (UIColor *)jsq_messageBubbleRedColor;
41 |
42 | /**
43 | * @return A color object containing HSB values similar to the iOS 7 messages app light gray bubble color.
44 | */
45 | + (UIColor *)jsq_messageBubbleLightGrayColor;
46 |
47 | #pragma mark - Utilities
48 |
49 | /**
50 | * Creates and returns a new color object whose brightness component is decreased by the given value, using the initial color values of the receiver.
51 | *
52 | * @param value A floating point value describing the amount by which to decrease the brightness of the receiver.
53 | *
54 | * @return A new color object whose brightness is decreased by the given values. The other color values remain the same as the receiver.
55 | */
56 | - (UIColor *)jsq_colorByDarkeningColorWithValue:(CGFloat)value;
57 |
58 | @end
59 |
60 | NS_ASSUME_NONNULL_END
61 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Categories/UIImage+JSQMessages.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 |
21 | NS_ASSUME_NONNULL_BEGIN
22 |
23 | @interface UIImage (JSQMessages)
24 |
25 | /**
26 | * Creates and returns a new image object that is masked with the specified mask color.
27 | *
28 | * @param maskColor The color value for the mask. This value must not be `nil`.
29 | *
30 | * @return A new image object masked with the specified color.
31 | */
32 | - (UIImage *)jsq_imageMaskedWithColor:(UIColor *)maskColor;
33 |
34 | /**
35 | * @return The regular message bubble image.
36 | */
37 | + (UIImage *)jsq_bubbleRegularImage;
38 |
39 | /**
40 | * @return The regular message bubble image without a tail.
41 | */
42 | + (UIImage *)jsq_bubbleRegularTaillessImage;
43 |
44 | /**
45 | * @return The regular message bubble image stroked, not filled.
46 | */
47 | + (UIImage *)jsq_bubbleRegularStrokedImage;
48 |
49 | /**
50 | * @return The regular message bubble image stroked, not filled and without a tail.
51 | */
52 | + (UIImage *)jsq_bubbleRegularStrokedTaillessImage;
53 |
54 | /**
55 | * @return The compact message bubble image.
56 | *
57 | * @discussion This is the default bubble image used by `JSQMessagesBubbleImageFactory`.
58 | */
59 | + (UIImage *)jsq_bubbleCompactImage;
60 |
61 | /**
62 | * @return The compact message bubble image without a tail.
63 | */
64 | + (UIImage *)jsq_bubbleCompactTaillessImage;
65 |
66 | /**
67 | * @return The default input toolbar accessory image.
68 | */
69 | + (UIImage *)jsq_defaultAccessoryImage;
70 |
71 | /**
72 | * @return The default typing indicator image.
73 | */
74 | + (UIImage *)jsq_defaultTypingIndicatorImage;
75 |
76 | /**
77 | * @return The default play icon image.
78 | */
79 | + (UIImage *)jsq_defaultPlayImage;
80 |
81 | /**
82 | * @return The default pause icon image.
83 | */
84 | + (UIImage *)jsq_defaultPauseImage;
85 |
86 | /**
87 | * @return The standard share icon image.
88 | *
89 | * @discussion This is the default icon for the message accessory button.
90 | */
91 | + (UIImage *)jsq_shareActionImage;
92 |
93 | @end
94 |
95 | NS_ASSUME_NONNULL_END
96 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Categories/UIView+JSQMessages.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 |
21 | NS_ASSUME_NONNULL_BEGIN
22 |
23 | @interface UIView (JSQMessages)
24 |
25 | /**
26 | * Pins the subview of the receiver to the edge of its frame, as specified by the given attribute, by adding a layout constraint.
27 | *
28 | * @param subview The subview to which the receiver will be pinned.
29 | * @param attribute The layout constraint attribute specifying one of `NSLayoutAttributeBottom`, `NSLayoutAttributeTop`, `NSLayoutAttributeLeading`, `NSLayoutAttributeTrailing`.
30 | */
31 | - (void)jsq_pinSubview:(UIView *)subview toEdge:(NSLayoutAttribute)attribute;
32 |
33 | /**
34 | * Pins all edges of the specified subview to the receiver.
35 | *
36 | * @param subview The subview to which the receiver will be pinned.
37 | */
38 | - (void)jsq_pinAllEdgesOfSubview:(UIView *)subview;
39 |
40 | @end
41 |
42 | NS_ASSUME_NONNULL_END
43 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Categories/UIView+JSQMessages.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import "UIView+JSQMessages.h"
20 |
21 | @implementation UIView (JSQMessages)
22 |
23 | - (void)jsq_pinSubview:(UIView *)subview toEdge:(NSLayoutAttribute)attribute
24 | {
25 | [self addConstraint:[NSLayoutConstraint constraintWithItem:self
26 | attribute:attribute
27 | relatedBy:NSLayoutRelationEqual
28 | toItem:subview
29 | attribute:attribute
30 | multiplier:1.0f
31 | constant:0.0f]];
32 | }
33 |
34 | - (void)jsq_pinAllEdgesOfSubview:(UIView *)subview
35 | {
36 | [self jsq_pinSubview:subview toEdge:NSLayoutAttributeBottom];
37 | [self jsq_pinSubview:subview toEdge:NSLayoutAttributeTop];
38 | [self jsq_pinSubview:subview toEdge:NSLayoutAttributeLeading];
39 | [self jsq_pinSubview:subview toEdge:NSLayoutAttributeTrailing];
40 | }
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Factories/JSQMessagesToolbarButtonFactory.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 | #import
21 |
22 | NS_ASSUME_NONNULL_BEGIN
23 |
24 | /**
25 | * `JSQMessagesToolbarButtonFactory` is a factory that provides a means for creating the default
26 | * toolbar button items to be displayed in the content view of a `JSQMessagesInputToolbar`.
27 | */
28 | @interface JSQMessagesToolbarButtonFactory : NSObject
29 |
30 | /**
31 | * Creates and returns a new instance of `JSQMessagesToolbarButtonFactory` that uses
32 | * the default font for creating buttons.
33 | *
34 | * @return An initialized `JSQMessagesToolbarButtonFactory` object.
35 | */
36 | - (instancetype)init;
37 |
38 | /**
39 | * Creates and returns a new instance of `JSQMessagesToolbarButtonFactory` that uses
40 | * the specified font for creating buttons.
41 | *
42 | * @param font The font that will be used for the buttons produced by the factory.
43 | *
44 | * @return An initialized `JSQMessagesToolbarButtonFactory` object.
45 | */
46 | - (instancetype)initWithFont:(UIFont *)font NS_DESIGNATED_INITIALIZER;
47 |
48 | /**
49 | * Creates and returns a new button that is styled as the default accessory button.
50 | * The button has a paper clip icon image and no text.
51 | *
52 | * @return A newly created button.
53 | */
54 | - (UIButton *)defaultAccessoryButtonItem;
55 |
56 | /**
57 | * Creates and returns a new button that is styled as the default send button.
58 | * The button has title text `@"Send"` and no image.
59 | *
60 | * @return A newly created button.
61 | */
62 | - (UIButton *)defaultSendButtonItem;
63 |
64 | @end
65 |
66 | NS_ASSUME_NONNULL_END
67 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Factories/JSQMessagesVideoThumbnailFactory.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import "JSQVideoMediaItem.h"
20 |
21 | #import "JSQMessagesVideoThumbnailFactory.h"
22 | #import "JSQMessagesBubbleImageFactory.h"
23 |
24 | #import "UIImage+JSQMessages.h"
25 |
26 | @implementation JSQMessagesVideoThumbnailFactory
27 |
28 | - (void)thumbnailWithVideoMediaAsset:(AVURLAsset *)asset
29 | completion:(JSQMessagesVideoThumbnailCompletionBlock)completion
30 | {
31 | NSParameterAssert(asset != nil);
32 | NSParameterAssert(completion != nil);
33 | [self thumbnailWithVideoMediaAsset:asset
34 | time:CMTimeMakeWithSeconds(1, 2)
35 | completion:completion];
36 | }
37 |
38 | - (void)thumbnailWithVideoMediaAsset:(AVURLAsset *)asset
39 | time:(CMTime)time
40 | completion:(JSQMessagesVideoThumbnailCompletionBlock)completion
41 | {
42 | NSParameterAssert(asset != nil);
43 | NSParameterAssert(completion != nil);
44 |
45 | AVAssetImageGenerator *generate = [[AVAssetImageGenerator alloc] initWithAsset:asset];
46 | generate.appliesPreferredTrackTransform = YES;
47 |
48 | if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
49 | generate.maximumSize = CGSizeMake(315.0f, 225.0f);
50 | }
51 | else {
52 | generate.maximumSize = CGSizeMake(210.0f, 150.0f);
53 | }
54 |
55 | NSArray *times = [NSArray arrayWithObject:[NSValue valueWithCMTime:time]];
56 | [generate generateCGImagesAsynchronouslyForTimes:times
57 | completionHandler:^(CMTime requestedTime, CGImageRef im, CMTime actualTime, AVAssetImageGeneratorResult result, NSError *error) {
58 |
59 | UIImage *image = (result == AVAssetImageGeneratorSucceeded) ? [UIImage imageWithCGImage:im] : nil;
60 | if (completion) {
61 | completion(image, error);
62 | }
63 | }];
64 | }
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/JSQMessages.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #ifndef JSQMessages_JSQMessages_h
20 | #define JSQMessages_JSQMessages_h
21 |
22 | #import "JSQMessagesViewController.h"
23 |
24 | // Views
25 | #import "JSQMessagesCollectionView.h"
26 | #import "JSQMessagesCollectionViewCellIncoming.h"
27 | #import "JSQMessagesCollectionViewCellOutgoing.h"
28 | #import "JSQMessagesTypingIndicatorFooterView.h"
29 | #import "JSQMessagesLoadEarlierHeaderView.h"
30 |
31 | // Layout
32 | #import "JSQMessagesBubbleSizeCalculating.h"
33 | #import "JSQMessagesBubblesSizeCalculator.h"
34 | #import "JSQMessagesCollectionViewFlowLayout.h"
35 | #import "JSQMessagesCollectionViewLayoutAttributes.h"
36 | #import "JSQMessagesCollectionViewFlowLayoutInvalidationContext.h"
37 | #import "JSQAudioMediaViewAttributes.h"
38 |
39 | // Toolbar
40 | #import "JSQMessagesComposerTextView.h"
41 | #import "JSQMessagesInputToolbar.h"
42 | #import "JSQMessagesToolbarContentView.h"
43 |
44 | // Model
45 | #import "JSQMessage.h"
46 |
47 | #import "JSQMediaItem.h"
48 | #import "JSQAudioMediaItem.h"
49 | #import "JSQPhotoMediaItem.h"
50 | #import "JSQLocationMediaItem.h"
51 | #import "JSQVideoMediaItem.h"
52 |
53 | #import "JSQMessagesBubbleImage.h"
54 | #import "JSQMessagesAvatarImage.h"
55 |
56 | #import "JSQAudioMediaViewAttributes.h"
57 |
58 | // Protocols
59 | #import "JSQMessageData.h"
60 | #import "JSQMessageMediaData.h"
61 | #import "JSQMessageAvatarImageDataSource.h"
62 | #import "JSQMessageBubbleImageDataSource.h"
63 | #import "JSQMessagesCollectionViewDataSource.h"
64 | #import "JSQMessagesCollectionViewDelegateFlowLayout.h"
65 | #import "JSQMessagesViewAccessoryButtonDelegate.h"
66 |
67 | // Factories
68 | #import "JSQMessagesAvatarImageFactory.h"
69 | #import "JSQMessagesBubbleImageFactory.h"
70 | #import "JSQMessagesMediaViewBubbleImageMasker.h"
71 | #import "JSQMessagesTimestampFormatter.h"
72 | #import "JSQMessagesToolbarButtonFactory.h"
73 |
74 | // Categories
75 | #import "NSString+JSQMessages.h"
76 | #import "UIColor+JSQMessages.h"
77 | #import "UIImage+JSQMessages.h"
78 | #import "UIView+JSQMessages.h"
79 | #import "NSBundle+JSQMessages.h"
80 |
81 | #endif
82 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Layout/JSQMessagesBubbleSizeCalculating.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 | #import
21 |
22 | @class JSQMessagesCollectionViewFlowLayout;
23 | @protocol JSQMessageData;
24 |
25 | NS_ASSUME_NONNULL_BEGIN
26 |
27 | /**
28 | * The `JSQMessagesBubbleSizeCalculating` protocol defines the common interface through which
29 | * an object provides layout information to an instance of `JSQMessagesCollectionViewFlowLayout`.
30 | *
31 | * A concrete class that conforms to this protocol is provided in the library.
32 | * See `JSQMessagesBubbleSizeCalculator`.
33 | */
34 | @protocol JSQMessagesBubbleSizeCalculating
35 |
36 | /**
37 | * Computes and returns the size of the `messageBubbleImageView` property
38 | * of a `JSQMessagesCollectionViewCell` for the specified messageData at indexPath.
39 | *
40 | * @param messageData A message data object.
41 | * @param indexPath The index path at which messageData is located.
42 | * @param layout The layout object asking for this information.
43 | *
44 | * @return A sizes that specifies the required dimensions to display the entire message contents.
45 | * Note, this is *not* the entire cell, but only its message bubble.
46 | */
47 | - (CGSize)messageBubbleSizeForMessageData:(id)messageData
48 | atIndexPath:(NSIndexPath *)indexPath
49 | withLayout:(JSQMessagesCollectionViewFlowLayout *)layout;
50 |
51 | /**
52 | * Notifies the receiver that the layout will be reset.
53 | * Use this method to clear any cached layout information, if necessary.
54 | *
55 | * @param layout The layout object notifying the receiver.
56 | */
57 | - (void)prepareForResettingLayout:(JSQMessagesCollectionViewFlowLayout *)layout;
58 |
59 | @end
60 |
61 | NS_ASSUME_NONNULL_END
62 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Layout/JSQMessagesBubblesSizeCalculator.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 |
21 | #import "JSQMessagesBubbleSizeCalculating.h"
22 |
23 | NS_ASSUME_NONNULL_BEGIN
24 |
25 | /**
26 | * An instance of `JSQMessagesBubblesSizeCalculator` is responsible for calculating
27 | * message bubble sizes for an instance of `JSQMessagesCollectionViewFlowLayout`.
28 | */
29 | @interface JSQMessagesBubblesSizeCalculator : NSObject
30 |
31 | /**
32 | * Initializes and returns a bubble size calculator with the given cache and minimumBubbleWidth.
33 | *
34 | * @param cache A cache object used to store layout information.
35 | * @param minimumBubbleWidth The minimum width for any given message bubble.
36 | * @param usesFixedWidthBubbles Specifies whether or not to use fixed-width bubbles.
37 | * If `NO` (the default), then bubbles will resize when rotating to landscape.
38 | *
39 | * @return An initialized `JSQMessagesBubblesSizeCalculator`.
40 | */
41 | - (nullable instancetype)initWithCache:(nonnull NSCache *)cache
42 | minimumBubbleWidth:(NSUInteger)minimumBubbleWidth
43 | usesFixedWidthBubbles:(BOOL)usesFixedWidthBubbles NS_DESIGNATED_INITIALIZER;
44 |
45 | @end
46 |
47 | NS_ASSUME_NONNULL_END
48 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Layout/JSQMessagesCollectionViewFlowLayoutInvalidationContext.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 |
21 | NS_ASSUME_NONNULL_BEGIN
22 |
23 | /**
24 | * A `JSQMessagesCollectionViewFlowLayoutInvalidationContext` object specifies properties for
25 | * determining whether to recompute the size of items or their position in the layout.
26 | * The flow layout object creates instances of this class when it needs to invalidate its contents
27 | * in response to changes. You can also create instances when invalidating the flow layout manually.
28 | *
29 | */
30 | @interface JSQMessagesCollectionViewFlowLayoutInvalidationContext : UICollectionViewFlowLayoutInvalidationContext
31 |
32 | /**
33 | * A boolean indicating whether to empty the messages layout information cache for items and views in the layout.
34 | * The default value is `NO`.
35 | */
36 | @property (nonatomic, assign) BOOL invalidateFlowLayoutMessagesCache;
37 |
38 | /**
39 | * Creates and returns a new `JSQMessagesCollectionViewFlowLayoutInvalidationContext` object.
40 | *
41 | * @discussion When you need to invalidate the `JSQMessagesCollectionViewFlowLayout` object for your
42 | * `JSQMessagesViewController` subclass, you should use this method to instantiate a new invalidation
43 | * context and pass this object to `invalidateLayoutWithContext:`.
44 | *
45 | * @return An initialized invalidation context object.
46 | */
47 | + (instancetype)context;
48 |
49 | @end
50 |
51 | NS_ASSUME_NONNULL_END
52 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Layout/JSQMessagesCollectionViewFlowLayoutInvalidationContext.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import "JSQMessagesCollectionViewFlowLayoutInvalidationContext.h"
20 |
21 | @implementation JSQMessagesCollectionViewFlowLayoutInvalidationContext
22 |
23 | #pragma mark - Initialization
24 |
25 | - (instancetype)init
26 | {
27 | self = [super init];
28 | if (self) {
29 | self.invalidateFlowLayoutDelegateMetrics = NO;
30 | self.invalidateFlowLayoutAttributes = NO;
31 | _invalidateFlowLayoutMessagesCache = NO;
32 | }
33 | return self;
34 | }
35 |
36 | + (instancetype)context
37 | {
38 | JSQMessagesCollectionViewFlowLayoutInvalidationContext *context = [[JSQMessagesCollectionViewFlowLayoutInvalidationContext alloc] init];
39 | context.invalidateFlowLayoutDelegateMetrics = YES;
40 | context.invalidateFlowLayoutAttributes = YES;
41 | return context;
42 | }
43 |
44 | #pragma mark - NSObject
45 |
46 | - (NSString *)description
47 | {
48 | return [NSString stringWithFormat:@"<%@: invalidateFlowLayoutDelegateMetrics=%@, invalidateFlowLayoutAttributes=%@, invalidateDataSourceCounts=%@, invalidateFlowLayoutMessagesCache=%@>",
49 | [self class], @(self.invalidateFlowLayoutDelegateMetrics), @(self.invalidateFlowLayoutAttributes), @(self.invalidateDataSourceCounts), @(self.invalidateFlowLayoutMessagesCache)];
50 | }
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Model/JSQMediaItem.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import "JSQMessageMediaData.h"
20 |
21 | NS_ASSUME_NONNULL_BEGIN
22 |
23 | /**
24 | * The `JSQMediaItem` class is an abstract base class for media item model objects that represents
25 | * a single media attachment for a user message. It provides some default behavior for media items,
26 | * including a default mediaViewDisplaySize, a default mediaPlaceholderView, and view masking as
27 | * specified by appliesMediaViewMaskAsOutgoing.
28 | *
29 | * @warning This class is intended to be subclassed. You should not use it directly.
30 | *
31 | * @see JSQLocationMediaItem.
32 | * @see JSQPhotoMediaItem.
33 | * @see JSQVideoMediaItem.
34 | */
35 | @interface JSQMediaItem : NSObject
36 |
37 | /**
38 | * A boolean value indicating whether this media item should apply
39 | * an outgoing or incoming bubble image mask to its media views.
40 | * Specify `YES` for an outgoing mask, and `NO` for an incoming mask.
41 | * The default value is `YES`.
42 | */
43 | @property (assign, nonatomic) BOOL appliesMediaViewMaskAsOutgoing;
44 |
45 | /**
46 | * Initializes and returns a media item with the specified value for maskAsOutgoing.
47 | *
48 | * @param maskAsOutgoing A boolean value indicating whether this media item should apply
49 | * an outgoing or incoming bubble image mask to its media views.
50 | *
51 | * @return An initialized `JSQMediaItem` object.
52 | */
53 | - (instancetype)initWithMaskAsOutgoing:(BOOL)maskAsOutgoing;
54 |
55 | /**
56 | * Clears any media view or media placeholder view that the item has cached.
57 | */
58 | - (void)clearCachedMediaViews;
59 |
60 | @end
61 |
62 | NS_ASSUME_NONNULL_END
63 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Model/JSQMessageAvatarImageDataSource.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 | #import
21 |
22 | NS_ASSUME_NONNULL_BEGIN
23 |
24 | /**
25 | * The `JSQMessageAvatarImageDataSource` protocol defines the common interface through which
26 | * a `JSQMessagesViewController` and `JSQMessagesCollectionView` interact with avatar image model objects.
27 | *
28 | * It declares the required and optional methods that a class must implement so that instances
29 | * of that class can be display properly within a `JSQMessagesCollectionViewCell`.
30 | *
31 | * A concrete class that conforms to this protocol is provided in the library. See `JSQMessagesAvatarImage`.
32 | *
33 | * @see JSQMessagesAvatarImage.
34 | */
35 | @protocol JSQMessageAvatarImageDataSource
36 |
37 | @required
38 |
39 | /**
40 | * @return The avatar image for a regular display state.
41 | *
42 | * @discussion You may return `nil` from this method while the image is being downloaded.
43 | */
44 | - (nullable UIImage *)avatarImage;
45 |
46 | /**
47 | * @return The avatar image for a highlighted display state.
48 | *
49 | * @discussion You may return `nil` from this method if this does not apply.
50 | */
51 | - (nullable UIImage *)avatarHighlightedImage;
52 |
53 | /**
54 | * @return A placeholder avatar image to be displayed if avatarImage is not yet available, or `nil`.
55 | * For example, if avatarImage needs to be downloaded, this placeholder image
56 | * will be used until avatarImage is not `nil`.
57 | *
58 | * @discussion If you do not need support for a placeholder image, that is, your images
59 | * are stored locally on the device, then you may simply return the same value as avatarImage here.
60 | *
61 | * @warning You must not return `nil` from this method.
62 | */
63 | - (UIImage *)avatarPlaceholderImage;
64 |
65 | @end
66 |
67 | NS_ASSUME_NONNULL_END
68 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Model/JSQMessageBubbleImageDataSource.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 | #import
21 |
22 | NS_ASSUME_NONNULL_BEGIN
23 |
24 | /**
25 | * The `JSQMessageBubbleImageDataSource` protocol defines the common interface through which
26 | * a `JSQMessagesViewController` and `JSQMessagesCollectionView` interact with
27 | * message bubble image model objects.
28 | *
29 | * It declares the required and optional methods that a class must implement so that instances
30 | * of that class can be display properly within a `JSQMessagesCollectionViewCell`.
31 | *
32 | * A concrete class that conforms to this protocol is provided in the library. See `JSQMessagesBubbleImage`.
33 | *
34 | * @see JSQMessagesBubbleImage.
35 | */
36 | @protocol JSQMessageBubbleImageDataSource
37 |
38 | @required
39 |
40 | /**
41 | * @return The message bubble image for a regular display state.
42 | *
43 | * @warning You must not return `nil` from this method.
44 | */
45 | - (UIImage *)messageBubbleImage;
46 |
47 | /**
48 | * @return The message bubble image for a highlighted display state.
49 | *
50 | * @warning You must not return `nil` from this method.
51 | */
52 | - (UIImage *)messageBubbleHighlightedImage;
53 |
54 | @end
55 |
56 | NS_ASSUME_NONNULL_END
57 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Model/JSQMessagesBubbleImage.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 | #import
21 |
22 | #import "JSQMessageBubbleImageDataSource.h"
23 |
24 | NS_ASSUME_NONNULL_BEGIN
25 |
26 | /**
27 | * A `JSQMessagesBubbleImage` model object represents a message bubble image, and is immutable.
28 | * This is a concrete class that implements the `JSQMessageBubbleImageDataSource` protocol.
29 | * It contains a regular message bubble image and a highlighted message bubble image.
30 | *
31 | * @see JSQMessagesBubbleImageFactory.
32 | */
33 | @interface JSQMessagesBubbleImage : NSObject
34 |
35 | /**
36 | * Returns the message bubble image for a regular display state.
37 | */
38 | @property (strong, nonatomic, readonly) UIImage *messageBubbleImage;
39 |
40 | /**
41 | * Returns the message bubble image for a highlighted display state.
42 | */
43 | @property (strong, nonatomic, readonly) UIImage *messageBubbleHighlightedImage;
44 |
45 | /**
46 | * Initializes and returns a message bubble image object having the specified regular image and highlighted image.
47 | *
48 | * @param image The regular message bubble image. This value must not be `nil`.
49 | * @param highlightedImage The highlighted message bubble image. This value must not be `nil`.
50 | *
51 | * @return An initialized `JSQMessagesBubbleImage` object.
52 | *
53 | * @see JSQMessagesBubbleImageFactory.
54 | */
55 | - (instancetype)initWithMessageBubbleImage:(UIImage *)image highlightedImage:(UIImage *)highlightedImage NS_DESIGNATED_INITIALIZER;
56 |
57 | /**
58 | * Not a valid initializer.
59 | */
60 | - (id)init NS_UNAVAILABLE;
61 |
62 | @end
63 |
64 | NS_ASSUME_NONNULL_END
65 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Model/JSQMessagesBubbleImage.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import "JSQMessagesBubbleImage.h"
20 |
21 | @implementation JSQMessagesBubbleImage
22 |
23 | #pragma mark - Initialization
24 |
25 | - (instancetype)initWithMessageBubbleImage:(UIImage *)image highlightedImage:(UIImage *)highlightedImage
26 | {
27 | NSParameterAssert(image != nil);
28 | NSParameterAssert(highlightedImage != nil);
29 |
30 | self = [super init];
31 | if (self) {
32 | _messageBubbleImage = image;
33 | _messageBubbleHighlightedImage = highlightedImage;
34 | }
35 | return self;
36 | }
37 |
38 | #pragma mark - NSObject
39 |
40 | - (NSString *)description
41 | {
42 | return [NSString stringWithFormat:@"<%@: messageBubbleImage=%@, messageBubbleHighlightedImage=%@>",
43 | [self class], self.messageBubbleImage, self.messageBubbleHighlightedImage];
44 | }
45 |
46 | - (id)debugQuickLookObject
47 | {
48 | return [[UIImageView alloc] initWithImage:self.messageBubbleImage highlightedImage:self.messageBubbleHighlightedImage];
49 | }
50 |
51 | #pragma mark - NSCopying
52 |
53 | - (instancetype)copyWithZone:(NSZone *)zone
54 | {
55 | return [[[self class] allocWithZone:zone] initWithMessageBubbleImage:[UIImage imageWithCGImage:self.messageBubbleImage.CGImage]
56 | highlightedImage:[UIImage imageWithCGImage:self.messageBubbleHighlightedImage.CGImage]];
57 | }
58 |
59 | @end
60 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Model/JSQMessagesViewAccessoryButtonDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | // Documentation
6 | // http://cocoadocs.org/docsets/JSQMessagesViewController
7 | //
8 | //
9 | // GitHub
10 | // https://github.com/jessesquires/JSQMessagesViewController
11 | //
12 | //
13 | // License
14 | // Copyright (c) 2014 Jesse Squires
15 | // Released under an MIT license: http://opensource.org/licenses/MIT
16 | //
17 |
18 | #import
19 |
20 | NS_ASSUME_NONNULL_BEGIN
21 |
22 | @class JSQMessagesCollectionView;
23 |
24 | /**
25 | * The `JSQMessagesViewAccessoryButtonDelegate` protocol defines methods that allow you to
26 | * handle accessory actions for the collection view.
27 | */
28 | @protocol JSQMessagesViewAccessoryButtonDelegate
29 |
30 | @required
31 |
32 | /**
33 | * Notifies the delegate that the accessory button at the specified indexPath did receive a tap event.
34 | *
35 | * @param messageView The collection view object that is notifying the delegate of the tap event.
36 | * @param path The index path of the item for which the accessory button was tapped.
37 | */
38 | - (void)messageView:(JSQMessagesCollectionView *)messageView didTapAccessoryButtonAtIndexPath:(NSIndexPath *)path;
39 |
40 | @end
41 |
42 | NS_ASSUME_NONNULL_END
43 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Model/JSQPhotoMediaItem.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import "JSQMediaItem.h"
20 |
21 | NS_ASSUME_NONNULL_BEGIN
22 |
23 | /**
24 | * The `JSQPhotoMediaItem` class is a concrete `JSQMediaItem` subclass that implements the `JSQMessageMediaData` protocol
25 | * and represents a photo media message. An initialized `JSQPhotoMediaItem` object can be passed
26 | * to a `JSQMediaMessage` object during its initialization to construct a valid media message object.
27 | * You may wish to subclass `JSQPhotoMediaItem` to provide additional functionality or behavior.
28 | */
29 | @interface JSQPhotoMediaItem : JSQMediaItem
30 |
31 | /**
32 | * The image for the photo media item. The default value is `nil`.
33 | */
34 | @property (copy, nonatomic, nullable) UIImage *image;
35 |
36 | /**
37 | * Initializes and returns a photo media item object having the given image.
38 | *
39 | * @param image The image for the photo media item. This value may be `nil`.
40 | *
41 | * @return An initialized `JSQPhotoMediaItem`.
42 | *
43 | * @discussion If the image must be dowloaded from the network,
44 | * you may initialize a `JSQPhotoMediaItem` object with a `nil` image.
45 | * Once the image has been retrieved, you can then set the image property.
46 | */
47 | - (instancetype)initWithImage:(nullable UIImage *)image;
48 |
49 | @end
50 |
51 | NS_ASSUME_NONNULL_END
52 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Views/JSQMessagesCellTextView.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 |
21 | /**
22 | * `JSQMessagesCellTextView` is a subclass of `UITextView` that is used to display text
23 | * in a `JSQMessagesCollectionViewCell`.
24 | */
25 | @interface JSQMessagesCellTextView : UITextView
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Views/JSQMessagesCollectionViewCellIncoming.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import "JSQMessagesCollectionViewCell.h"
20 |
21 | /**
22 | * A `JSQMessagesCollectionViewCellIncoming` object is a concrete instance
23 | * of `JSQMessagesCollectionViewCell` that represents an incoming message data item.
24 | */
25 | @interface JSQMessagesCollectionViewCellIncoming : JSQMessagesCollectionViewCell
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Views/JSQMessagesCollectionViewCellIncoming.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import "JSQMessagesCollectionViewCellIncoming.h"
20 |
21 | @implementation JSQMessagesCollectionViewCellIncoming
22 |
23 | #pragma mark - Overrides
24 |
25 | - (void)awakeFromNib
26 | {
27 | [super awakeFromNib];
28 | self.messageBubbleTopLabel.textAlignment = NSTextAlignmentLeft;
29 | self.cellBottomLabel.textAlignment = NSTextAlignmentLeft;
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Views/JSQMessagesCollectionViewCellOutgoing.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import "JSQMessagesCollectionViewCell.h"
20 |
21 | /**
22 | * A `JSQMessagesCollectionViewCellOutgoing` object is a concrete instance
23 | * of `JSQMessagesCollectionViewCell` that represents an outgoing message data item.
24 | */
25 | @interface JSQMessagesCollectionViewCellOutgoing : JSQMessagesCollectionViewCell
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Views/JSQMessagesCollectionViewCellOutgoing.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import "JSQMessagesCollectionViewCellOutgoing.h"
20 |
21 | @implementation JSQMessagesCollectionViewCellOutgoing
22 |
23 | #pragma mark - Overrides
24 |
25 | - (void)awakeFromNib
26 | {
27 | [super awakeFromNib];
28 | self.messageBubbleTopLabel.textAlignment = NSTextAlignmentRight;
29 | self.cellBottomLabel.textAlignment = NSTextAlignmentRight;
30 | }
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Views/JSQMessagesLabel.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 |
21 | /**
22 | * `JSQMessagesLabel` is a subclass of `UILabel` that adds support for a `textInsets` property,
23 | * which is similar to the `textContainerInset` property of `UITextView`.
24 | */
25 | @interface JSQMessagesLabel : UILabel
26 |
27 | /**
28 | * The inset of the text layout area within the label's content area. The default value is `UIEdgeInsetsZero`.
29 | *
30 | * @discussion This property provides text margins for the text laid out in the label.
31 | * The inset values provided must be greater than or equal to `0.0f`.
32 | */
33 | @property (assign, nonatomic) UIEdgeInsets textInsets;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Views/JSQMessagesLabel.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import "JSQMessagesLabel.h"
20 |
21 | @implementation JSQMessagesLabel
22 |
23 | #pragma mark - Initialization
24 |
25 | - (void)jsq_configureLabel
26 | {
27 | [self setTranslatesAutoresizingMaskIntoConstraints:NO];
28 | self.textInsets = UIEdgeInsetsZero;
29 | }
30 |
31 | - (instancetype)initWithFrame:(CGRect)frame
32 | {
33 | self = [super initWithFrame:frame];
34 | if (self) {
35 | [self jsq_configureLabel];
36 | }
37 | return self;
38 | }
39 |
40 | - (void)awakeFromNib
41 | {
42 | [super awakeFromNib];
43 | [self jsq_configureLabel];
44 | }
45 |
46 | #pragma mark - Setters
47 |
48 | - (void)setTextInsets:(UIEdgeInsets)textInsets
49 | {
50 | if (UIEdgeInsetsEqualToEdgeInsets(_textInsets, textInsets)) {
51 | return;
52 | }
53 |
54 | _textInsets = textInsets;
55 | [self setNeedsDisplay];
56 | }
57 |
58 | #pragma mark - Drawing
59 |
60 | - (void)drawTextInRect:(CGRect)rect
61 | {
62 | [super drawTextInRect:CGRectMake(CGRectGetMinX(rect) + self.textInsets.left,
63 | CGRectGetMinY(rect) + self.textInsets.top,
64 | CGRectGetWidth(rect) - self.textInsets.right,
65 | CGRectGetHeight(rect) - self.textInsets.bottom)];
66 | }
67 |
68 | @end
69 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Views/JSQMessagesLoadEarlierHeaderView.m:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 |
20 | #import "JSQMessagesLoadEarlierHeaderView.h"
21 |
22 | #import "NSBundle+JSQMessages.h"
23 |
24 |
25 | const CGFloat kJSQMessagesLoadEarlierHeaderViewHeight = 32.0f;
26 |
27 |
28 | @interface JSQMessagesLoadEarlierHeaderView ()
29 |
30 | @property (weak, nonatomic) IBOutlet UIButton *loadButton;
31 |
32 | @end
33 |
34 |
35 |
36 | @implementation JSQMessagesLoadEarlierHeaderView
37 |
38 | #pragma mark - Class methods
39 |
40 | + (UINib *)nib
41 | {
42 | return [UINib nibWithNibName:NSStringFromClass([JSQMessagesLoadEarlierHeaderView class])
43 | bundle:[NSBundle bundleForClass:[JSQMessagesLoadEarlierHeaderView class]]];
44 | }
45 |
46 | + (NSString *)headerReuseIdentifier
47 | {
48 | return NSStringFromClass([JSQMessagesLoadEarlierHeaderView class]);
49 | }
50 |
51 | #pragma mark - Initialization
52 |
53 | - (void)awakeFromNib
54 | {
55 | [super awakeFromNib];
56 | [self setTranslatesAutoresizingMaskIntoConstraints:NO];
57 |
58 | self.backgroundColor = [UIColor clearColor];
59 |
60 | [self.loadButton setTitle:[NSBundle jsq_localizedStringForKey:@"load_earlier_messages"] forState:UIControlStateNormal];
61 | self.loadButton.titleLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
62 | }
63 |
64 | - (void)dealloc
65 | {
66 | _loadButton = nil;
67 | _delegate = nil;
68 | }
69 |
70 | #pragma mark - Reusable view
71 |
72 | - (void)setBackgroundColor:(UIColor *)backgroundColor
73 | {
74 | [super setBackgroundColor:backgroundColor];
75 | self.loadButton.backgroundColor = backgroundColor;
76 | }
77 |
78 | #pragma mark - Actions
79 |
80 | - (IBAction)loadButtonPressed:(UIButton *)sender
81 | {
82 | [self.delegate headerView:self didPressLoadButton:sender];
83 | }
84 |
85 | @end
86 |
--------------------------------------------------------------------------------
/JSQMessagesViewController/Views/JSQMessagesTypingView.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by Jesse Squires
3 | // http://www.jessesquires.com
4 | //
5 | //
6 | // Documentation
7 | // http://cocoadocs.org/docsets/JSQMessagesViewController
8 | //
9 | //
10 | // GitHub
11 | // https://github.com/jessesquires/JSQMessagesViewController
12 | //
13 | //
14 | // License
15 | // Copyright (c) 2014 Jesse Squires
16 | // Released under an MIT license: http://opensource.org/licenses/MIT
17 | //
18 |
19 | #import
20 |
21 | // TODO: write documentation
22 | //
23 | // https://github.com/jessesquires/JSQMessagesViewController/issues/1647
24 | //
25 |
26 | NS_ASSUME_NONNULL_BEGIN
27 |
28 | @interface JSQMessagesTypingView : UIView
29 |
30 | @property (strong, nonatomic) UIColor *dotsColor;
31 |
32 | @property (strong, nonatomic) UIColor *animateToColor;
33 |
34 | @property (assign, nonatomic) CGFloat animationDuration;
35 |
36 | @property (assign, nonatomic) BOOL animated;
37 |
38 | @end
39 |
40 | NS_ASSUME_NONNULL_END
41 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | MIT License
3 | Copyright (c) 2013-present Jesse Squires
4 |
5 | http://www.jessesquires.com
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
8 | associated documentation files (the "Software"), to deal in the Software without restriction, including
9 | without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
11 | following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in
14 | all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
17 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
20 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/Screenshots/screenshot0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/Screenshots/screenshot0.png
--------------------------------------------------------------------------------
/Screenshots/screenshot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/Screenshots/screenshot1.png
--------------------------------------------------------------------------------
/Screenshots/screenshot2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/Screenshots/screenshot2.png
--------------------------------------------------------------------------------
/Screenshots/screenshot3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/Screenshots/screenshot3.png
--------------------------------------------------------------------------------
/SwiftExample/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | platform :ios, '9.0'
3 | # Uncomment this line if you're using Swift
4 | use_frameworks!
5 |
6 | target 'SwiftExample' do
7 | pod 'JSQMessagesViewController', :path => '../'
8 |
9 | end
10 |
11 | target 'SwiftExampleTests' do
12 | pod 'JSQMessagesViewController', :path => '../'
13 | end
14 |
--------------------------------------------------------------------------------
/SwiftExample/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - JSQMessagesViewController (7.3.4)
3 |
4 | DEPENDENCIES:
5 | - JSQMessagesViewController (from `../`)
6 |
7 | EXTERNAL SOURCES:
8 | JSQMessagesViewController:
9 | :path: ../
10 |
11 | SPEC CHECKSUMS:
12 | JSQMessagesViewController: c11b9e77372ab72c45c67311f6da7342e32df1e8
13 |
14 | PODFILE CHECKSUM: b51479be92e08cc1504a6937b0ded5693c7d1bd9
15 |
16 | COCOAPODS: 1.0.1
17 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Local Podspecs/JSQMessagesViewController.podspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "JSQMessagesViewController",
3 | "version": "7.3.4",
4 | "summary": "An elegant messages UI library for iOS.",
5 | "homepage": "http://jessesquires.github.io/JSQMessagesViewController",
6 | "license": "MIT",
7 | "platforms": {
8 | "ios": "7.0"
9 | },
10 | "authors": "Jesse Squires",
11 | "social_media_url": "https://twitter.com/jesse_squires",
12 | "screenshots": [
13 | "https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/develop/Screenshots/screenshot0.png",
14 | "https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/develop/Screenshots/screenshot1.png",
15 | "https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/develop/Screenshots/screenshot2.png",
16 | "https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/develop/Screenshots/screenshot3.png"
17 | ],
18 | "source": {
19 | "git": "https://github.com/jessesquires/JSQMessagesViewController.git",
20 | "tag": "7.3.4"
21 | },
22 | "source_files": "JSQMessagesViewController/**/*.{h,m}",
23 | "resources": [
24 | "JSQMessagesViewController/Assets/JSQMessagesAssets.bundle",
25 | "JSQMessagesViewController/**/*.{xib}"
26 | ],
27 | "frameworks": [
28 | "QuartzCore",
29 | "CoreGraphics",
30 | "CoreLocation",
31 | "MapKit",
32 | "MobileCoreServices",
33 | "AVFoundation"
34 | ],
35 | "requires_arc": true
36 | }
37 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - JSQMessagesViewController (7.3.4)
3 |
4 | DEPENDENCIES:
5 | - JSQMessagesViewController (from `../`)
6 |
7 | EXTERNAL SOURCES:
8 | JSQMessagesViewController:
9 | :path: ../
10 |
11 | SPEC CHECKSUMS:
12 | JSQMessagesViewController: c11b9e77372ab72c45c67311f6da7342e32df1e8
13 |
14 | PODFILE CHECKSUM: b51479be92e08cc1504a6937b0ded5693c7d1bd9
15 |
16 | COCOAPODS: 1.0.1
17 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/JSQMessagesViewController/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 7.3.4
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/JSQMessagesViewController/JSQMessagesViewController-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_JSQMessagesViewController : NSObject
3 | @end
4 | @implementation PodsDummy_JSQMessagesViewController
5 | @end
6 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/JSQMessagesViewController/JSQMessagesViewController-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/JSQMessagesViewController/JSQMessagesViewController-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "NSBundle+JSQMessages.h"
4 | #import "NSString+JSQMessages.h"
5 | #import "UIColor+JSQMessages.h"
6 | #import "UIImage+JSQMessages.h"
7 | #import "UIView+JSQMessages.h"
8 | #import "JSQMessagesViewController.h"
9 | #import "JSQMessagesAvatarImageFactory.h"
10 | #import "JSQMessagesBubbleImageFactory.h"
11 | #import "JSQMessagesMediaViewBubbleImageMasker.h"
12 | #import "JSQMessagesTimestampFormatter.h"
13 | #import "JSQMessagesToolbarButtonFactory.h"
14 | #import "JSQMessages.h"
15 | #import "JSQAudioMediaViewAttributes.h"
16 | #import "JSQMessagesBubbleSizeCalculating.h"
17 | #import "JSQMessagesBubblesSizeCalculator.h"
18 | #import "JSQMessagesCollectionViewFlowLayout.h"
19 | #import "JSQMessagesCollectionViewFlowLayoutInvalidationContext.h"
20 | #import "JSQMessagesCollectionViewLayoutAttributes.h"
21 | #import "JSQAudioMediaItem.h"
22 | #import "JSQLocationMediaItem.h"
23 | #import "JSQMediaItem.h"
24 | #import "JSQMessage.h"
25 | #import "JSQMessageAvatarImageDataSource.h"
26 | #import "JSQMessageBubbleImageDataSource.h"
27 | #import "JSQMessageData.h"
28 | #import "JSQMessageMediaData.h"
29 | #import "JSQMessagesAvatarImage.h"
30 | #import "JSQMessagesBubbleImage.h"
31 | #import "JSQMessagesCollectionViewDataSource.h"
32 | #import "JSQMessagesCollectionViewDelegateFlowLayout.h"
33 | #import "JSQMessagesViewAccessoryButtonDelegate.h"
34 | #import "JSQPhotoMediaItem.h"
35 | #import "JSQVideoMediaItem.h"
36 | #import "JSQMessagesCellTextView.h"
37 | #import "JSQMessagesCollectionView.h"
38 | #import "JSQMessagesCollectionViewCell.h"
39 | #import "JSQMessagesCollectionViewCellIncoming.h"
40 | #import "JSQMessagesCollectionViewCellOutgoing.h"
41 | #import "JSQMessagesComposerTextView.h"
42 | #import "JSQMessagesInputToolbar.h"
43 | #import "JSQMessagesLabel.h"
44 | #import "JSQMessagesLoadEarlierHeaderView.h"
45 | #import "JSQMessagesMediaPlaceholderView.h"
46 | #import "JSQMessagesToolbarContentView.h"
47 | #import "JSQMessagesTypingIndicatorFooterView.h"
48 | #import "JSQMessagesTypingView.h"
49 |
50 | FOUNDATION_EXPORT double JSQMessagesViewControllerVersionNumber;
51 | FOUNDATION_EXPORT const unsigned char JSQMessagesViewControllerVersionString[];
52 |
53 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/JSQMessagesViewController/JSQMessagesViewController.modulemap:
--------------------------------------------------------------------------------
1 | framework module JSQMessagesViewController {
2 | umbrella header "JSQMessagesViewController-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/JSQMessagesViewController/JSQMessagesViewController.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/JSQMessagesViewController
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public"
4 | OTHER_LDFLAGS = -framework "AVFoundation" -framework "CoreGraphics" -framework "CoreLocation" -framework "MapKit" -framework "MobileCoreServices" -framework "QuartzCore"
5 | PODS_BUILD_DIR = $BUILD_DIR
6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## JSQMessagesViewController
5 |
6 |
7 | MIT License
8 | Copyright (c) 2013-present Jesse Squires
9 |
10 | http://www.jessesquires.com
11 |
12 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
13 | associated documentation files (the "Software"), to deal in the Software without restriction, including
14 | without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 | copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
16 | following conditions:
17 |
18 | The above copyright notice and this permission notice shall be included in
19 | all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
22 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
24 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
25 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 |
27 | Generated by CocoaPods - https://cocoapods.org
28 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 |
18 | MIT License
19 | Copyright (c) 2013-present Jesse Squires
20 |
21 | http://www.jessesquires.com
22 |
23 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
24 | associated documentation files (the "Software"), to deal in the Software without restriction, including
25 | without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
26 | copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
27 | following conditions:
28 |
29 | The above copyright notice and this permission notice shall be included in
30 | all copies or substantial portions of the Software.
31 |
32 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
33 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
34 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
35 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
36 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37 |
38 | Title
39 | JSQMessagesViewController
40 | Type
41 | PSGroupSpecifier
42 |
43 |
44 | FooterText
45 | Generated by CocoaPods - https://cocoapods.org
46 | Title
47 |
48 | Type
49 | PSGroupSpecifier
50 |
51 |
52 | StringsTable
53 | Acknowledgements
54 | Title
55 | Acknowledgements
56 |
57 |
58 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_SwiftExample : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_SwiftExample
5 | @end
6 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExample/Pods-SwiftExample-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 |
4 | FOUNDATION_EXPORT double Pods_SwiftExampleVersionNumber;
5 | FOUNDATION_EXPORT const unsigned char Pods_SwiftExampleVersionString[];
6 |
7 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExample/Pods-SwiftExample.debug.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/JSQMessagesViewController"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/JSQMessagesViewController/JSQMessagesViewController.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -framework "JSQMessagesViewController"
6 | PODS_BUILD_DIR = $BUILD_DIR
7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}/Pods
9 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExample/Pods-SwiftExample.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_SwiftExample {
2 | umbrella header "Pods-SwiftExample-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExample/Pods-SwiftExample.release.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/JSQMessagesViewController"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/JSQMessagesViewController/JSQMessagesViewController.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -framework "JSQMessagesViewController"
6 | PODS_BUILD_DIR = $BUILD_DIR
7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}/Pods
9 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExampleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | ${PRODUCT_BUNDLE_IDENTIFIER}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExampleTests/Pods-SwiftExampleTests-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## JSQMessagesViewController
5 |
6 |
7 | MIT License
8 | Copyright (c) 2013-present Jesse Squires
9 |
10 | http://www.jessesquires.com
11 |
12 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
13 | associated documentation files (the "Software"), to deal in the Software without restriction, including
14 | without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 | copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
16 | following conditions:
17 |
18 | The above copyright notice and this permission notice shall be included in
19 | all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
22 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
24 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
25 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 |
27 | Generated by CocoaPods - https://cocoapods.org
28 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExampleTests/Pods-SwiftExampleTests-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 |
18 | MIT License
19 | Copyright (c) 2013-present Jesse Squires
20 |
21 | http://www.jessesquires.com
22 |
23 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
24 | associated documentation files (the "Software"), to deal in the Software without restriction, including
25 | without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
26 | copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
27 | following conditions:
28 |
29 | The above copyright notice and this permission notice shall be included in
30 | all copies or substantial portions of the Software.
31 |
32 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
33 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
34 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
35 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
36 | OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37 |
38 | Title
39 | JSQMessagesViewController
40 | Type
41 | PSGroupSpecifier
42 |
43 |
44 | FooterText
45 | Generated by CocoaPods - https://cocoapods.org
46 | Title
47 |
48 | Type
49 | PSGroupSpecifier
50 |
51 |
52 | StringsTable
53 | Acknowledgements
54 | Title
55 | Acknowledgements
56 |
57 |
58 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExampleTests/Pods-SwiftExampleTests-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_SwiftExampleTests : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_SwiftExampleTests
5 | @end
6 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExampleTests/Pods-SwiftExampleTests-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 |
4 | FOUNDATION_EXPORT double Pods_SwiftExampleTestsVersionNumber;
5 | FOUNDATION_EXPORT const unsigned char Pods_SwiftExampleTestsVersionString[];
6 |
7 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExampleTests/Pods-SwiftExampleTests.debug.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/JSQMessagesViewController"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/JSQMessagesViewController/JSQMessagesViewController.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -framework "JSQMessagesViewController"
6 | PODS_BUILD_DIR = $BUILD_DIR
7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}/Pods
9 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExampleTests/Pods-SwiftExampleTests.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_SwiftExampleTests {
2 | umbrella header "Pods-SwiftExampleTests-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/SwiftExample/Pods/Target Support Files/Pods-SwiftExampleTests/Pods-SwiftExampleTests.release.xcconfig:
--------------------------------------------------------------------------------
1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/JSQMessagesViewController"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/JSQMessagesViewController/JSQMessagesViewController.framework/Headers"
5 | OTHER_LDFLAGS = $(inherited) -framework "JSQMessagesViewController"
6 | PODS_BUILD_DIR = $BUILD_DIR
7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}/Pods
9 |
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // SwiftExample
4 | //
5 | // Created by Dan Leonard on 5/8/16.
6 | // Copyright © 2016 MacMeDan. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
24 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-167.png
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-29.png
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-29@2x-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-29@2x-1.png
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-29@2x.png
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-29@3x.png
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-40.png
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-76.png
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/icon40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/9343b8fc8c1c9bc51ecb33f291a15d48dc711f02/SwiftExample/SwiftExample/Assets.xcassets/AppIcon.appiconset/icon40@3x.png
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Conversation.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Conversation.swift
3 | // SwiftExample
4 | //
5 | // Created by Dan Leonard on 5/11/16.
6 | // Copyright © 2016 MacMeDan. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | struct Conversation {
12 | let firstName: String?
13 | let lastName: String?
14 | let preferredName: String?
15 | let smsNumber: String
16 | let id: String?
17 | let latestMessage: String?
18 | let isRead: Bool
19 | }
20 |
--------------------------------------------------------------------------------
/SwiftExample/SwiftExample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/SwiftExample/SwiftExampleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/SwiftExample/SwiftExampleTests/SettingsTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SettingsTests.swift
3 | // SwiftExample
4 | //
5 | // Created by P D Leonard on 7/23/16.
6 | // Copyright © 2016 MacMeDan. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | @testable import SwiftExample
11 |
12 | class SettingsTests: XCTestCase {
13 |
14 | let settingsView = SettingsTableViewController()
15 |
16 | override func setUp() {
17 | super.setUp()
18 | }
19 |
20 | func testSettingsView() {
21 | let _ = settingsView.view
22 | XCTAssertEqual(settingsView.tableView.numberOfRows(inSection: 0), 3)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------