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

Commit 3f5bef7

Browse files
author
kernel
committed
Landscape mode fixed on Diff screen.
1 parent 84476b6 commit 3f5bef7

File tree

6 files changed

+25
-32
lines changed

6 files changed

+25
-32
lines changed

Gitty.xcodeproj/project.pbxproj

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,12 @@
4444
1812266D1784CE2D00628C2F /* bitbucket@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1812266C1784CE2D00628C2F /* bitbucket@2x.png */; };
4545
181226741784D0BA00628C2F /* repo-forget.png in Resources */ = {isa = PBXBuildFile; fileRef = 181226711784D0BA00628C2F /* repo-forget.png */; };
4646
181226761784D48500628C2F /* repo-forget@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 181226751784D48500628C2F /* repo-forget@2x.png */; };
47-
181240ED175BCD3C00E6F571 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 181240EA175BCD3C00E6F571 /* Icon.png */; };
48-
181240EE175BCD3C00E6F571 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 181240EB175BCD3C00E6F571 /* Icon@2x.png */; };
4947
181240F5175BD21100E6F571 /* DARepoCtrl+Animation.m in Sources */ = {isa = PBXBuildFile; fileRef = 181240F4175BD21100E6F571 /* DARepoCtrl+Animation.m */; };
5048
1812EBF0179AF4C800416064 /* NSAttributedString+Gitty.m in Sources */ = {isa = PBXBuildFile; fileRef = 1812EBEF179AF4C800416064 /* NSAttributedString+Gitty.m */; };
5149
181429DC178901E100347E1B /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 181429DB178901E100347E1B /* MessageUI.framework */; };
5250
1817091E175BCBEA002A2D93 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1817091B175BCBEA002A2D93 /* Default-568h@2x.png */; };
5351
1817091F175BCBEA002A2D93 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 1817091C175BCBEA002A2D93 /* Default.png */; };
5452
18170920175BCBEA002A2D93 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1817091D175BCBEA002A2D93 /* Default@2x.png */; };
55-
18170922175BCC1B002A2D93 /* Icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 18170921175BCC1B002A2D93 /* Icon-72@2x.png */; };
5653
18184B6017555AB5001C58D8 /* DABaseCtrl.m in Sources */ = {isa = PBXBuildFile; fileRef = 18184B5F17555AB5001C58D8 /* DABaseCtrl.m */; };
5754
18184B6717556968001C58D8 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 18184B6617556968001C58D8 /* libz.dylib */; };
5855
181873AF179BED8A002FE1A3 /* DAServerCtrl-3.5inches.xib in Resources */ = {isa = PBXBuildFile; fileRef = 181873AE179BED8A002FE1A3 /* DAServerCtrl-3.5inches.xib */; };
@@ -147,7 +144,6 @@
147144
1871D780179C1B3F00F1D928 /* DARepoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1871D77F179C1B3F00F1D928 /* DARepoCell.xib */; };
148145
1871E9B517EDBB5900A3464C /* DAFrameCtrl.m in Sources */ = {isa = PBXBuildFile; fileRef = 1871E9B417EDBB5900A3464C /* DAFrameCtrl.m */; };
149146
1871E9C017EE0C1200A3464C /* DAFrameCtrl+States.m in Sources */ = {isa = PBXBuildFile; fileRef = 1871E9BF17EE0C1200A3464C /* DAFrameCtrl+States.m */; };
150-
187A29D11795BEC700FE9F19 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 187A29D01795BEC700FE9F19 /* Icon-72.png */; };
151147
187A29DF1795DFD400FE9F19 /* STKeychain.m in Sources */ = {isa = PBXBuildFile; fileRef = 187A29DE1795DFD400FE9F19 /* STKeychain.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
152148
187A29E21795E05500FE9F19 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 187A29E11795E05500FE9F19 /* Security.framework */; };
153149
187C86211781F4A800703592 /* btn-lightgray.png in Resources */ = {isa = PBXBuildFile; fileRef = 187C86201781F4A800703592 /* btn-lightgray.png */; };
@@ -416,8 +412,6 @@
416412
1812266C1784CE2D00628C2F /* bitbucket@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "bitbucket@2x.png"; sourceTree = "<group>"; };
417413
181226711784D0BA00628C2F /* repo-forget.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "repo-forget.png"; sourceTree = "<group>"; };
418414
181226751784D48500628C2F /* repo-forget@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "repo-forget@2x.png"; sourceTree = "<group>"; };
419-
181240EA175BCD3C00E6F571 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
420-
181240EB175BCD3C00E6F571 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = "<group>"; };
421415
181240F3175BD21100E6F571 /* DARepoCtrl+Animation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "DARepoCtrl+Animation.h"; sourceTree = "<group>"; };
422416
181240F4175BD21100E6F571 /* DARepoCtrl+Animation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "DARepoCtrl+Animation.m"; sourceTree = "<group>"; };
423417
1812EBEE179AF4C800416064 /* NSAttributedString+Gitty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSAttributedString+Gitty.h"; sourceTree = "<group>"; };
@@ -426,7 +420,6 @@
426420
1817091B175BCBEA002A2D93 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
427421
1817091C175BCBEA002A2D93 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
428422
1817091D175BCBEA002A2D93 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
429-
18170921175BCC1B002A2D93 /* Icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72@2x.png"; sourceTree = "<group>"; };
430423
18184B5E17555AB5001C58D8 /* DABaseCtrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DABaseCtrl.h; sourceTree = "<group>"; };
431424
18184B5F17555AB5001C58D8 /* DABaseCtrl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DABaseCtrl.m; sourceTree = "<group>"; };
432425
18184B6617556968001C58D8 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
@@ -585,7 +578,6 @@
585578
1871E9BB17EE086500A3464C /* DAFrameCtrl+Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "DAFrameCtrl+Internal.h"; sourceTree = "<group>"; };
586579
1871E9BE17EE0C1200A3464C /* DAFrameCtrl+States.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "DAFrameCtrl+States.h"; sourceTree = "<group>"; };
587580
1871E9BF17EE0C1200A3464C /* DAFrameCtrl+States.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "DAFrameCtrl+States.m"; sourceTree = "<group>"; };
588-
187A29D01795BEC700FE9F19 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = "<group>"; };
589581
187A29DD1795DFD400FE9F19 /* STKeychain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STKeychain.h; sourceTree = "<group>"; };
590582
187A29DE1795DFD400FE9F19 /* STKeychain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STKeychain.m; sourceTree = "<group>"; };
591583
187A29E11795E05500FE9F19 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
@@ -1279,18 +1271,6 @@
12791271
name = ProtocolsContainer;
12801272
sourceTree = "<group>";
12811273
};
1282-
18170914175BCBB6002A2D93 /* Icons */ = {
1283-
isa = PBXGroup;
1284-
children = (
1285-
187A29D01795BEC700FE9F19 /* Icon-72.png */,
1286-
181240EA175BCD3C00E6F571 /* Icon.png */,
1287-
181240EB175BCD3C00E6F571 /* Icon@2x.png */,
1288-
18170921175BCC1B002A2D93 /* Icon-72@2x.png */,
1289-
);
1290-
name = Icons;
1291-
path = Res/Icons;
1292-
sourceTree = "<group>";
1293-
};
12941274
1817091A175BCBEA002A2D93 /* Backgrounds */ = {
12951275
isa = PBXGroup;
12961276
children = (
@@ -2797,7 +2777,6 @@
27972777
1804FA8C176E2D510080AB50 /* Logos */,
27982778
1817091A175BCBEA002A2D93 /* Backgrounds */,
27992779
18F995D1175FBEDB0033A4A0 /* UI */,
2800-
18170914175BCBB6002A2D93 /* Icons */,
28012780
18933CDF1755395D00E92183 /* Gitty-Info.plist */,
28022781
18933CE01755395D00E92183 /* InfoPlist.strings */,
28032782
);
@@ -3124,10 +3103,7 @@
31243103
1817091F175BCBEA002A2D93 /* Default.png in Resources */,
31253104
1804FAA4176E768D0080AB50 /* Git-Icon@2x.png in Resources */,
31263105
18170920175BCBEA002A2D93 /* Default@2x.png in Resources */,
3127-
18170922175BCC1B002A2D93 /* Icon-72@2x.png in Resources */,
31283106
1804FA87176E16210080AB50 /* DAServerCtrl.xib in Resources */,
3129-
181240ED175BCD3C00E6F571 /* Icon.png in Resources */,
3130-
181240EE175BCD3C00E6F571 /* Icon@2x.png in Resources */,
31313107
1804FA94176E44450080AB50 /* bitbucket.png in Resources */,
31323108
188B2D58175D3E5C00BD1EEB /* DACommitCell.xib in Resources */,
31333109
1871D780179C1B3F00F1D928 /* DARepoCell.xib in Resources */,
@@ -3187,7 +3163,6 @@
31873163
1810993E1790746C0018AAB4 /* DAAuthorHeaderCell.xib in Resources */,
31883164
1810994417909C140018AAB4 /* DACommitBranchCell.xib in Resources */,
31893165
1810994B1790A6CA0018AAB4 /* DATitleHeaderCell.xib in Resources */,
3190-
187A29D11795BEC700FE9F19 /* Icon-72.png in Resources */,
31913166
181873AF179BED8A002FE1A3 /* DAServerCtrl-3.5inches.xib in Resources */,
31923167
18CDDB55181B191400218774 /* Images.xcassets in Resources */,
31933168
181873B9179C0175002FE1A3 /* overlay-black@2x.png in Resources */,

Gitty/DADiffCtrl.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ - (NSUInteger)supportedInterfaceOrientations {
8383
}
8484

8585
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
86+
8687
BOOL hidden = UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
87-
[self.navigationController setNavigationBarHidden:hidden];
88+
[self.navigationController setNavigationBarHidden:hidden animated:YES];
8889

8990
NSString *orintation = UIInterfaceOrientationIsPortrait(toInterfaceOrientation) ? WorkflowActionDiffPortrait : WorkflowActionDiffLandscape;
9091
[DAFlurry logWorkflowAction:orintation];

Gitty/DAFrameCtrl.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ @implementation DAFrameCtrl
2727
- (void)viewDidLoad {
2828
[super viewDidLoad];
2929

30-
// [self.mainContainer colorizeBorderWithColor:UIColor.redColor];
30+
// [self.mainContainer colorizeBorderWithColor:UIColor.blueColor];
3131
}
3232

3333
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {

Gitty/DAModifiedHeader.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ - (id)init {
2424

2525
[self addSubview:view];
2626

27+
view.translatesAutoresizingMaskIntoConstraints = NO;
28+
[view applyFullscreenConstraints];
29+
2730
[self applyLightEffectOnBackground];
2831

2932
// [view colorizeBorderWithColor:UIColor.blueColor];
@@ -34,10 +37,14 @@ - (id)init {
3437
- (void)applyLightEffectOnBackground {
3538
_bluringToolbar = [UIToolbar.alloc initWithFrame:self.bluringBackground.bounds];
3639

40+
[self.bluringBackground addSubview:self.bluringToolbar];
41+
self.bluringToolbar.translatesAutoresizingMaskIntoConstraints = NO;
42+
[self.bluringToolbar applyFullscreenConstraints];
43+
3744
self.bluringToolbar.translucent = YES;
3845
self.bluringToolbar.barTintColor = UIColor.blackColor;
3946

40-
[self.bluringBackground.layer insertSublayer:self.bluringToolbar.layer atIndex:0];
47+
// [self.bluringBackground.layer insertSublayer:self.bluringToolbar.layer atIndex:0];
4148
}
4249

4350
- (void)loadDelta:(GTDiffDelta *)delta {

Gitty/DAStatusHeader.m

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ @interface DAStatusHeader ()
1717
@implementation DAStatusHeader
1818
@dynamic titles;
1919

20-
- (id)init
21-
{
20+
- (id)init {
2221
self = [super init];
2322
if (self) {
2423
NSArray *views = [NSBundle.mainBundle loadNibNamed:self.className owner:self options:nil];
@@ -28,6 +27,9 @@ - (id)init
2827

2928
[self addSubview:view];
3029

30+
view.translatesAutoresizingMaskIntoConstraints = NO;
31+
[view applyFullscreenConstraints];
32+
3133
[self applyLightEffectOnBackground];
3234
}
3335
return self;
@@ -36,10 +38,14 @@ - (id)init
3638
- (void)applyLightEffectOnBackground {
3739
_bluringToolbar = [UIToolbar.alloc initWithFrame:self.bluringBackground.bounds];
3840

41+
[self.bluringBackground addSubview:self.bluringToolbar];
42+
self.bluringToolbar.translatesAutoresizingMaskIntoConstraints = NO;
43+
[self.bluringToolbar applyFullscreenConstraints];
44+
3945
self.bluringToolbar.translucent = YES;
4046
self.bluringToolbar.barTintColor = UIColor.blackColor;
4147

42-
[self.bluringBackground.layer insertSublayer:self.bluringToolbar.layer atIndex:0];
48+
// [self.bluringBackground.layer insertSublayer:self.bluringToolbar.layer atIndex:0];
4349
}
4450

4551
- (NSString *)titleForChangeType:(GTDiffDeltaType)type {

Gitty/en.lproj/MainStoryboard.storyboard

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ yet.</string>
840840
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
841841
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
842842
<subviews>
843-
<containerView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="W13-SA-qaA" userLabel="Main Ctrl Container">
843+
<containerView clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="W13-SA-qaA" userLabel="Main Ctrl Container">
844844
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
845845
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
846846
<connections>
@@ -862,8 +862,12 @@ yet.</string>
862862
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
863863
<constraints>
864864
<constraint firstAttribute="bottom" secondItem="1nX-m9-deU" secondAttribute="bottom" id="7zS-hY-e31"/>
865+
<constraint firstAttribute="trailing" secondItem="W13-SA-qaA" secondAttribute="trailing" id="8tO-ol-xWR"/>
865866
<constraint firstAttribute="trailing" secondItem="1nX-m9-deU" secondAttribute="trailing" id="JFy-Ry-8uI"/>
867+
<constraint firstAttribute="bottom" secondItem="W13-SA-qaA" secondAttribute="bottom" id="JJa-Gb-P7t"/>
868+
<constraint firstItem="W13-SA-qaA" firstAttribute="leading" secondItem="mUO-Jv-dXe" secondAttribute="leading" id="PPO-fR-Ofu"/>
866869
<constraint firstItem="1nX-m9-deU" firstAttribute="top" secondItem="mUO-Jv-dXe" secondAttribute="top" id="axL-Wk-K9w"/>
870+
<constraint firstItem="W13-SA-qaA" firstAttribute="top" secondItem="mUO-Jv-dXe" secondAttribute="top" id="fdd-YT-bgX"/>
867871
<constraint firstItem="1nX-m9-deU" firstAttribute="leading" secondItem="mUO-Jv-dXe" secondAttribute="leading" id="uGp-sJ-uzB"/>
868872
</constraints>
869873
</view>

0 commit comments

Comments
 (0)