A messages UI for iPhone and iPad.
JSMessagesViewController
is a UIViewController
subclass that is very similar to the iOS Messages app.
Note: this is only a messaging UI, not a messaging app.
See more screenshots in the Screenshots/
directory.
- Highly customizable
- Arbitrary message sizes
- Copy & paste messages
- Support for group messages
- Data detectors (recognizes phone numbers, links, dates, etc.)
- Timestamps
- Avatars
- Subtitles
- Lots of bubble styles, or use your own!
- Swipe down to hide keyboard
- Dynamically resizes input text view as you type
- Smooth animations
- Automatically enables/disables send button (if text view is empty or not)
- Send/Receive sound effects
- Storyboards support (if that's how you roll)
- Universal for iPhone and iPad
- iOS 6.0+
- ARC
From CocoaPods
pod 'JSMessagesViewController'
- Drag the
JSMessagesViewController/
folder to your project. - Add the
AudioToolbox.framework
to your project, if you want to use the sound effects
Too cool for ARC?
- Add the
-fobjc-arc
compiler flag to all source files in your project in Target Settings > Build Phases > Compile Sources.
- Subclass
JSMessagesViewController
- Setup your
viewDidLoad
like the following:
- (void)viewDidLoad
{
self.delegate = self;
self.dataSource = self;
[super viewDidLoad];
self.title = @"Messages";
self.messageInputView.textView.placeHolder = @"New Message";
}
- Implement the
JSMessagesViewDelegate
protocol - Implement the
JSMessagesViewDataSource
protocol - Implement
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
from theUITableViewDataSource
protocol. - Present your subclassed ViewController programatically or via StoryBoards. Your subclass should be the
rootViewController
of aUINavigationController
. - Be a badass programming-motherfucker and read the fucking documentation. (Yes, there's documentation! Seriously!)
- See the included demo project:
JSMessagesDemo.xcodeproj
Documentation is available here via CocoaDocs. Thanks @CocoaDocs!
Stuff here coming soon!
- Find an issue to work on, or create a new one.
- Fork me.
- Create a new branch with a sweet fucking name:
git checkout -b issue_<##>_<featureOrFix>
. - Do some motherfucking programming.
- Keep your code nice and clean by adhering to Google's Objective-C Style Guide and Apple's Coding Guidelines for Cocoa.
- Don't break shit, especially
master
. - Update the documentation header comments.
- Update the pod spec and project version numbers, adhering to the semantic versioning specification.
- Submit a pull request.
- See step 1.
Created by @jesse_squires, a programming-motherfucker.
Assets extracted using @0xced / iOS-Artwork-Extractor.
Originally inspired by @soffes / SSMessagingViewController.
Many thanks to the contributors of this project.
Square message bubbles designed by @michaelschultz.
I initially developed this control to use in Hemoglobe for private messages between users.
As it turns out, messaging is a popular thing that iOS devs want to do — I know, this is shocking. Thus, I am supporting this project in my free time and have added features way beyond what Hemoglobe ever needed.
Check out my work at Hexed Bits.
Contact me to have your app listed here.
You are free to use this as you please. No attribution necessary, but much appreciated.
Copyright © 2013 Jesse Squires
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.