mirror of
https://github.com/zhigang1992/MessagesTableViewController.git
synced 2026-04-23 20:00:07 +08:00
readme
This commit is contained in:
@@ -30,11 +30,6 @@
|
||||
}
|
||||
|
||||
#pragma mark - Table view data source
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return self.messages.count;
|
||||
|
||||
12
README.md
12
README.md
@@ -23,9 +23,9 @@ Notable changes from [SSMessagingViewController][1]:
|
||||
* Drag the `MessagesTableViewController/` folder to your project.
|
||||
* Add the `AudioToolbox.framework` to your project, if you want to use the sound effects
|
||||
* Subclass `MessagesViewController`
|
||||
* Override the follow methods from `MessagesViewController`:
|
||||
* Override the following methods:
|
||||
* `- (BubbleMessageStyle)messageStyleForRowAtIndexPath:(NSIndexPath *)indexPath`
|
||||
* The style for the bubble for this row
|
||||
* The style of the bubble for this row
|
||||
* Style options are: `BubbleMessageStyleOutgoing` or `BubbleMessageStyleIncoming`
|
||||
* `- (NSString *)textForRowAtIndexPath:(NSIndexPath *)indexPath`
|
||||
* The text to be displayed for this row
|
||||
@@ -33,13 +33,13 @@ Notable changes from [SSMessagingViewController][1]:
|
||||
* Hook into your own backend here
|
||||
* Call `[self finishSend]` at the end of this method to animate and reset the text input view
|
||||
* Optionally play sound effects with `[MessageSoundEffect playMessageSentSound]` or `[MessageSoundEffect playMessageReceivedSound]`
|
||||
|
||||
* And as usual, override *at least* the following Table View Data Source Methods:
|
||||
* `- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView`
|
||||
* `- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section`
|
||||
|
||||
## Related Projects
|
||||
|
||||
[SSMessagingViewController][1]
|
||||
|
||||
[AcaniChat](https://github.com/acani/AcaniChat)
|
||||
|
||||
|
||||
## License
|
||||
@@ -56,4 +56,4 @@ The above copyright notice and this permission notice shall be included in all c
|
||||
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.
|
||||
|
||||
|
||||
[1]:https://github.com/soffes/ssmessagesviewcontroller
|
||||
[1]:https://github.com/soffes/ssmessagesviewcontroller
|
||||
Reference in New Issue
Block a user