Skip to content

Commit 787a134

Browse files
author
Sam Davies
committed
Tidies up some bits and pieces. Completes the sample project for day22
1 parent 8bb824b commit 787a134

File tree

4 files changed

+35
-22
lines changed

4 files changed

+35
-22
lines changed

22-downloadable-fonts/FontBook/FontBook/Base.lproj/Main.storyboard

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,15 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ
101101
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
102102
<nil key="highlightedColor"/>
103103
</label>
104-
<progressView hidden="YES" opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" fixedFrame="YES" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="SBR-mI-isY">
105-
<rect key="frame" x="0.0" y="66" width="320" height="2"/>
104+
<progressView hidden="YES" opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" ambiguous="YES" misplaced="YES" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="SBR-mI-isY">
105+
<rect key="frame" x="0.0" y="64" width="320" height="2"/>
106106
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
107107
</progressView>
108108
</subviews>
109109
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
110110
<constraints>
111111
<constraint firstItem="Lei-5M-9Gs" firstAttribute="top" secondItem="Z72-wJ-DLG" secondAttribute="bottom" constant="32" id="6LA-yZ-Nkn"/>
112+
<constraint firstItem="SBR-mI-isY" firstAttribute="top" secondItem="Z72-wJ-DLG" secondAttribute="bottom" id="g1W-ZA-m9p"/>
112113
<constraint firstItem="Lei-5M-9Gs" firstAttribute="leading" secondItem="MMQ-IT-qOo" secondAttribute="leading" constant="20" symbolic="YES" id="mbd-vW-4Xc"/>
113114
<constraint firstAttribute="trailing" secondItem="Lei-5M-9Gs" secondAttribute="trailing" constant="20" symbolic="YES" id="rOA-8F-TPD"/>
114115
</constraints>

22-downloadable-fonts/FontBook/FontBook/SCFontFamilyViewController.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ - (void)viewDidLoad
3030
{
3131
[super viewDidLoad];
3232
// Do any additional setup after loading the view, typically from a nib.
33+
self.title = @"Families";
3334

3435
[self requestDownloadableFontList];
3536
}
@@ -65,6 +66,7 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
6566
NSString *fontFamilyName = [_fontList allKeys][indexPath.row];
6667
NSArray *fontList = _fontList[fontFamilyName];
6768
vc.fontList = fontList;
69+
vc.title = fontFamilyName;
6870
}
6971
}
7072

22-downloadable-fonts/FontBook/FontBook/SCFontViewController.h

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
//
2-
// SCFontViewController.h
3-
// FontBook
4-
//
5-
// Created by Sam Davies on 19/10/2013.
6-
// Copyright (c) 2013 shinobicontrols. All rights reserved.
7-
//
1+
/*
2+
Copyright 2013 Scott Logic Ltd
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
816

917
#import <UIKit/UIKit.h>
1018

22-downloadable-fonts/FontBook/FontBook/SCFontViewController.m

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
//
2-
// SCFontViewController.m
3-
// FontBook
4-
//
5-
// Created by Sam Davies on 19/10/2013.
6-
// Copyright (c) 2013 shinobicontrols. All rights reserved.
7-
//
1+
/*
2+
Copyright 2013 Scott Logic Ltd
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
816

917
#import "SCFontViewController.h"
1018
#import "SCDetailViewController.h"
@@ -19,12 +27,6 @@ @implementation SCFontViewController
1927
- (void)viewDidLoad
2028
{
2129
[super viewDidLoad];
22-
23-
// Uncomment the following line to preserve selection between presentations.
24-
// self.clearsSelectionOnViewWillAppear = NO;
25-
26-
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
27-
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
2830
}
2931

3032
- (void)setFontList:(NSArray *)fontList

0 commit comments

Comments
 (0)