|
@@ -31,7 +31,7 @@
|
|
|
// self.automaticallyAdjustsScrollViewInsets = NO;
|
|
// self.automaticallyAdjustsScrollViewInsets = NO;
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
- [self configureNavigationBar];
|
|
|
|
|
|
|
+
|
|
|
[self configureTableView];
|
|
[self configureTableView];
|
|
|
self.shipSearchBar.delegate =self;
|
|
self.shipSearchBar.delegate =self;
|
|
|
[self loadData];
|
|
[self loadData];
|
|
@@ -42,6 +42,37 @@
|
|
|
// Dispose of any resources that can be recreated.
|
|
// Dispose of any resources that can be recreated.
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+- (void)viewWillAppear:(BOOL)animated {
|
|
|
|
|
+ [super viewWillAppear:animated];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ [self clearNavigationbar];
|
|
|
|
|
+ [self configureNavigationBar];
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+- (void)clearNavigationbar {
|
|
|
|
|
+ self.tabBarController.navigationItem.leftBarButtonItem = nil;
|
|
|
|
|
+ self.tabBarController.navigationItem.leftBarButtonItems = nil;
|
|
|
|
|
+ self.tabBarController.navigationItem.titleView = nil;
|
|
|
|
|
+ self.tabBarController.navigationItem.title = nil;
|
|
|
|
|
+ self.tabBarController.navigationItem.rightBarButtonItem = nil;
|
|
|
|
|
+ self.tabBarController.navigationItem.rightBarButtonItems = nil;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+- (void)configureNavigationBar {
|
|
|
|
|
+
|
|
|
|
|
+ if (self.navigationController && !self.navigationController.isNavigationBarHidden) {
|
|
|
|
|
+
|
|
|
|
|
+ UIImage *logo = [[UIImage imageNamed:@"apexlogo-2"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
|
|
|
|
+ UIBarButtonItem *logoItem = [[UIBarButtonItem alloc] initWithImage:logo landscapeImagePhone:logo style:UIBarButtonItemStylePlain target:nil action:nil];
|
|
|
|
|
+ logoItem.enabled = NO;
|
|
|
|
|
+ self.tabBarController.navigationItem.leftBarButtonItem = logoItem;
|
|
|
|
|
+
|
|
|
|
|
+ UIBarButtonItem *searchItem = [[UIBarButtonItem alloc] initWithTitle:@"Search" style:UIBarButtonItemStylePlain target:self action:@selector(searchItemClick:)];
|
|
|
|
|
+ self.tabBarController.navigationItem.rightBarButtonItem = searchItem;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
- (void)configureTableView {
|
|
- (void)configureTableView {
|
|
|
|
|
|
|
|
CGFloat w = CGRectGetWidth(self.shipTableView.bounds);
|
|
CGFloat w = CGRectGetWidth(self.shipTableView.bounds);
|
|
@@ -55,14 +86,6 @@
|
|
|
[self.shipTableView addSubview:refresh];
|
|
[self.shipTableView addSubview:refresh];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-- (void)configureNavigationBar {
|
|
|
|
|
-
|
|
|
|
|
- if (self.navigationController && !self.navigationController.isNavigationBarHidden) {
|
|
|
|
|
- UIBarButtonItem *searchItem = [[UIBarButtonItem alloc] initWithTitle:@"Search" style:UIBarButtonItemStylePlain target:self action:@selector(searchItemClick:)];
|
|
|
|
|
- self.navigationItem.rightBarButtonItem = searchItem;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
#pragma mark - Load Data
|
|
#pragma mark - Load Data
|
|
|
|
|
|
|
|
- (NSMutableArray *)shipArray {
|
|
- (NSMutableArray *)shipArray {
|