Brion VIBBER has submitted this change and it was merged.

Change subject: Fix for line wrapping in TOC in iOS 6.
......................................................................


Fix for line wrapping in TOC in iOS 6.

Faster (hopefully) performance in iOS 6 as well.

Change-Id: I157e535bc12f3a0e87a1986fa61a26cf58694dfd
---
M wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m
M wikipedia/View Controllers/TableOfContents/TOCViewController.m
2 files changed, 7 insertions(+), 4 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m 
b/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m
index 4368001..442d676 100644
--- a/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m
+++ b/wikipedia/View Controllers/TableOfContents/TOCSectionCellView.m
@@ -12,12 +12,13 @@
 #import "NSString+FormattedAttributedString.h"
 #import "WikipediaAppUtils.h"
 #import "SessionSingleton.h"
+#import "PaddedLabel.h"
 
 @interface TOCSectionCellView(){
 
 }
 
-@property (nonatomic, strong) UILabel *titleLabel;
+@property (nonatomic, strong) PaddedLabel *titleLabel;
 
 @property (nonatomic) UIEdgeInsets cellMargin;
 @property (nonatomic) UIEdgeInsets imageMargin;
@@ -42,7 +43,7 @@
         self.sectionImageIds = @[];
         self.sectionImageViews = [@[] mutableCopy];
         
-        self.titleLabel = [[UILabel alloc] init];
+        self.titleLabel = [[PaddedLabel alloc] init];
         self.titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
         self.titleLabel.numberOfLines = 0;
         self.titleLabel.lineBreakMode = NSLineBreakByWordWrapping;
diff --git a/wikipedia/View Controllers/TableOfContents/TOCViewController.m 
b/wikipedia/View Controllers/TableOfContents/TOCViewController.m
index 88600cd..3e71af0 100644
--- a/wikipedia/View Controllers/TableOfContents/TOCViewController.m
+++ b/wikipedia/View Controllers/TableOfContents/TOCViewController.m
@@ -80,21 +80,23 @@
 -(void)viewWillDisappear:(BOOL)animated
 {
     [self.funnel logClose];
+    /*
     [[NSNotificationCenter defaultCenter] removeObserver: self
                                                     name: 
@"SectionImageRetrieved"
                                                   object: nil];
-
+    */
     [super viewWillDisappear:animated];
 }
 
 -(void)viewDidAppear:(BOOL)animated
 {
     [super viewDidAppear:animated];
-
+    /*
     [[NSNotificationCenter defaultCenter] addObserver: self
                                              selector: 
@selector(sectionImageRetrieved:)
                                                  name: @"SectionImageRetrieved"
                                                object: nil];
+    */
     [self.funnel logOpen];
 }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/144729
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I157e535bc12f3a0e87a1986fa61a26cf58694dfd
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd <mh...@wikimedia.org>
Gerrit-Reviewer: Brion VIBBER <br...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to