Fixing a few nav bars to fit.

This commit is contained in:
Samuel Clay 2013-09-26 16:12:09 -07:00
parent b31f7926a1
commit c9b8fdd35f
15 changed files with 483 additions and 12339 deletions

View file

@ -64,7 +64,6 @@ static UIFont *indicatorFont = nil;
if (highlighted) {
textColor = UIColorFromRGB(0x686868); //0x686868
}
[textColor set];
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle defaultParagraphStyle] mutableCopy];
paragraphStyle.lineBreakMode = NSLineBreakByTruncatingTail;
@ -73,6 +72,7 @@ static UIFont *indicatorFont = nil;
[self.siteTitle
drawInRect:CGRectMake(leftMargin, 6, rect.size.width - rightMargin, 21)
withAttributes:@{NSFontAttributeName: font,
NSForegroundColorAttributeName: textColor,
NSParagraphStyleAttributeName: paragraphStyle}];
textColor = UIColorFromRGB(0x333333);
@ -92,12 +92,12 @@ static UIFont *indicatorFont = nil;
if (highlighted) {
textColor = UIColorFromRGB(0x686868);
}
[textColor set];
paragraphStyle.alignment = NSTextAlignmentRight;
[self.siteSubscribers
drawInRect:CGRectMake(leftMargin + (rect.size.width - rightMargin) / 2 - 10, 42 + adjustForSocial, (rect.size.width - rightMargin) / 2 + 10, 15.0)
withAttributes:@{NSFontAttributeName: font,
NSForegroundColorAttributeName: textColor,
NSParagraphStyleAttributeName: paragraphStyle}];
// feed bar

View file

@ -19,7 +19,7 @@
ActivityModule *activitiesModule;
UIWebView *feedbackWebView;
UIToolbar *toolbar;
UIToolbar *topToolbar;
UINavigationBar *topToolbar;
UISegmentedControl *segmentedButton;
}
@ -28,7 +28,7 @@
@property (nonatomic) IBOutlet ActivityModule *activitiesModule;
@property (nonatomic) IBOutlet UIWebView *feedbackWebView;
@property (nonatomic) IBOutlet UIToolbar *topToolbar;
@property (nonatomic) IBOutlet UINavigationBar *topToolbar;
@property (nonatomic) IBOutlet UIToolbar *toolbar;
@property (nonatomic) IBOutlet UISegmentedControl *segmentedButton;

View file

@ -42,8 +42,6 @@
self.feedbackWebView.delegate = self;
self.segmentedButton.selectedSegmentIndex = 0;
self.topToolbar.tintColor = [UIColor colorWithRed:0.16f green:0.36f blue:0.46 alpha:0.9];
// preload feedback
self.feedbackWebView.scalesPageToFit = YES;
@ -59,7 +57,10 @@
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
//Load the request in the UIWebView.
[self.feedbackWebView loadRequest:requestObj];
CGRect topToolbarFrame = self.topToolbar.frame;
topToolbarFrame.size.height += 20;
self.topToolbar.frame = topToolbarFrame;
}
- (void)viewDidUnload {

View file

@ -98,7 +98,6 @@
// Folder title
UIColor *textColor = [UIColor colorWithRed:0.3 green:0.3 blue:0.3 alpha:1.0];
[textColor set];
UIFont *font = [UIFont boldSystemFontOfSize:11];
NSString *folderTitle;
if (section == 0) {
@ -121,6 +120,7 @@
[folderTitle
drawInRect:CGRectMake(36.0, 10, rect.size.width - 36 - 36 - countWidth, 14)
withAttributes:@{NSFontAttributeName: font,
NSForegroundColorAttributeName: textColor,
NSParagraphStyleAttributeName: paragraphStyle}];
UIButton *invisibleHeaderButton = [UIButton buttonWithType:UIButtonTypeCustom];

View file

@ -99,6 +99,8 @@
object:nil];
self.view.backgroundColor = UIColorFromRGB(0xC2C5BE);
self.navigationController.navigationBar.translucent = NO;
self.masterNavigationController.navigationBar.translucent = NO;
self.masterNavigationController = appDelegate.navigationController;
self.feedsViewController = appDelegate.feedsViewController;
@ -120,9 +122,11 @@
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:self.storyPageControl];
self.storyNavigationController = nav;
self.storyNavigationController.navigationBar.translucent = NO;
UINavigationController *shareNav = [[UINavigationController alloc] initWithRootViewController:self.shareViewController];
self.shareNavigationController = shareNav;
self.shareNavigationController.navigationBar.translucent = NO;
// set default y coordinate for feedDetailY from saved preferences
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];

View file

@ -1026,13 +1026,15 @@
- (void)showOriginalStory:(NSURL *)url {
self.activeOriginalStoryURL = url;
UINavigationController *navController = [[UINavigationController alloc]
initWithRootViewController:self.originalStoryViewController];
navController.navigationBar.translucent = NO;
self.originalStoryViewNavController = navController;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
[self.masterContainerViewController presentViewController:originalStoryViewController
[self.masterContainerViewController presentViewController:self.originalStoryViewNavController
animated:YES completion:nil];
} else {
self.originalStoryViewNavController = [[UINavigationController alloc]
initWithRootViewController:originalStoryViewController];
self.originalStoryViewNavController.navigationBar.translucent = NO;
[self.navigationController presentViewController:self.originalStoryViewNavController
animated:YES completion:nil];
}

View file

@ -11,7 +11,7 @@
@class NewsBlurAppDelegate;
static const CGFloat kNavBarHeight = 58.0f;
static const CGFloat kNavBarHeight = 78.0f;
static const CGFloat kLabelHeight = 18.0f;
static const CGFloat kMargin = 6.0f;
static const CGFloat kSpacer = 2.0f;
@ -37,7 +37,7 @@ static const CGFloat kButtonWidth = 68.0f;
}
@property (nonatomic) IBOutlet NewsBlurAppDelegate *appDelegate;
@property (nonatomic) IBOutlet UIView *navBar;
@property (nonatomic) IBOutlet UINavigationBar *navBar;
@property (nonatomic) IBOutlet UIBarButtonItem *closeButton;
@property (nonatomic) IBOutlet UIWebView *webView;
@property (nonatomic) IBOutlet UIBarButtonItem* back;

View file

@ -72,14 +72,8 @@
[self layoutForInterfaceOrientation:toInterfaceOrientation];
}
- (void)viewDidLoad {
CGRect navBarFrame = self.view.bounds;
navBarFrame.size.height = kNavBarHeight;
navBarFrame.origin.y += 20;
navBar = [[UINavigationBar alloc] initWithFrame:navBarFrame];
[self.view addSubview:navBar];
CGRect labelFrame = CGRectMake(kMargin, kSpacer,
- (void)viewDidLoad {
CGRect labelFrame = CGRectMake(kMargin, kSpacer + 20,
navBar.bounds.size.width - 2*kMargin,
kLabelHeight);
@ -102,7 +96,7 @@
action:@selector(doCloseOriginalStoryViewController)];
close.width = kButtonWidth;
CGRect closeButtonFrame = CGRectMake(-20,
kSpacer*2.0 + kLabelHeight - 7.0f,
kSpacer*2.0 + kLabelHeight - 7.0f + 20,
kButtonWidth + kMargin,
44.0);
TransparentToolbar* tools = [[TransparentToolbar alloc]
@ -114,7 +108,7 @@
CGRect addressFrame = CGRectMake(closeButtonFrame.origin.x +
closeButtonFrame.size.width +
kMargin,
kSpacer*2.0 + kLabelHeight,
kSpacer*2.0 + kLabelHeight + 20,
labelFrame.size.width
- kButtonWidth - kMargin*2 + 20,
kAddressHeight);
@ -167,6 +161,8 @@
navBarFrame.size.height = kNavBarHeight;
navBar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
navBar.frame = navBarFrame;
navBar.translucent = NO;
toolbar.translucent = NO;
}
- (IBAction)webViewGoBack:(id)sender {

View file

@ -58,13 +58,13 @@ static UIFont *indicatorFont = nil;
font = [UIFont fontWithName:@"Helvetica-Bold" size:11];
textColor = UIColorFromRGB(0x606060);
[textColor set];
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle defaultParagraphStyle] mutableCopy];
paragraphStyle.lineBreakMode = NSLineBreakByTruncatingTail;
paragraphStyle.alignment = NSTextAlignmentLeft;
[self.siteTitle drawInRect:CGRectMake(leftMargin + 20, 6, rect.size.width - 20, 21)
withAttributes:@{NSFontAttributeName: font,
NSForegroundColorAttributeName: textColor,
NSParagraphStyleAttributeName: paragraphStyle}];
// feed bar

View file

@ -8,11 +8,10 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="DashboardViewController">
<connections>
<outlet property="activitiesModule" destination="38" id="39"/>
<outlet property="feedbackWebView" destination="49" id="50"/>
<outlet property="interactionsModule" destination="28" id="29"/>
<outlet property="segmentedButton" destination="24" id="44"/>
<outlet property="toolbar" destination="22" id="55"/>
<outlet property="topToolbar" destination="51" id="54"/>
<outlet property="topToolbar" destination="4z7-nH-jyd" id="mgJ-kU-Ppl"/>
<outlet property="view" destination="2" id="3"/>
</connections>
</placeholder>
@ -21,35 +20,27 @@
<rect key="frame" x="0.0" y="0.0" width="478" height="960"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translucent="NO" id="51">
<rect key="frame" x="0.0" y="0.0" width="478" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<items/>
<color key="tintColor" red="0.0" green="0.50196081400000003" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</toolbar>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="NewsBlur" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="59">
<rect key="frame" x="0.0" y="0.0" width="478" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
<color key="shadowColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</label>
<view contentMode="scaleToFill" id="28" customClass="InteractionsModule">
<rect key="frame" x="0.0" y="44" width="478" height="872"/>
<rect key="frame" x="0.0" y="64" width="478" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<view contentMode="scaleToFill" id="38" customClass="ActivityModule">
<rect key="frame" x="0.0" y="44" width="478" height="872"/>
<rect key="frame" x="0.0" y="64" width="478" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<webView contentMode="scaleToFill" id="49">
<rect key="frame" x="0.0" y="44" width="478" height="872"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</webView>
<navigationBar contentMode="scaleToFill" translucent="NO" id="4z7-nH-jyd">
<rect key="frame" x="0.0" y="0.0" width="478" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<items>
<navigationItem id="9Fx-4n-yL9"/>
</items>
</navigationBar>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logo_newsblur_blur.png" id="zOJ-C7-I3n">
<rect key="frame" x="0.0" y="26" width="478" height="34"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
</imageView>
<toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translucent="NO" id="22">
<rect key="frame" x="0.0" y="916" width="478" height="44"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
@ -76,4 +67,7 @@
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
</view>
</objects>
<resources>
<image name="logo_newsblur_blur.png" width="612" height="118"/>
</resources>
</document>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -23,7 +23,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<webView multipleTouchEnabled="YES" contentMode="scaleToFill" scalesPageToFit="YES" id="4">
<rect key="frame" x="0.0" y="56" width="320" height="380"/>
<rect key="frame" x="0.0" y="76" width="320" height="360"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="scrollViewTexturedBackgroundColor"/>
<dataDetectorType key="dataDetectorTypes" phoneNumber="YES" link="YES" address="YES" calendarEvent="YES"/>
@ -31,10 +31,9 @@
<outlet property="delegate" destination="-1" id="7"/>
</connections>
</webView>
<view contentMode="scaleToFill" id="wB4-Cq-a4Y">
<rect key="frame" x="0.0" y="0.0" width="320" height="58"/>
<view contentMode="scaleToFill" id="wB4-Cq-a4Y" customClass="UINavigationBar">
<rect key="frame" x="0.0" y="0.0" width="320" height="78"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<toolbar clipsSubviews="YES" contentMode="scaleToFill" id="5">
<rect key="frame" x="0.0" y="436" width="320" height="44"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 17 KiB