___FILEBASENAME___.m 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. //
  2. // ___FILENAME___
  3. // ___PROJECTNAME___
  4. //
  5. // Created by ___FULLUSERNAME___ on ___DATE___.
  6. //___COPYRIGHT___
  7. //
  8. #import "___FILEBASENAME___.h"
  9. @interface ___FILEBASENAMEASIDENTIFIER___ ()
  10. @end
  11. @implementation ___FILEBASENAMEASIDENTIFIER___
  12. #pragma mark - Initializer
  13. - (id)init
  14. {
  15. #warning Potentially incomplete method implementation.
  16. self = [super initWithTableViewStyle:<#(UITableViewStyle)#>];
  17. if (self) {
  18. }
  19. return self;
  20. }
  21. /*
  22. // Uncomment if you are using Storyboard.
  23. // You don't need to call initWithCoder: anymore
  24. + (UITableViewStyle)tableViewStyleForCoder:(NSCoder *)decoder
  25. {
  26. return <#(UITableViewStyle)#>;
  27. }
  28. */
  29. #pragma mark - View lifecycle
  30. - (void)viewDidLoad
  31. {
  32. [super viewDidLoad];
  33. // Do view setup here.
  34. }
  35. #pragma mark - SLKTextViewController Events
  36. - (void)didChangeKeyboardStatus:(SLKKeyboardStatus)status
  37. {
  38. // Notifies the view controller that the keyboard changed status.
  39. // Calling super does nothing
  40. }
  41. - (void)textWillUpdate
  42. {
  43. // Notifies the view controller that the text will update.
  44. // Calling super does nothing
  45. [super textWillUpdate];
  46. }
  47. - (void)textDidUpdate:(BOOL)animated
  48. {
  49. // Notifies the view controller that the text did update.
  50. // Must call super
  51. [super textDidUpdate:animated];
  52. }
  53. - (BOOL)canPressRightButton
  54. {
  55. // Asks if the right button can be pressed
  56. return [super canPressRightButton];
  57. }
  58. - (void)didPressRightButton:(id)sender
  59. {
  60. // Notifies the view controller when the right button's action has been triggered, manually or by using the keyboard return key.
  61. // Must call super
  62. // This little trick validates any pending auto-correction or auto-spelling just after hitting the 'Send' button
  63. [self.textView refreshFirstResponder];
  64. [super didPressRightButton:sender];
  65. }
  66. /*
  67. // Uncomment these methods for aditional events
  68. - (void)didPressLeftButton:(id)sender
  69. {
  70. // Notifies the view controller when the left button's action has been triggered, manually.
  71. [super didPressLeftButton:sender];
  72. }
  73. - (id)keyForTextCaching
  74. {
  75. // Return any valid key object for enabling text caching while composing in the text view.
  76. // Calling super does nothing
  77. }
  78. - (void)didPasteMediaContent:(NSDictionary *)userInfo
  79. {
  80. // Notifies the view controller when a user did paste a media content inside of the text view
  81. // Calling super does nothing
  82. }
  83. - (void)willRequestUndo
  84. {
  85. // Notification about when a user did shake the device to undo the typed text
  86. [super willRequestUndo];
  87. }
  88. */
  89. #pragma mark - SLKTextViewController Edition
  90. /*
  91. // Uncomment these methods to enable edit mode
  92. - (void)didCommitTextEditing:(id)sender
  93. {
  94. // Notifies the view controller when tapped on the right "Accept" button for commiting the edited text
  95. [super didCommitTextEditing:sender];
  96. }
  97. - (void)didCancelTextEditing:(id)sender
  98. {
  99. // Notifies the view controller when tapped on the left "Cancel" button
  100. [super didCancelTextEditing:sender];
  101. }
  102. */
  103. #pragma mark - SLKTextViewController Autocompletion
  104. /*
  105. // Uncomment these methods to enable autocompletion mode
  106. - (BOOL)canShowAutoCompletion
  107. {
  108. // Asks of the autocompletion view should be shown
  109. return NO;
  110. }
  111. - (CGFloat)heightForAutoCompletionView
  112. {
  113. // Asks for the height of the autocompletion view
  114. return 0.0;
  115. }
  116. */
  117. #pragma mark - <UITableViewDataSource>
  118. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  119. {
  120. #warning Potentially incomplete method implementation.
  121. // Returns the number of sections.
  122. return 0;
  123. }
  124. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  125. {
  126. #warning Incomplete method implementation.
  127. // Returns the number of rows in the section.
  128. if ([tableView isEqual:self.autoCompletionView]) {
  129. return 0;
  130. }
  131. return 0;
  132. }
  133. /*
  134. // Uncomment these methods to configure the cells
  135. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  136. {
  137. UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath];
  138. if ([tableView isEqual:self.autoCompletionView]) {
  139. // Configure the autocompletion cell...
  140. }
  141. else if ([tableView isEqual:self.tableView]) {
  142. // Configure the message cell...
  143. }
  144. return cell;
  145. }
  146. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
  147. {
  148. // Returns the height each row
  149. if ([tableView isEqual:self.autoCompletionView]) {
  150. return 0;
  151. }
  152. return 0;
  153. }
  154. */
  155. #pragma mark - <UITableViewDelegate>
  156. /*
  157. // Uncomment this method to handle the cell selection
  158. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  159. {
  160. if ([tableView isEqual:self.tableView]) {
  161. }
  162. if ([tableView isEqual:self.autoCompletionView]) {
  163. [self acceptAutoCompletionWithString:<#@"any_string"#>];
  164. }
  165. }
  166. */
  167. #pragma mark - View lifeterm
  168. - (void)didReceiveMemoryWarning
  169. {
  170. [super didReceiveMemoryWarning];
  171. }
  172. - (void)dealloc
  173. {
  174. }
  175. @end