Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit 84476b6

Browse files
author
kernel
committed
Add iOS7 60px icon.
Update all deprecated system calls with iOS7 respective duplicates.
1 parent b7fe274 commit 84476b6

File tree

15 files changed

+63
-31
lines changed

15 files changed

+63
-31
lines changed

Gitty.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3541,7 +3541,7 @@
35413541
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
35423542
CLANG_ENABLE_MODULES = YES;
35433543
CODE_SIGN_IDENTITY = "iPhone Developer";
3544-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
3544+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Anton Altukhov (9P6H56XK58)";
35453545
GCC_FAST_MATH = YES;
35463546
GCC_OPTIMIZATION_LEVEL = 3;
35473547
GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -3567,7 +3567,7 @@
35673567
);
35683568
PRODUCT_NAME = "$(TARGET_NAME)";
35693569
PROVISIONING_PROFILE = "";
3570-
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "62A31995-E026-488C-8615-AF853435C8F3";
3570+
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "08004291-A0AC-412D-9F0A-8279193ECED9";
35713571
USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/Submodules/objective-git/libgit2/include $(SRCROOT)/Submodules/ConceptScroll/PagerView $(SRCROOT)/Submodules/ZipArchive/ $(SRCROOT)/Submodules/objective-git/Classes $(SRCROOT)/Submodules/objective-git/Classes/Categories/";
35723572
WRAPPER_EXTENSION = app;
35733573
};

Gitty/DACommitBranchCell.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@ - (void)awakeFromNib {
2929
}
3030

3131
- (CGFloat)heightForCommit:(GTCommit *)commit {
32-
CGSize s = CGSizeMake(self.commitLabel.width, CommitMessageMaxHeight);
33-
s = [commit.message sizeWithFont:self.commitLabel.font constrainedToSize:s lineBreakMode:self.commitLabel.lineBreakMode];
32+
self.commitLabel.text = commit.message;
3433

34+
CGRect r = CGRectMake(0, 0, self.width, CommitMessageMaxHeight);
35+
r = [self.commitLabel textRectForBounds:r limitedToNumberOfLines:6];
36+
37+
CGSize s = r.size;
3538
CGFloat height = InitialCellHeight;
3639

3740
BOOL isMultiline = s.height > commitMessageSingleLineHeight;

Gitty/DACommitCell.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,12 @@ - (void)prepareForReuse {
3131
}
3232

3333
- (CGFloat)heightForCommit:(GTCommit *)commit {
34-
CGSize s = CGSizeMake(self.commitLabel.width, CommitMessageMaxHeight);
35-
s = [commit.message sizeWithFont:self.commitLabel.font constrainedToSize:s lineBreakMode:self.commitLabel.lineBreakMode];
34+
self.commitLabel.text = commit.message;
3635

36+
CGRect r = CGRectMake(0, 0, self.commitLabel.width, CommitMessageMaxHeight);
37+
r = [self.commitLabel textRectForBounds:r limitedToNumberOfLines:6];
38+
39+
CGSize s = r.size;
3740
CGFloat height = InitialCellHeight;
3841

3942
BOOL isMultiline = s.height > commitMessageSingleLineHeight;

Gitty/DACommitMessageCell.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ - (void)awakeFromNib {
2828
}
2929

3030
- (CGFloat)heightForCommit:(GTCommit *)commit {
31-
CGSize s = CGSizeMake(self.commitLabel.width, CommitMessageMaxHeight);
32-
s = [commit.message sizeWithFont:self.commitLabel.font constrainedToSize:s lineBreakMode:self.commitLabel.lineBreakMode];
31+
self.commitLabel.text = commit.message;
3332

33+
CGRect r = CGRectMake(0, 0, self.commitLabel.width, CommitMessageMaxHeight);
34+
r = [self.commitLabel textRectForBounds:r limitedToNumberOfLines:6];
35+
36+
CGSize s = r.size;
3437
CGFloat height = InitialCellHeight;
3538

3639
BOOL isMultiline = s.height > commitMessageSingleLineHeight;

Gitty/DADiffCtrlDataSource.m

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,20 @@ - (void)prepareDiff {
5353
}
5454
}
5555

56+
- (NSDictionary *)attributesWithFont:(UIFont *)font {
57+
NSMutableDictionary *attributes = @{}.mutableCopy;
58+
59+
attributes[NSFontAttributeName] = font;
60+
61+
return attributes;
62+
}
63+
64+
5665
- (void)compareCommit:(GTCommit *)commit againstParentCommit:(GTCommit *)oldCommit {
5766
// TODO: fetch font directly from corresponding view.
5867
UIFont *font = [UIFont fontWithName:@"Courier" size:14.];
59-
NSLineBreakMode lineBreakMode = NSLineBreakByClipping;
68+
69+
NSDictionary *attributes = [self attributesWithFont:font];
6070

6171
const CGFloat lineHeight = font.lineHeight;
6272

@@ -82,9 +92,11 @@ - (void)compareCommit:(GTCommit *)commit againstParentCommit:(GTCommit *)oldComm
8292
linesCount += hunk.lineCount + 1/*header*/;
8393

8494
[hunk enumerateLinesInHunkUsingBlock:^(GTDiffLine *line, BOOL *stop) {
85-
CGSize s = [line.content sizeWithFont:font forWidth:4096. lineBreakMode:lineBreakMode];
8695

87-
longestLineWidth = MAX(s.width, longestLineWidth);
96+
CGSize maxSize = CGSizeMake(4096, 4096);
97+
CGRect r = [line.content boundingRectWithSize:maxSize options:NSStringDrawingTruncatesLastVisibleLine attributes:attributes context:nil];
98+
99+
longestLineWidth = MAX(r.size.width, longestLineWidth);
88100
}];
89101
}];
90102

Gitty/DAHunkContentView.m

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ - (void)awakeFromNib {
2727
#endif
2828
}*/
2929

30+
- (NSDictionary *)attributesWithFont:(UIFont *)font {
31+
NSMutableDictionary *attributes = @{}.mutableCopy;
32+
33+
attributes[NSFontAttributeName] = font;
34+
// attributes[NSForegroundColorAttributeName] = color;
35+
36+
return attributes;
37+
}
38+
3039
- (void)loadHunk:(GTDiffHunk *)hunk {
3140
CGFloat fontSize = 14;
3241
UIFont *font = [UIFont fontWithName:@"Courier" size:fontSize];
@@ -39,6 +48,8 @@ - (void)loadHunk:(GTDiffHunk *)hunk {
3948

4049
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
4150

51+
NSDictionary *attributes = [self attributesWithFont:font];
52+
4253
[NSObject startMeasurement];
4354

4455
UIGraphicsBeginImageContextWithOptions(self.frame.size, YES, UIScreen.mainScreen.scale);
@@ -59,7 +70,8 @@ - (void)loadHunk:(GTDiffHunk *)hunk {
5970
if (isEOFNewLineStuff) {
6071
[noNewLineImg drawAtPoint:CGPointMake(.0, y)];
6172
} else {
62-
[line.content drawAtPoint:CGPointMake(.0, y) withFont:font];
73+
// [line.content drawAtPoint:CGPointMake(.0, y) withFont:font];
74+
[line.content drawAtPoint:CGPointMake(.0, y) withAttributes:attributes];
6375
}
6476

6577
lineNumber++;

Gitty/DAModifiedHeader.xib

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@
7777
<constraint firstItem="16" firstAttribute="top" secondItem="4" secondAttribute="top" id="y8h-uE-XFU"/>
7878
</constraints>
7979
</view>
80-
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Diff suppressed (filesize)" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="idB-hT-n2N" userLabel="Binary Status Label (No Code Content)">
80+
<label hidden="YES" opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Diff suppressed (filesize)" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="idB-hT-n2N" userLabel="Binary Status Label (No Code Content)">
8181
<rect key="frame" x="20" y="60" width="280" height="20"/>
8282
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
83+
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
8384
<fontDescription key="fontDescription" name="Cochin-Bold" family="Cochin" pointSize="16"/>
8485
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
8586
<nil key="highlightedColor"/>

Gitty/DAStatusHeader.xib

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="File added/removed/renamed" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ri6-TS-owk" userLabel="Status Label">
7878
<rect key="frame" x="58" y="60" width="204" height="18"/>
7979
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
80+
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
8081
<constraints>
8182
<constraint firstAttribute="height" constant="18" id="b5g-D9-wTd"/>
8283
</constraints>

Gitty/Gitty-Info.plist

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
<string>GitUp</string>
99
<key>CFBundleExecutable</key>
1010
<string>${EXECUTABLE_NAME}</string>
11-
<key>CFBundleIcons</key>
12-
<dict/>
13-
<key>CFBundleIcons~ipad</key>
14-
<dict/>
1511
<key>CFBundleIdentifier</key>
1612
<string>mobi.reimplement.gitup</string>
1713
<key>CFBundleInfoDictionaryVersion</key>
@@ -46,7 +42,7 @@
4642
<key>Style</key>
4743
<string>UIBarStyleDefault</string>
4844
<key>Translucent</key>
49-
<false/>
45+
<true/>
5046
</dict>
5147
</dict>
5248
<key>UISupportedInterfaceOrientations</key>

Gitty/Images.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,36 @@
22
"images" : [
33
{
44
"idiom" : "iphone",
5-
"scale" : "2x",
6-
"size" : "60x60"
5+
"size" : "29x29",
6+
"scale" : "1x"
77
},
88
{
9-
"size" : "57x57",
109
"idiom" : "iphone",
11-
"filename" : "Icon.png",
12-
"scale" : "1x"
10+
"size" : "29x29",
11+
"scale" : "2x"
1312
},
1413
{
15-
"size" : "57x57",
1614
"idiom" : "iphone",
17-
"filename" : "Icon@2x.png",
15+
"size" : "40x40",
1816
"scale" : "2x"
1917
},
2018
{
19+
"size" : "57x57",
2120
"idiom" : "iphone",
22-
"scale" : "1x",
23-
"size" : "29x29"
21+
"filename" : "Icon.png",
22+
"scale" : "1x"
2423
},
2524
{
25+
"size" : "57x57",
2626
"idiom" : "iphone",
27-
"scale" : "2x",
28-
"size" : "29x29"
27+
"filename" : "Icon@2x.png",
28+
"scale" : "2x"
2929
},
3030
{
31+
"size" : "60x60",
3132
"idiom" : "iphone",
32-
"scale" : "2x",
33-
"size" : "40x40"
33+
"filename" : "Icon-60@2x.png",
34+
"scale" : "2x"
3435
}
3536
],
3637
"info" : {
Loading

Publish + Soc Media/AppStore/1024.png

-558 KB
Binary file not shown.
-288 KB
Binary file not shown.

Res/Icons/Icon-60.png

10.6 KB
Loading

Res/Icons/Icon-60@2x.png

28.6 KB
Loading

0 commit comments

Comments
 (0)