/
SampleViewController.m
55 lines (42 loc) · 1.18 KB
/
SampleViewController.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//
// SampleViewController.m
// Part of the ASIHTTPRequest sample project - see http://allseeing-i.com/ASIHTTPRequest for details
//
// Created by Ben Copsey on 17/06/2010.
// Copyright 2010 All-Seeing Interactive. All rights reserved.
//
#import "SampleViewController.h"
@implementation SampleViewController
- (void)showNavigationButton:(UIBarButtonItem *)button
{
[[[self navigationBar] topItem] setLeftBarButtonItem:button animated:NO];
}
- (void)hideNavigationButton:(UIBarButtonItem *)button
{
[[[self navigationBar] topItem] setLeftBarButtonItem:nil animated:NO];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
- (NSIndexPath *)tableView:(UITableView *)theTableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
return nil;
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
[[self tableView] reloadData];
}
- (void)viewDidUnload {
[super viewDidUnload];
[self setNavigationBar:nil];
[self setTableView:nil];
}
- (void)dealloc {
[navigationBar release];
[tableView release];
[super dealloc];
}
@synthesize navigationBar;
@synthesize tableView;
@end