Skip to content

Commit 212179d

Browse files
handled tabview delegate
1 parent 9205831 commit 212179d

4 files changed

Lines changed: 26 additions & 21 deletions

File tree

AppBox/AppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ +(AppDelegate *)appDelegate{
6161
}
6262

6363
-(void)addSessionLog:(NSString *)sessionLog{
64-
[_sessionLog appendFormat: @"\n%@", sessionLog];
64+
[_sessionLog appendFormat: @"\n\n%@ - %@",[NSDate date],sessionLog];
6565
[[NSNotificationCenter defaultCenter] postNotificationName:SessionLogUpdated object:nil];
6666
}
6767

AppBox/Base.lproj/Main.storyboard

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@
5757
<modifierMask key="keyEquivalentModifierMask"/>
5858
<menu key="submenu" title="File" id="bib-Uj-vzu">
5959
<items>
60-
<menuItem title="Select ipa file" keyEquivalent="o" id="IAo-SY-fd9">
60+
<menuItem title="View Log" id="Rk6-gK-cUU">
61+
<modifierMask key="keyEquivalentModifierMask"/>
6162
<connections>
62-
<action selector="openDocument:" target="Ady-hI-5gd" id="bVn-NM-KNZ"/>
63+
<segue destination="6aM-eF-B0k" kind="show" id="jTU-hR-7QO"/>
6364
</connections>
6465
</menuItem>
6566
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
@@ -113,12 +114,6 @@
113114
<action selector="performMiniaturize:" target="Ady-hI-5gd" id="ger-iM-sPs"/>
114115
</connections>
115116
</menuItem>
116-
<menuItem title="Zoom" id="wlh-eO-HnL">
117-
<modifierMask key="keyEquivalentModifierMask"/>
118-
<connections>
119-
<action selector="performZoom:" target="Ady-hI-5gd" id="Dl4-zm-pgu"/>
120-
</connections>
121-
</menuItem>
122117
<menuItem isSeparatorItem="YES" id="BPG-IT-FEB"/>
123118
<menuItem title="View Log" id="wFj-c5-AyQ">
124119
<modifierMask key="keyEquivalentModifierMask"/>
@@ -163,7 +158,7 @@
163158
<customObject id="Voe-Tx-rLC" customClass="AppDelegate"/>
164159
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
165160
</objects>
166-
<point key="canvasLocation" x="665" y="-77"/>
161+
<point key="canvasLocation" x="830" y="-113"/>
167162
</scene>
168163
<!--Window Controller-->
169164
<scene sceneID="R2V-B0-nI4">
@@ -363,7 +358,7 @@
363358
</constraints>
364359
</view>
365360
</tabViewItem>
366-
<tabViewItem label="Upload IPA Only" identifier="2" id="Q1W-fI-E8i">
361+
<tabViewItem label="Upload IPA" identifier="2" id="Q1W-fI-E8i">
367362
<view key="view" id="taZ-IM-RE0">
368363
<rect key="frame" x="10" y="33" width="774" height="80"/>
369364
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -657,21 +652,21 @@
657652
<objects>
658653
<viewController title="AppBox Log" showSeguePresentationStyle="single" id="6aM-eF-B0k" customClass="LogViewController" sceneMemberID="viewController">
659654
<view key="view" id="4JE-m3-V2s">
660-
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
655+
<rect key="frame" x="0.0" y="0.0" width="780" height="369"/>
661656
<autoresizingMask key="autoresizingMask"/>
662657
<subviews>
663658
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kbJ-uL-Hq6">
664-
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
659+
<rect key="frame" x="0.0" y="0.0" width="780" height="369"/>
665660
<clipView key="contentView" id="EQ4-Ej-Nlf">
666-
<rect key="frame" x="1" y="1" width="448" height="298"/>
661+
<rect key="frame" x="1" y="1" width="778" height="367"/>
667662
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
668663
<subviews>
669664
<textView editable="NO" importsGraphics="NO" usesFontPanel="YES" findStyle="panel" continuousSpellChecking="YES" usesRuler="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" spellingCorrection="YES" smartInsertDelete="YES" id="hek-dT-Drn">
670-
<rect key="frame" x="0.0" y="0.0" width="448" height="298"/>
665+
<rect key="frame" x="0.0" y="0.0" width="778" height="367"/>
671666
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
672667
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
673-
<size key="minSize" width="448" height="298"/>
674-
<size key="maxSize" width="463" height="10000000"/>
668+
<size key="minSize" width="778" height="367"/>
669+
<size key="maxSize" width="778" height="10000000"/>
675670
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
676671
</textView>
677672
</subviews>
@@ -682,7 +677,7 @@
682677
<autoresizingMask key="autoresizingMask"/>
683678
</scroller>
684679
<scroller key="verticalScroller" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="5af-Y7-Vzh">
685-
<rect key="frame" x="433" y="1" width="16" height="298"/>
680+
<rect key="frame" x="763" y="1" width="16" height="367"/>
686681
<autoresizingMask key="autoresizingMask"/>
687682
</scroller>
688683
</scrollView>
@@ -700,7 +695,7 @@
700695
</viewController>
701696
<customObject id="Sep-aN-CO8" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
702697
</objects>
703-
<point key="canvasLocation" x="665" y="255"/>
698+
<point key="canvasLocation" x="830" y="289.5"/>
704699
</scene>
705700
<!--Mail View Controller-->
706701
<scene sceneID="hWk-PV-Lb4">
@@ -1022,4 +1017,7 @@ Gw
10221017
<point key="canvasLocation" x="-226" y="1612"/>
10231018
</scene>
10241019
</scenes>
1020+
<inferredMetricsTieBreakers>
1021+
<segue reference="jTU-hR-7QO"/>
1022+
</inferredMetricsTieBreakers>
10251023
</document>

AppBox/Common/Common.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ + (void)shutdownSystem{
6767
#pragma mark - Check for update
6868
+ (void)isNewVersionAvailableCompletion:(void (^)(bool available, NSURL *url))completion{
6969
@try {
70+
[[AppDelegate appDelegate] addSessionLog:@"Checking for new version..."];
7071
[NetworkHandler requestWithURL:GitHubLatestRelease withParameters:nil andRequestType:RequestGET andCompletetion:^(id responseObj, NSError *error) {
7172
if (error == nil &&
7273
[((NSDictionary *)responseObj).allKeys containsObject:@"tag_name"] &&

AppBox/ViewController/HomeViewController/HomeViewController.m

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ - (void)viewDidLoad {
3636
[pathBuild setURL:[NSURL URLWithString:[@"~/Desktop" stringByExpandingTildeInPath]]];
3737
[project setBuildDirectory: pathBuild.URL];
3838

39+
[self updateViewState];
3940
}
4041

4142
- (void)viewWillAppear{
@@ -648,7 +649,7 @@ -(void)mailSentWithWebView:(WebView *)webView{
648649
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(60 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
649650
[Common shutdownSystem];
650651
});
651-
}else{
652+
}else if(![self.presentedViewControllers.lastObject isKindOfClass:[ShowLinkViewController class]]){
652653
[self performSegueWithIdentifier:@"ShowLink" sender:self];
653654
}
654655
}
@@ -677,7 +678,12 @@ -(void)enableMailField:(BOOL)enable{
677678
[self textFieldDevMessageValueChanged:textFieldMessage];
678679
}
679680

680-
#pragma mark - Navigation
681+
#pragma mark - TabView Delegate
682+
-(void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem{
683+
[self updateViewState];
684+
}
685+
686+
#pragma mark - Navigation -
681687
-(void)showURL{
682688
NSString *status = [NSString stringWithFormat:@"App URL - %@",project.appShortShareableURL.absoluteString];
683689
[self showStatus:status andShowProgressBar:NO withProgress:0];

0 commit comments

Comments
 (0)