mirror of
https://github.com/zhigang1992/MessagesTableViewController.git
synced 2026-04-28 20:24:57 +08:00
i hate markdown
This commit is contained in:
14
README.md
14
README.md
@@ -54,7 +54,7 @@ Square message bubbles designed by [@michaelschultz](http://www.twitter.com/mich
|
||||
* 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: `[JSMessageSoundEffect playMessageSentSound]` or `[JSMessageSoundEffect playMessageReceivedSound]`
|
||||
|
||||
<br />
|
||||
* `- (JSBubbleMessageStyle)messageStyleForRowAtIndexPath:(NSIndexPath *)indexPath`
|
||||
* The style of the bubble for this row, options are:
|
||||
* `JSBubbleMessageStyleIncomingDefault`
|
||||
@@ -62,7 +62,7 @@ Square message bubbles designed by [@michaelschultz](http://www.twitter.com/mich
|
||||
* `JSBubbleMessageStyleOutgoingDefault`
|
||||
* `JSBubbleMessageStyleOutgoingDefaultGreen`
|
||||
* `JSBubbleMessageStyleOutgoingSquare`
|
||||
|
||||
<br />
|
||||
* `- (JSMessagesViewTimestampPolicy)timestampPolicyForMessagesView`
|
||||
* How/when to display timestamps for messages, options are:
|
||||
* `JSMessagesViewTimestampPolicyAll`
|
||||
@@ -70,7 +70,7 @@ Square message bubbles designed by [@michaelschultz](http://www.twitter.com/mich
|
||||
* `JSMessagesViewTimestampPolicyEveryThree`
|
||||
* `JSMessagesViewTimestampPolicyEveryFive`
|
||||
* `JSMessagesViewTimestampPolicyCustom`
|
||||
|
||||
<br />
|
||||
* `- (BOOL)hasTimestampForRowAtIndexPath:(NSIndexPath *)indexPath`
|
||||
* Returns if this row should display a timestamp or not, based on the value returned from the above method
|
||||
* If using a built-in timestamp policy, simply return `[self shouldHaveTimestampForRowAtIndexPath:indexPath]`
|
||||
@@ -80,10 +80,10 @@ Square message bubbles designed by [@michaelschultz](http://www.twitter.com/mich
|
||||
|
||||
* `- (NSString *)textForRowAtIndexPath:(NSIndexPath *)indexPath`
|
||||
* The text to be displayed for this row
|
||||
|
||||
<br />
|
||||
* `- (NSDate *)timestampForRowAtIndexPath:(NSIndexPath *)indexPath`
|
||||
* The timestamp to be displayed *above* this row
|
||||
|
||||
|
||||
#####Implement the [table view data source][ref1] method that you should be familiar with
|
||||
|
||||
* `- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section`
|
||||
@@ -96,12 +96,12 @@ Square message bubbles designed by [@michaelschultz](http://www.twitter.com/mich
|
||||
* Override `- (void)setupSendButton`
|
||||
* `#import` this category in your `JSMessagesViewController` subclass
|
||||
|
||||
#### Notes
|
||||
##### Notes
|
||||
|
||||
* You may present view programmatically, or use Storyboards
|
||||
* Your `JSMessagesViewController` subclass **must** be presented in a `UINavigationController`
|
||||
|
||||
#### Demo projects included
|
||||
##### Demo projects included
|
||||
|
||||
* `MessagesDemo.xcodeproj` for example of programmatic presentation
|
||||
* `MessagesDemoStoryboards/MessagesDemoSB.xcodeproj` for example of use with Storyboards
|
||||
|
||||
Reference in New Issue
Block a user