Skip to content

Commit 1e3f9bd

Browse files
committed
Remove unused code from WPTabBarController
1 parent 2f39128 commit 1e3f9bd

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

WordPress/Classes/ViewRelated/System/WPTabBarController.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22

33
NS_ASSUME_NONNULL_BEGIN
44

5-
extern NSString * const WPNewPostURLParamContentKey;
6-
extern NSString * const WPNewPostURLParamTagsKey;
75
extern NSString * const WPTabBarCurrentlySelectedScreenSites;
86
extern NSString * const WPTabBarCurrentlySelectedScreenReader;
97
extern NSString * const WPTabBarCurrentlySelectedScreenNotifications;
10-
extern NSNotificationName const WPTabBarHeightChangedNotification;
118

129
@class AbstractPost;
1310
@class Blog;

WordPress/Classes/ViewRelated/System/WPTabBarController.m

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,12 @@
1414
@import WordPressShared;
1515
@import WordPressUI;
1616

17-
static NSString * const WPTabBarButtonClassname = @"UITabBarButton";
1817
static NSString * const WPApplicationIconBadgeNumberKeyPath = @"applicationIconBadgeNumber";
1918

20-
NSString * const WPNewPostURLParamTitleKey = @"title";
21-
NSString * const WPNewPostURLParamContentKey = @"content";
22-
NSString * const WPNewPostURLParamTagsKey = @"tags";
23-
NSString * const WPNewPostURLParamImageKey = @"image";
24-
2519
NSString * const WPTabBarCurrentlySelectedScreenSites = @"Blog List";
2620
NSString * const WPTabBarCurrentlySelectedScreenReader = @"Reader";
2721
NSString * const WPTabBarCurrentlySelectedScreenNotifications = @"Notifications";
2822

29-
NSNotificationName const WPTabBarHeightChangedNotification = @"WPTabBarHeightChangedNotification";
30-
static NSString * const WPTabBarFrameKeyPath = @"frame";
31-
3223
static NSInteger const WPTabBarIconOffsetiPad = 7;
3324
static NSInteger const WPTabBarIconOffsetiPhone = 5;
3425

@@ -53,8 +44,6 @@ @interface WPTabBarController () <UITabBarControllerDelegate>
5344
@property (nonatomic, strong) UIImage *meTabBarImageUnreadUnselected;
5445
@property (nonatomic, strong) UIImage *meTabBarImageUnreadSelected;
5546

56-
@property (nonatomic, assign) CGFloat tabBarHeight;
57-
5847
@end
5948

6049
@implementation WPTabBarController
@@ -101,11 +90,6 @@ - (instancetype)initWithStaticScreens:(BOOL)shouldUseStaticScreens
10190
options:NSKeyValueObservingOptionNew
10291
context:nil];
10392

104-
[self.tabBar addObserver:self
105-
forKeyPath:WPTabBarFrameKeyPath
106-
options:NSKeyValueObservingOptionNew
107-
context:nil];
108-
10993
[self observeGravatarImageUpdate];
11094
}
11195
return self;
@@ -118,7 +102,6 @@ - (instancetype)init
118102

119103
- (void)dealloc
120104
{
121-
[self.tabBar removeObserver:self forKeyPath:WPTabBarFrameKeyPath];
122105
[[UIApplication sharedApplication] removeObserver:self forKeyPath:WPApplicationIconBadgeNumberKeyPath];
123106
}
124107

@@ -403,25 +386,11 @@ - (BOOL)welcomeNotificationSeen
403386

404387
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
405388
{
406-
if (object == self.tabBar && [keyPath isEqualToString:WPTabBarFrameKeyPath]) {
407-
[self notifyOfTabBarHeightChangedIfNeeded];
408-
}
409-
410389
if (object == [UIApplication sharedApplication] && [keyPath isEqualToString:WPApplicationIconBadgeNumberKeyPath]) {
411390
[self updateNotificationBadgeVisibility];
412391
}
413392
}
414393

415-
- (void)notifyOfTabBarHeightChangedIfNeeded
416-
{
417-
CGFloat newTabBarHeight = self.tabBar.frame.size.height;
418-
if (newTabBarHeight != self.tabBarHeight) {
419-
self.tabBarHeight = newTabBarHeight;
420-
[[NSNotificationCenter defaultCenter] postNotificationName:WPTabBarHeightChangedNotification
421-
object:nil];
422-
}
423-
}
424-
425394
#pragma mark - UIResponder & Keyboard Helpers
426395

427396
- (BOOL)canBecomeFirstResponder

0 commit comments

Comments
 (0)