|
1 /* |
|
2 * Hedgewars-iOS, a Hedgewars port for iOS devices |
|
3 * Copyright (c) 2015-2016 Anton Malmygin <antonc27@mail.ru> |
|
4 * |
|
5 * This program is free software; you can redistribute it and/or modify |
|
6 * it under the terms of the GNU General Public License as published by |
|
7 * the Free Software Foundation; version 2 of the License |
|
8 * |
|
9 * This program is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 * GNU General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU General Public License |
|
15 * along with this program; if not, write to the Free Software |
|
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
17 */ |
|
18 |
|
19 #import "CampaignsViewController.h" |
|
20 |
|
21 @interface CampaignsViewController () |
|
22 |
|
23 @end |
|
24 |
|
25 @implementation CampaignsViewController |
|
26 |
|
27 - (void)viewDidLoad { |
|
28 [super viewDidLoad]; |
|
29 |
|
30 UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(dismiss)]; |
|
31 self.navigationItem.leftBarButtonItem = doneButton; |
|
32 [doneButton release]; |
|
33 } |
|
34 |
|
35 - (void)dismiss { |
|
36 [self.navigationController.presentingViewController dismissViewControllerAnimated:YES completion:nil]; |
|
37 } |
|
38 |
|
39 - (void)didReceiveMemoryWarning { |
|
40 [super didReceiveMemoryWarning]; |
|
41 // Dispose of any resources that can be recreated. |
|
42 } |
|
43 |
|
44 #pragma mark - Table view data source |
|
45 |
|
46 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { |
|
47 #warning Incomplete implementation, return the number of sections |
|
48 return 0; |
|
49 } |
|
50 |
|
51 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { |
|
52 #warning Incomplete implementation, return the number of rows |
|
53 return 0; |
|
54 } |
|
55 |
|
56 /* |
|
57 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
|
58 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:<#@"reuseIdentifier"#> forIndexPath:indexPath]; |
|
59 |
|
60 // Configure the cell... |
|
61 |
|
62 return cell; |
|
63 } |
|
64 */ |
|
65 |
|
66 /* |
|
67 // Override to support conditional editing of the table view. |
|
68 - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { |
|
69 // Return NO if you do not want the specified item to be editable. |
|
70 return YES; |
|
71 } |
|
72 */ |
|
73 |
|
74 /* |
|
75 // Override to support editing the table view. |
|
76 - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { |
|
77 if (editingStyle == UITableViewCellEditingStyleDelete) { |
|
78 // Delete the row from the data source |
|
79 [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; |
|
80 } else if (editingStyle == UITableViewCellEditingStyleInsert) { |
|
81 // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view |
|
82 } |
|
83 } |
|
84 */ |
|
85 |
|
86 /* |
|
87 // Override to support rearranging the table view. |
|
88 - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { |
|
89 } |
|
90 */ |
|
91 |
|
92 /* |
|
93 // Override to support conditional rearranging of the table view. |
|
94 - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { |
|
95 // Return NO if you do not want the item to be re-orderable. |
|
96 return YES; |
|
97 } |
|
98 */ |
|
99 |
|
100 /* |
|
101 #pragma mark - Table view delegate |
|
102 |
|
103 // In a xib-based application, navigation from a table can be handled in -tableView:didSelectRowAtIndexPath: |
|
104 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
|
105 // Navigation logic may go here, for example: |
|
106 // Create the next view controller. |
|
107 <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:<#@"Nib name"#> bundle:nil]; |
|
108 |
|
109 // Pass the selected object to the new view controller. |
|
110 |
|
111 // Push the view controller. |
|
112 [self.navigationController pushViewController:detailViewController animated:YES]; |
|
113 } |
|
114 */ |
|
115 |
|
116 /* |
|
117 #pragma mark - Navigation |
|
118 |
|
119 // In a storyboard-based application, you will often want to do a little preparation before navigation |
|
120 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { |
|
121 // Get the new view controller using [segue destinationViewController]. |
|
122 // Pass the selected object to the new view controller. |
|
123 } |
|
124 */ |
|
125 |
|
126 @end |